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
0
votes
1answer
41 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
44 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
47 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
69 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
64 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
37 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 ...
5
votes
3answers
733 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
37 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
32 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
425 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
30k 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
38 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
7k 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
22 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
45 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
2k 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
171 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
694 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
67 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
58 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 ...
2
votes
4answers
269 views

Replacement of @Findby in pagefactory for dynamic value with locator

I like to use POM pattern with page factory and in fact I have been using it since long in my various automation frameworks. Some time I am facing issue where I have to write text based xpaths in ...
1
vote
1answer
62 views

Click the last but one checkbox

In a page there are n number of checkboxes. Each time the page refreshes the list of checkboxes will also be refreshed and can be a different size. How do I click the second last (last but one) ...
0
votes
1answer
27 views

Compilation error when extending class and defining a method

I am getting compilation error when I am extending Loginpage class through Loginbusiness, define a method but compilation throws an error to remove illegal identifiers(eg. public) and also for ...
0
votes
0answers
45 views

Code can't be executed after running click method

After being run click function , i don't know why but the next sendKeys function can't be executed. eclipse is getting stuck and after a while, i'm facing with "timeout waiting for page to load" error....
0
votes
4answers
7k views

Can I execute selenium test cases in a real browser through jenkins without grid

Am executing Selenium test cases from Jenkins locally but execution is happening in back-end am not able to see the browser launch and close. Is it possible to see the execution when I trigger from ...
2
votes
1answer
74 views

How to explicity fail e2e tests on unexpected behavior?

I am currently using protractor but the idea would be similar for any flavor of Selenium. Right now, depending on which step the test is on, my current framework will wait for elements to be ...
0
votes
1answer
50 views

Selenium. Chrome v74. Freezing after cookies deletion

After updating Chrome to 74.0.3729.131, problems are appeared. Using webdrivermanager 3.4.0 for managing chromedriver. public class UiTestBase { public static WebDriver driver = null; public ...
0
votes
1answer
66 views

How to deal with ui-sref in Selenium

The Context: I'm using selenium in java to click on a link to navigate to the other page of the application. The Problem: The application is made in angular-js wherein I tried to click on the Link,...
0
votes
1answer
411 views

Automation testing for check-point image on map using sikuli(Java)

I am doing Automation Testing for the map. On the map, there are number of check-points or way-points (image.png) are present. I want to compare two images, one is saved in the folder and another is ...
4
votes
2answers
364 views

Tomcat Server when used amongst Selenium Grid setup

We are using a different style of Automation framework in our project (as per client request) wherein we have designed a JSP page and this page contains links and buttons through which each ...
2
votes
4answers
624 views

Cucumber : Is it necessary to create multiple step defination class for single feature with multiple scenarios?

I have created one feature file which has 4 scenarios. Do I need to create 4 step definitions or only 1? If 1 then is it ok to have multiple @Given, @When and @Then in one step definition?
1
vote
1answer
477 views

Can websites block selenium sendKeys() function?

I've been using selenium to autofill credit card information for certain websites. I use ChromeDriver and it had been working fine, but yesterday it seems like the website I had been using blocked ...
0
votes
1answer
455 views

Selenium OnClick identify button C#

How to identify this button in C#: <button class="reward_link_redeem_button_style" onclick="RedeemRPProduct('free_points_1')">REDEEM</button> <button class="...
0
votes
2answers
10k views

Selenium IE Webdriver showing “Only Local connection are allowed” in TestNG

I am trying to launch my application in IE browser in selenium using TestNG framework. But, after the IE browser is launched, the Eclipse console shows an error that "Only Local Connection are allowed"...
0
votes
1answer
222 views

Can we Verify Contents on the browser PDF print in Selenium Webdriver?

I need to verify PDF contents, when I click on pdf print button on web page, it displays PDF to print. How can I verify? Is it possible?
0
votes
1answer
52 views

Unable to locate a search suggestion element Selenium C#

Hi, I am trying to locate and click on the element that comes up in the search box when I type some name. Can someone please help me out to find & click on the name? I've use searching by XPath - ...
2
votes
2answers
981 views

Unable to enter text in windows dialog box in remote machine [Using Robot class]

In a test case, I need to enter a file path in the Windows dialog box which in turn uploads the file in the specific location. I used Robot class to handle this. Issue: It works seamlessly in local ...
2
votes
2answers
64 views

Link accessed thru selenium works in Chrome but not in IE?

I have encountered an issue for UI elements on IE browser. The link doesn’t respond to Selenium click commands. The same commands works fine on chrome browser. I have used Actions also, but same ...
0
votes
1answer
85 views

Unable to get text of an element

I have selenium Test case to validate contents of 2 web pages. The issue, I am facing is I'm not able to get anything from element.getText(). I'm using below code. driver1.get("https://some url"); ...
4
votes
2answers
7k views

How to move the slider at specific position in selenium

I have a slider with min range is 0 and max range is 17; if I want to move the slider to specific position say, @10, how to do? I am using offset but it is not moving to specific position. Below is ...