Questions tagged [selenium-webdriver]

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

2
votes
3answers
974 views

How to get Selenium 3.0.1 to work on a Mac with IntelliJ

I am using a Mac as well as IntelliJ. I am trying to update Selenium from 2.53 as the website I am testing has functions that no longer work with older versions of Firefox (version 46). I am trying to ...
0
votes
1answer
273 views

How to pass data from XML file in Selenium?

How to pass data from XML file into application and I'm using page object model with page factory. Code: public class LoginPage extends BaseClass { @FindBy(id="EmailAddress") WebElement ...
1
vote
1answer
110 views

Scraping through selenium : unable to locate element

After feeding the search bar with "Safety" keyword, I am trying to get to the page associated with this link_text. But error unable to find element is coming. from selenium import webdriver import ...
0
votes
1answer
50 views

How To do update/edit on selenium script got in JAR file format from other location

I have a Runnable JAR file of selenium script forwarded from other location, now I want to use that same script for my project with some minor updates. How to do that? Can we open that in Eclipse and ...
0
votes
1answer
47 views

I am unable to identify element of edit text in table

I am unable to identify element. please find my below code. WebElement editorFrame = dr.findElement(By.id("1536219451331-0-uiGrid-000L-cell"));
0
votes
0answers
11 views

Error shown when trying to put dropdown list values onto Excel sheet using Selenium WebDriver & Apache POI

Scenario :- I have an HTML File that contains a drop down list containing some values in it. I need to add the values of dropdown list onto Excel sheet using Selenium Apache POI. I have written ...
0
votes
1answer
38 views

How I can calculate the sum of items that are stored in main Id and then sub_id in that main Id

Look at the image here you can see the Dom that how its showing one main div with ID and then item are there in that div. I have to calculate all the items on a page that are shown to user. These ...
1
vote
0answers
27 views

Is there an argument for chromedriver to accept notifications?

I am using Nightwatch to run my chromedriver, and I need to accept notifications through the browser. I have found this list of chromedriver arguments, but I haven't been able to find any that ...
-1
votes
1answer
39 views

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

I'm looking for a different way to close an alert message other than accept() or dismiss() methods. How can I close an alert message by entering action through the keyboard?
1
vote
0answers
26 views
-1
votes
2answers
41 views

Either its possible to get and show a value from front end in selenium Java. If so, then how I can do this

I am testing a website and I need to perform some action on the basis of Price. It is showing price in Remaining Budget. I want to check the remaining budget and then on the basis of it want to ...
0
votes
0answers
20 views

Extent Report : [TestNG] Reporter x.x.ExtentReportListener.ExtentReport@afc191 failed java.lang.NullPointerException

Getting nullPointer exception in extent report . Help me on this issue unable to trace the root cause Using extent report 2.41.0 Here is the my log: [TestNG] Reporter com.psiexams.base....
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
2answers
3k 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"...
0
votes
1answer
60 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....
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 ...
1
vote
2answers
93 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
300 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 ...
1
vote
2answers
87 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
180 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
40 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
1answer
40 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
39 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
68 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
62 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
36 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 ...
6
votes
4answers
9k 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
727 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
11k 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
36 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
30 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
20k 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
286 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
29k 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....
0
votes
2answers
24 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
2answers
2k views

Howto use the Firefox browser in headless mode with Selenium

How do I open a Firefox browser in headless mode using Selenium ?
0
votes
1answer
29 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
2answers
6k 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
21 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....
2
votes
1answer
44 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
88 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
31 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
512 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
57 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//...
0
votes
2answers
1k views

Is it possible to call one custom keyword function from another Custom keywords from katalon Automation Tool?

I am trying to call method from one custom keywords to another Custom keywords functions But I am getting below error, 05-30-2018 02:59:02 PM - [START] - Start action : ...
0
votes
1answer
51 views

Selenium code generates error messages the likes of CS0246 & CS0103

I am getting lots of CS0246 Code error messages in Visual Studio after trying to run the Selenium code below. I have chosen the ASP.Net Core file to programme the code in. The file is called ...