Questions tagged [selenium-webdriver]

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

Filter by
Sorted by
Tagged with
3
votes
4answers
20k views

IE always opens with random local host and message: “This is the initial start page for the WebDriver server”

I have my WebDriver tests running parallel in IE, Chrome and firefox. When I run test in IE browser it node gets registered with the hub, and the browser opens and it gets redirected to some random ...
3
votes
1answer
187 views

Page Object Model: need help with tests that uses more than 1 page object - Appium-Java-TestNG

I have a framework based on POM model. I am able to write test that only uses elements from 1 page but when I need to access elements from another page tests fail because I think it uses the wrong ...
2
votes
2answers
829 views

Explicit wait with more methods to same element

I have a few questions related to explicit waits: Is it possible to use more methods to same element? What combination of them I can use ? Why I still have exceptions with stale element and similar ...
2
votes
1answer
4k views

selenium wget download file

I'm testing a web app with Selenium and I actually need to download a txt file during my test. But this seems impossible because a pop up appears asking to save the file. So, this blocks the progress ...
2
votes
1answer
748 views

How do I check if a tooltip appears or not?

How do I check if the tooltip appears or not in selenium? When mouseovering the element, I can see the tooltip appear. How do I verify that the tooltip appears? HTML of the Icon: <td class=" text-...
2
votes
3answers
1k views

Chaining WebElement actions

When interacting with different elements and applying multiple actions it may be quite convenient in some situations if we could do: WebElement myInput = driver.findElement(By.id("my-input-id")); ...
2
votes
2answers
7k views

Selenium webdriver - Unable to locate element,xpath,error

I am testing localization. I am running the same URL with other countries in my data provider. The HTML I am looking for is: <a class="learn-more linkable" data-url="/speakers/minijambox">En ...
2
votes
0answers
144 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
1answer
175 views

Locating a set of elements by class attribute when class attribute contains multiple values

I'm trying to populate a list WebElement by class value. It looks like it should be simple. There are 4 elements that look like my example. The idea is to loop through the list and validate the ...
2
votes
7answers
8k views

Selenium: how to wait for javascript fadeout (visibility and clickable don't work)

So, in the AUT there's a <div> loading screen covering the entire page, which then fades out and gets replaced in the DOM by the <body>. I'm using ExpectedConditions for visibility and ...
2
votes
1answer
4k views

WebDriver instantiation in Selenium framework

I'm looking for some advice on how to instantiate my WebDriver driver instance in my automation framework (Selenium 3.0.1 / Java 8 / TestNG). My goal is to handle all the instantiation code in one ...
2
votes
2answers
2k views

Importance of using TDD with Selenium/Webdriver

I want to know what is the importance of test-driven development with Selenium/Webdriver? Is it a framework ?
2
votes
1answer
5k views

Automation - Testing the Contents in EMail

In my application I am supposed to test/fetch the data and contents of the E-Mail received after triggering the Schedule. How can I automate this scenario using Selenium web-driver ?
2
votes
3answers
11k 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
3answers
8k views

Can I copy data from a CSV file and use it in a website using only Selenium IDE

Right now I'm running selenium test script in which I have get data from a CSV file and paste in a site.So can I copy data from a CSV file and paste in a test script in Selenium IDE. It would be of ...
2
votes
1answer
8k views

How to get a grid row count with Selenium in C#?

Hello I am currently trying to figure out how to get the count of how many rows are displaying in an HTML Grid on a page. From researching several stack exchanges some people reference GetXPathCount ...
2
votes
1answer
3k views

How to use rollup command in selenium ide?

I am new to selenium IDE, As with reference to below image i cant click into rollup icon during and after my recording. So kindly explain me how to, why and what time we should use rollup in ...
2
votes
1answer
3k views

How to make multiple testcases of one value

I have created test cases for email but there are multiple negative test cases for email field then how should I pass multiple values in the input field. I have created function.but don't is that ...
2
votes
3answers
13k views

Testing the popup with Selenium IDE [closed]

Getting below error : Window does not exist. If this looks like a Selenium bug, make sure to read http://seleniumhq.org/docs/02_selenium_ide.html#alerts-popups-and-multiple-windows for potential ...
2
votes
2answers
36k 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 ...
2
votes
2answers
493 views

Is it a good practice to keep the looping statement in loginsteps class?

I am working in Selenium with page object design pattern, without any Selenium frameworks. I did a sample login page. I am keeping my test data in a property file: baseurl=http:// nam=geo,sony,geo,...
1
vote
2answers
726 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
1answer
3k views

moveToElement function not working on IE when browser is minimized or not active using Selenium Webdriver

I'm trying to automate an application using Selenium Webdriver. The moveToElement function fails when the browser is minimized or not active (keep other app active). It works when I keep AUT browser ...
1
vote
5answers
28k views

Cannot get a STRING value from a NUMERIC cell. How can I resolve this issue in selenium webdriver using POI?

I am trying to read data from an excel sheet and write on my application.But shows an error while trying to pass a numeric value using string. Please suggest me how can I resolve the issue. Please see ...
1
vote
3answers
10k views

Data driven testing on Selenium IDE

Is there any option to read data from an Excel on Selenium IDE? How does it work? I have to call data from an Excel file (where data are stored).
1
vote
5answers
4k views

XPath to select label plus hidden radio button option using WebDriver

I am unable to write the correct XPath to select the title "MRS" for below code. I am using below code, but unable to execute it. driver.findElement(By.xpath("//div[@value='MRS']")).click(); Getting ...
1
vote
3answers
7k views

finding difficult to login in gmail [closed]

While entering only username no problem is occurred. But, if i write code to enter both username & password another page is coming. ex. obj.findElement(By.name("username")).sendKeys("xxxxx"); //...
1
vote
1answer
478 views

How to control TestNG to iterate all Tests in each iteration instead of iterating individual tests before moving on to the subsequent test

Problem - I have 6 tests and one dataprovider with 2*2 object array. I want TestNG to pick first data, use it in First test and then subsequent tests are executed based on the data picked in first ...
1
vote
1answer
686 views

Cucumber not finding @Findby annotations

Im trying to set up cucumber over my page object. I currently have as my login page object: @FindBy (id = cF.username) public WebElement username; @FindBy (id = cF.password) ...
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
1answer
415 views

Unable to enter 16 digit credit card number in IE browser using sendKeys method of selenium

As per my requirement I have to enter credit card number which is 4111 1111 1111 1111. I am trying with sendKeys(), it is working in all browsers except IE browser. When it is trying to enter the ...
1
vote
1answer
22 views

Verifing pdf using Selenium + Java

How can one verify pdf using Selenium + Java? Until recently, I was verifying pdf using Firefox (making sure that the pdf file wasn't empty). This was nice and working fine, but it's not multi-...
1
vote
2answers
1k views

Solution on ElementNotVisibleException in Selenium

I need to click on a link which displays a popup. But, I'm receiving the following exception: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be ...
1
vote
2answers
222 views

click() method is not working

I have a link which is having the href attribute as javascript:void(0), but it is having the onclick function. In the onclick function dev is use to log the number of hits to be database through ajax ...
1
vote
1answer
852 views

How to automate test the website inside some windows desktop app?

I have this question: I found there are web test automation tools such as selenium, but they are designed for testing website in the browsers such as ie/firefox/google chrome... What if the website ...
1
vote
2answers
554 views

How to automate a download popup in browsers other than firefox in linux and Mac?

For automating a download popup in Firefox, we use Firefox Profile and for other browsers I've used AutoIt. Is there any other way to work around it in windows? And coming to the main question, I've ...
1
vote
3answers
13k 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
2answers
9k views

Selenium Driver Service Not Found Exception

Good Afternoon All, I am creating a testing framework for a web app utilizing Selenium Web Driver and Visual Studio by way of C#. I have created a solution that includes two projects. The first ...
1
vote
0answers
1k views

Unable to open website in Firefox using selenium webdriver one updated version to 55 [closed]

Here is the sample code which I'm using. System.setProperty("webdriver.gecko.driver","C:\\geckodriver-v0.18.0-win64\\geckodriver.exe"); WebDriver driver = new FirefoxDriver(); driver.get("https://...
1
vote
4answers
6k views

How can I switch ON/OFF AIRPLANE mode and wifi using Appium?

How can I switch ON/OFF AIRPLANE mode and wifi using Appium ? Selenium has below option: NetworkConnection mobileDriver = (NetworkConnection) driver; if (mobileDriver.getNetworkConnection() != ...
1
vote
3answers
246 views

Flaws in the Page Object Model?

I read this article about flaws in the Page Object Model/POM, authored by a lady at ThoughtWorks - https://blog.getgauge.io/are-page-objects-anti-pattern-21b6e337880f She says that POM leads to ...
1
vote
2answers
2k views

WebGL doesn't work with Chromedriver

I'm having an issue I've hit a wall on, I'm hoping someone else has encountered. I am running selenium/splinter tests on a VM with Chromedriver installed. When I open the webpage on the VM with Chrome ...
1
vote
3answers
697 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
3answers
4k 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
2answers
8k views

How to test angularJS search dropdown with Selenium

I am trying to select an option from a drop-down search box as shown below: The HTML of the element is below: <div id="select2-drop-mask" class="select2-drop-mask" style=""></div> &...
1
vote
4answers
7k views

How to write test cases in selenium webdriver using C#, simultaneously when web application is being developed (application pages not available)

I want to write test cases when application is under developing. I know the design of the application based on the wireframes. I intend to write test cases in C# using the Selenuim WebDriver. ...
1
vote
3answers
755 views

How to accept Alert message in Selenium Java

I tried driver.switchTo().alert().accept(); but still i am unable to accept the alert message. please let me know the code to accept below message. enclosed screenshot of message and XML
1
vote
2answers
3k views

how to find int value within span class Selenium C#

The int value inside the bold span class is a count of results, which will vary. I want to find it so I can validate it against a database get. <span class="baseline float-left blocking-rule-...
0
votes
2answers
2k views

Has someone ever used Selenium RC with Firefox Portable (specifically FF3.6)?

I'm having difficulty to make them work together. How do you setup the server or the test to use Firefox Portable? One of the things I had to do was specify the exact location of the Firefox.exe. No ...
0
votes
1answer
12k views

Understanding how to handle auto-complete using Selenium and Python

While testing for a certain web application, I was faced with an issue of handling auto-complete scenarios. An example of this kind could be found here MagicBricks I have few questions related to how ...