Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [selenium-webdriver]

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

1
vote
3answers
1k views

Python selenium grid parallel execution

How do I run parallel selenium scraper in grid? I wanted to crawl 10 urls , and if I start two Firefox nodes, how do I request the nodes to crawl 5 urls in parallel? I have gone through google, but ...
3
votes
3answers
2k views

Fetch all the links on a page that are within the same class

Quick Links <span class="buttonContainer"><input type="image" class="helpButton" src="/images/buttons/btn_help.gif" alt="View help." title="View help."><input type="image"...
-1
votes
0answers
19 views

How to read elements in gridview with multiple div by selenium

I am new to automation. I have some xpath: //*[@id="1558256562137-grid-container"]/div[2]/div/div[1]/div/div/div[9]/div[1]/button[2] //*[@id="1558256562137-grid-container"]/div[2]/div/div[2]/div/...
1
vote
2answers
216 views

How to drag an element and drop it in another frame?

Hope you doing well, I'm trying to dragAndDrop an element from FrameOne to FrameTwo but not able to do so.Please help me to understand the concept and what I'm doing wrong here and need to achieve ...
0
votes
1answer
43 views

Selenium WebDriver “Cannot instantiate class ” error is coming

Below is my Base Class: package com.mercury.qa.base; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import java.util....
0
votes
0answers
24 views

How can i close alert message by enter action through keyboard?

I'm looking for different way for closing alert message except accept() or dismiss() methods so how can i close alert message by enter action through keyboard ?
10
votes
8answers
30k views

WebDriver Clicking button issue in IE 11

Have a suite of web-drivers tests that run in chrome and IE 10, but will not run in IE 11. The tests fail in IE-11 when clicking a button as the following action (a form popup) does not occur. I ...
0
votes
1answer
22 views

Capture arguments of onclick() javascript call using Selenium Java

I am writing a selenium script in Java to capture the arguments passed in JavaScript onclick() call/method. Attached is the image in which method/function name is highlighted. Now, In this method ...
1
vote
2answers
66 views

Python Selenium unable to login by clicking on Button inside a form

website:https://www.etoro.com/login <button automation-id="login-sts-btn-sign-in" ng-click="loginCtrl.login(loginForm)" class="e-btn-big wide dark pointer">Sign in</button> I am trying ...
0
votes
2answers
210 views

Getting row count of HTML table always returns 1?

I wish to grab an HTML table and extract the number of rows it has. I stumbled upon a solution linked here link. However, the proposed solution always returns row count of 1. I've alswo tried the ...
0
votes
0answers
18 views

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

I want to retrieve a value in 'Given' function and then store it in a global variable so that the value is accessible in subsequent steps of a scenario in protractor cucumber typescript based ...
1
vote
2answers
72 views

Using Fluent Wait When Finding List WebElements

I have a fluent wait class that works pretty well for locating my page elements, however, when I am locating elements for lists I don't appear to be using the same wait. I currently need to add ...
2
votes
2answers
132 views

How to Select a value from Dropdown using Selenium WebDriver (Java) having input and div but not select tag?

I am trying to select a value from a dropdown. When I inspect that dropdown, I cannot see the select Tag, instead it was designed with combination of input and div tags. Can anyone suggest a way how ...
0
votes
1answer
37 views

How to close this dialog

This is the code for an opening specific page and after that popup appear which I am unable to handle. I have used alert, switchTo, etc.. //Open Browser WebDriver driver = new ChromeDriver(); //...
0
votes
0answers
41 views

Get serenity html reports parallel during execution

Am using serenity with cucumber. Here the html report created for each scenario is with random string. My questions: 1. Can we rename those individual html report by scenario name?. 2. Is the ...
0
votes
1answer
34 views

How can I turn a list of assertions into a table? C#/Specflow Selenium

I am very new to using C#/Specflow to write tests so thank you for the patience. I have a test that ends like this: Then the Details page should display the rating zip code And the Details page ...
1
vote
1answer
32 views

Selenium | Locate elements via custom attribute

I'm new to test automation with Selenium (Python) and just wondering if it makes sense to locate elements on webpages via a custom attribute? In some places the IDs of the elements are generated and ...
2
votes
3answers
59 views

How to validate that an object (whose locator we don't know since it is not present) is not present in a page

Let's say I want to verify that an upload button is not present in a page. I cannot use any locator here since I don't know the object locator value. So how do I assert in my test that it is never ...
2
votes
2answers
55 views

if/else condition is not working as expected

WebElement radio= driver.findElement(By.xpath("//[@id=\"mydiv\"]/form/div[1]/div[3]/label")); if (radio.isSelected()){ Thread.sleep(2000); driver.findElement(By.xpath("//*[@id=\"mydiv\"]/form/...
0
votes
1answer
35 views

Java Null pointer exception when trying to click on an element that is present in a block and becomes visible when another element is clicked

I am trying to click on an element which is present in a block and the block itself becomes visible when another element "Your Trips" is clicked on. I am able to find the element and click on Your ...
1
vote
1answer
17 views

Selenium WebDriver gives the same window handle across multiple Firefox browser sessions

We use different profiles to test different features of our system. If we open new multiple FF sessions (each with it's own profile), Selenium Webdriver only uses 1 window handle identifier. (pseudo ...
0
votes
2answers
32 views

How can we run only selected testcases from extent.html report in selenium webdriver?

I'am running testng suite and then extent.html report is being generated. Now I want to customize my report like; i should be able to select only failed testcases in my report and then should be able ...
0
votes
0answers
14 views

How to run selenium script recorded using Selenium IDE along with jMeter?

Here are the steps I have followed so far.... 1) Recorded steps using Selenium IDE 2) Then I export it (".side" file) into a java(junit 4) file. 3) Created a maven project and add necessary ...
6
votes
4answers
8k views

Selenium Webdriver faster way to fill textboxes than Sendkeys()

So i have multiple textboxes i need to fill and Sendkeys() takes a lot of time, is there a faster way to fill textboxes in selenium?
5
votes
3answers
697 views

How to design automation framework when the app to be tested has 500 web pages?

I have a web application which has around 500 pages. Can we use POM framework and if so, is it a good practice? if not, please suggest some ideas.
5
votes
7answers
10k views

Enable Flash player on Chrome 62 while running selenium test

I noticed that starting Chrome 62, chrome disables Flash player by default. I wrote a simple selenium test to visit : https://helpx.adobe.com/flash-player.html and noticed that it does not enable ...
0
votes
1answer
34 views

What is the best approach to manage Precondition for set of tests

Lets say I have a set of tests which depends on a precondition. Should I automate the precondition or manually perform the precondition data? If I automate the precondition test and execute them ...
0
votes
1answer
63 views

Interview Preparation

How can prepare for quality automation analyst (1 yr exp) interview? Actually this is the final round. They've said like there will be a technical discussion and soft skills with the QA lead and ...
0
votes
1answer
27 views

Why can't resolve NaN in Selenium script?

I have recorded some functions using Selenium IDE and exported test into java file. I have used "wait for element visible" condition when performing action in order to assert a notification. ...
2
votes
2answers
19k views

How to use Run Keyword IF" in Robot Framework

I want to run Keyword if Element is visible. E.g I want to check that if a button is visible on the page then run particular Keyword. Below is my code. Create button is Keyword and want to run if ...
0
votes
1answer
147 views

“org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally” issue on jenkins(openshift) chrome node

I've been trying to run selenium codes over Jenkins (server/openshift). There is chrome node in the jenkins machine for Test Automation - Selenium. I'm getting this error: org.openqa.selenium....
2
votes
2answers
28k views

Verifying if an image Is displayed on a webpage

I have read that there is no "sure shot" way of knowing that an image is loaded or displayed on a webpage using Selenium. I want to know the reason behind it, as to why this is completely not possible....
-2
votes
0answers
36 views

How to Automate with selenium (payroll cloud based application) [on hold]

I'm new to the payroll application,is there any one who automated payroll application i would like ask that how to start up automation regarding selenium(java) .So what are the proceedings to be taken ...
0
votes
2answers
22 views

How to use assertion to compare both different size of the rows?

I want both size of the rows shouldn't be matched. int firstnum = 0; List<WebElement> preRoutlList = driver.findElements(By.xpath("//*[@id='txBottomTable']/table/tbody/tr")); ...
0
votes
1answer
58 views

How to read data from multiple excel sheets, where each sheet has Unique Column count - Selenium(Java) - Data Driven Framework [closed]

I am trying to get data from Excel from multiple sheets and assign variable to those data. (For my Data Driven Framework) I am successfully able to get the data, but while running the test, I am ...
0
votes
2answers
2k views
0
votes
1answer
26 views

How to read data from JSON file , Then Pass these values on web application form with the help of Xpath Locators and Then Write it in Excel file?

Steps : Can you suggest the approach or share some sample script 1.Read data from JSON file - Method to Provide Data (JsonReader.getdata) - Get file location & File Name 2.In @Test(...
0
votes
1answer
43 views

Able to find xpath, but trying to click button throws exception

I tried to click on an element using the code below but it is throwing Exception: No Such Element Selections WebElement clear=driver.findElement(By.xpath(PageUtility.OPEN_LOCATION_POPUP_XPATH)); ...
-2
votes
0answers
23 views

How to check that field is drop down or a text field. First find that filed by id or class then want to send data into that field [duplicate]

issue is that i have some custom fields and you are not sure that how many field may be there. Secondly your are not sure that field is drop down or text field. Third one is that a field may b ...
0
votes
2answers
5k views

Clicking a cell in a dynamic data table C# WebDriver

The HTML I'm trying working with is below, <div id="enquiry-header-grid-SalesTransactionEnquiry-enquiry-header-grid-wrapper" class="enquiry-kendo-grid-wrapper k-grid k-widget" data-role="grid" ...
0
votes
1answer
16 views

Adding Chrome extension in Selenium / Python / Ubuntu

I am having problems in adding extensions in Chrome before Selenium tests, using Python. On the code side, it's pretty simple: options = Options() options.add_extension(/path/to/extension) webdriver....
0
votes
1answer
371 views

calling TIS/TSM in non-main thread environment

macOS 10.14.3 Chrome 72.0.3626.96 Chromedriver 2.46 While trying to execute following code I receive an error: import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa....
2
votes
1answer
43 views

Unable to pass dynamic xpath in repository file?

My code is : for (int z = 0; z < rows.size(); z++) { rows.get(z).findElement(By.xpath("//*[@class='ng-scope'][" + (z + 1) + "]//*[@placeholder='Stop Name']")).sendKeys(shuttleObj.getStopArea()); ...
2
votes
1answer
1k views

Solution for Test Automation for web gis/mapping application?

I have to find a solution for test automation for webbased GIS/mapping application that is using OpenLayers 2.x or Leaflet as JavaScript libraries. I'm oriented on evaluate Selenium WebDriver (or ...
-1
votes
1answer
47 views

Access Denied when trying to automate the MakeMy trip website using Selenium

I am trying to automate the MakeMy trip website using Selenium Webdriver in Java with Google Chrome. My script is failing once I click on the Search button. Error message: Access Denied You don't ...
1
vote
1answer
28 views

unable to select desired element from the list populated with AutoSuggest Dropdown

On https://www.emirates.com/us/english/ site Departure Airport DropDown I am trying to select 3rd option Jakarta here by typing the keyword KAR but I am unable to do that. It types the keyword kar and ...
0
votes
2answers
333 views

How to click on the span type element in selenium?

<span class="tm-button-icon__label taLabel _flex"> <span class="tm-button-icon__text"> Demo </span> <span class="tm-button-icon__inner-description taOption"> ...
0
votes
1answer
52 views

Using FindBy in abstract class

I have couple of pages that have similar structure, similar elements. But selectors are different from the first tag. Example: Selector for the element on one page: @FindBy(xpath = "//picture-item//...