Questions tagged [browser-automation]

Questions regarding automation of web applications for testing purposes according to specific of used web browser.

9
votes
3answers
7k views

Is it a bad practice to use implicit wait in Selenium Webdriver? Should one use only explicit wait?

I was reading up on implicit and explicit waits and found the following two statements: Implicit wait is not considered a good practice because different browsers have different loading times and ...
8
votes
2answers
2k views

Your suggestions for writing reliable Web UI automation

Web UI automation is unreliable. I presume it is possible to increase the reliability of Web UI tests. One such advice would be to put an abstraction layer on top of your test that does actual DOM ...
22
votes
7answers
96k views

Selenium: reuse existing browser session, instead of opening new windows?

This has been asked a million times on the web, but there's no clear cut answer. I tried "-browserSessionReuse" today without any luck; my tests keep spawning new browser windows. X:\QA\Automation\...
11
votes
5answers
3k views

How can I switch from manual testing to writing automation?

I am working hourly for low wage as a QA intern/tester. I want to learn more about this field. I have already graduated, so everything I have learned is self taught or learned somehow on the job. At ...
4
votes
4answers
25k views

I face a problem while opening Firefox with Selenium script

I face a problem while running Selenium scripts. I try to open Firefox using the following command: import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public ...
2
votes
2answers
409 views

What should be the approach to test styles using Selenium

In my UI tests I would like to verify particular style values for the elements. Below is the example list of the styles I'd like to verify: font style font size padding margin Is there a way to do ...
3
votes
2answers
526 views

How to select an element from a drop down list inside 'svg viewbox' container using Java/WebDriver?

<svg viewBox="0 0 24 24" style="display: inline-block; fill: rgb(224, 224, 224); height: 24px; width: 24px; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; position: absolute; right: ...
2
votes
3answers
15k views

How to open new tab in browser in selenium 3.0?

I have tried multiple actions but it is not working. It always close the first tab and then it open link in the same page. // Driver is launched package WebBrowserCommands; import org.openqa....
5
votes
4answers
2k views

What tools work well for automating .NET 4.0 web sites using web forms with dynamic data?

What would be the best solution to accommodate automated testing of web forms with code-behind (.NET 4.0)? Specifically, we need a solution that can automate web form testing and handle dynamic data ...
5
votes
1answer
188 views

Canonical way to define page objects/locators in big enterprise level automation projects?

Background: As automation testers in selenium world, we have to work on multiple languages/frameworks(wrappers over selenium) in different projects however there is an one thing which remains common ...
6
votes
1answer
6k views

Testing ExtJS UI with WebDriver

Our Web app is using ExtJS framework for rendering UI. However, ExtJS-rendered UI is hard to test automatically because: For most clickable elements, ExtJS uses generated ids like "ext-gen-345" ...
5
votes
4answers
944 views

What to ask programmers before automating with Selenium

What points should I discuss with frontend programmers when preparing a product on which, as a tester, I will use Selenium to automate? I am referring to things like, no dynamic ids for elements etc. ...
4
votes
5answers
41k views

How to run all Selenium test cases via batch file [closed]

I am a noob in Java and automation so please bear with me if I get the terminology wrong. I have a class file that can open a browser and navigate to google.com and then closes the browser. There’s ...
9
votes
4answers
520 views

How to test the test scripts?

Once an automation test is created, how do I test it and make sure the test does what its supposed to do? I can easily test the scenarios where test passes, but how to go about the ones that fails due ...
9
votes
5answers
39k views

Selenium 2 element.click() is unreliable

I am using Selenium 2 2.16 build. I've been running into problems where I get a variable response to a click() call, where sometimes the click activates the behaviour behind the element (new page ...
6
votes
1answer
55k views

How to switch-handle-close particular popup window, When multiple popups are opened?

I know how to switch to single popup window, but I do not know how to switch particular popup window when you have more popup windows. Scenario is: Go to the each and every popup Get the title ...
2
votes
3answers
10k views

Efficient way of reading data from Excel in Selenium C#

I am creating some test cases in Selenium WebDriver using C# (I can't use Java as client has said so). These are sample test cases which will be used for presenting a demo to client and senior ...
2
votes
0answers
91 views

decompose an HTML list with page fragments

note: Looking for simplest possible example of PageFactory and fragments. I've been referencing an article which uses additional libraries I wasn't aware of. The desired structure: Where there's ...
2
votes
2answers
35k views

Selenium Webdriver | Unable to locate element error

I am trying to run the below code but getting error. Can you please point out the issue? import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import ...
1
vote
3answers
3k views

Selenium Webdriver - FindElement in scope of WebElement doesn't work

The FindElement() method doesn't seem to work with an XPath locator, if called on an existing WebElement. My code is this: htmlDiv = _driver.FindElement(By.XPath("//h2[text()='" + onvNaam + "']/../.....
1
vote
3answers
624 views

How we can enter data into multiple fields at the same time to make automation faster?

With selenium we enter one field at a time, right now I am working on a project where there are 1000+ fields, actually it takes huge amount of time. Is there any possible way in selenium to make ...
1
vote
1answer
6k views

Can't open webpage using Firefox WebDriver using Selenium [duplicate]

Possible Duplicate: I face a problem while opening Firefox with Selenium script import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class ok { /** ...
1
vote
2answers
335 views

NullPointerException when using @FindBy

I'm getting a NullPointerException when trying to use @FindBy because the object reference is only declared and not instantiated. What is the usage? The docs give example declaration but no instance ...
1
vote
3answers
11k views

Selenium Cannot locate element [duplicate]

I am working on automation, while automating a form with number of drop-down's. The problem with me is, when run the code in maximize mode of window it gives me an Error: org.openqa.selenium....
1
vote
1answer
87 views

POM: driver is passed as an argument? Always?

Example code: Driver is being passed as an Argument so that Selenium is able to locate the element on the browser (driver). Element is returned, so that an Action can be performed on it. ...
0
votes
1answer
191 views

xpath query for specific String value

My project is crashing with: Element info: {Using=xpath, value=//a[contains(text(), 'Books')]/@href}. The output (crash): thufir@dur:~/NetBeansProjects/com.toscrape.books.selenium$ thufir@dur:~/...
0
votes
5answers
5k views

Selenium - advantages and disadvantages of using Python vs C#

We currently have two teams. An automation team and also a web testing team. The automation team currently use Selenium and C# to automate tests on our web applications and legacy systems. As a ...
0
votes
1answer
351 views

Can a Selenium IDE test continue when an assertElementPresent fails? [closed]

I'm just a little stuck with the Syntax and how I put up to stepsgroup adds && assertElementPresent css=span:contains('shares') How can I edit the script to do this? &...