The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2answers
63 views

How do I select a random checkbox on the web page?

I have 3 checkboxes on the webpage. Each time, I want to select checkboxes randomly.
0
votes
1answer
42 views

Getting Stale element exception when iterating over a dropdown in Selenium

List<WebElement> dropdownlist = driver.findElements(By.xpath("//* [contains(@class,'mat-option ng-star-inserted')]//span")); int count = dropdownlist.size(); for (int j=0; j<=dropdownlist....
0
votes
2answers
48 views

How do I find total number of links on a web page using selenium and java 11?

package exsc; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.By; public class S1 { public static void main(String[] args) { ...
0
votes
3answers
220 views

Sharing static class variables data between two Selenium classes c#

I have two Selenium C# test case classes, ClassA and ClassB. I would like to reuse a static variable VarA, defined in another static non-test ClassC. After ClassA has made a change to the variable, I ...
0
votes
2answers
8k 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" ...
1
vote
0answers
35 views

Issue with switching to the new window in Selenium + Python (chromedriver)

I'm having an issue when I try to switch the new opened window. Every time I execute a test case, my chromedriver opens with a window named "data:,". My code: def test_case(self): reg = Register(...
0
votes
3answers
218 views

C# element not interactable

I am unable to click login form element below site: http://www.w-trading.co.kr/member/login.php? I try: driver.FindElement(By.XPath("//*[@id='memberId']")).SendKeys("my_id"); and driver....
1
vote
1answer
41 views

How to allow camera permission (OS level dialog) using Selenium RemoteWebDriver?

I have a PWA (which means essentially a webpage + serviceworker) that asks for the user's camera and location via getUserMedia and getCurrentPosition javascript calls. These calls create an OS level ...
1
vote
1answer
38 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 ...
68
votes
6answers
151k views

What is the correct way to select an <option> using Selenium's Python WebDriver

I would like to select an <option> child of a <select> using the Python WebDriver. I have a reference to the option WebElement I wish to select and have tried select() and click() methods ...
1
vote
3answers
869 views

how to automate KendoUI dropdown with selenium webdriver and C#

Cannot make it work, need help , I don't know how to automate KendoUI dropdown with Selenium using C#, Sendkeys doesn't work for KendoUI here is my HTML <div style="background-color: #e6e6e6; ...
-1
votes
2answers
45 views

Is there a better way of carrying out basic text and form validation instead of doing it at E2E?

My understanding of E2E tests is that we should be carrying out tests that run through the whole system to check if everything works together via Selenium (for a web application). However, I've seen ...
1
vote
4answers
2k views

Retrieving xpath from stored webelement variable

I am using page object model. Here is XPath that I have written for Heading of the page and stored it in the heading WebElement variable: @FindBy( xpath = "//div[@class='page-title category-title']") ...
0
votes
0answers
27 views

Using Selenium Webdriver Python Scripting file picker popup is not getting displayed using MACOS

Hi I have been trying to automate a page using Selenium Python on MACOS. And in one of the page there is a file picker popup that is supposed be displayed to upload files. Manually when running I get ...
0
votes
1answer
95 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//...
1
vote
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
86 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 ...
0
votes
3answers
500 views

Selenium Java WebDriver Can not Find Element with xpath

I've a question, how can I capture the xpath in the case below? I tried this: driver.findElement(By.xpath("//*[@id='L2_auto_8']/div/a[1]")); and I tried: driver.findElement(By.xpath(//a[@href='/...
0
votes
2answers
520 views

Unable to use firebug performance tester with Selenium

I would like to measure the performance of the functional testing. I was following the tutorial in the following link http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-...
0
votes
2answers
54 views

Not able to inspect one of the overlay which disappears in fraction of sec before page loads completely

Once i reset the password through selenium script the confirmation overlay page just remains for 2 sec which i`s not captured by selenium to inspect. Please suggest me how to capture/ignore that ...
1
vote
3answers
47 views

How to handle a messenger pop up which does not always appear?

Some times a messenger pop up comes up on application which is completely random. It may appear in any page and also not as soon as you land on a page. It may take a while to pop up. It is basically ...
0
votes
3answers
834 views

Selenium IDE type not saving text

I am trying to create an automation tool to test a salesforce platform. When I try to create a new form, the text is displayed but it's really just an injection from Javascript. Is there any way to ...
2
votes
2answers
1k views

What is the use of section in siteprism? Is it similar to page object model of selenium webdriver?

I have been doing selenium automation in C# for almost 1 year. I need to learn siteprism using capybara. When I was going through the documentation of siteprism i can't relate section with page ...
0
votes
0answers
32 views

Selenium: Capture DOM Elements Image

I have an API to capture the image of a particular element in DOM and return them. For that, I have a list of WebElements which needs to be captured into a single webpage. For that same, I have found ...
0
votes
1answer
2k views

PROTRACTOR: Right click on link and open in NEW TAB

TestCase: Right click on link element and open in NEW TAB or NEW WINDOW. I could able to right click on the element using the below code . BUT NOT SURE HOW TO SELECT THE OPTION OF "OPEN Link in NEW ...
0
votes
3answers
6k views

How to check the if statement whether the submit button exist or not?

package AddUser; import java.util.concurrent.TimeUnit; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium....
0
votes
1answer
425 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 ...
1
vote
1answer
68 views

How to improve element selector?

How can I improve this selector? WebElement ele2 = driver.findElement(By.xpath( "//*[@id=\"nav-flyout-shopAll\"]/div[3]/div[1]/div[1]/div/a[4]/span[1]" )); Thanks package SelenuimSession; import ...
16
votes
7answers
11k views

How to make selenium tests more stable?

I am using selenium tests to perform GUI-based system tests of non-public scientific use cases. Although I have build more-or-less a complete wrapper around the selenium module with functions to ...
0
votes
1answer
46 views

Teardown of Multiple Threaded Tests with Selenium

I'm trying to run multiple test cases with Nunit in C# in which every test needs its own Selenium Chrome Driver. Before it was threaded, I handled the chrome driver with [Setup] and [Teardown] like ...
4
votes
2answers
380 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 ...
0
votes
1answer
1k views

logger cannot be resolved to a type

package automationTester; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import java.util.logging.Logger; public class ...
0
votes
1answer
730 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
11k 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
279 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?
3
votes
3answers
10k views

Unable to switch to frame which is inside an iframe

I am unable to locate a frame inside an iframe. I have attached the screenshot of the html page. I am able to locate iframe 'content' by xpath //div[@id='pageContentDiv']//iframe which I verified in ...
0
votes
1answer
64 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
1k 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 ...
0
votes
1answer
96 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"); ...
0
votes
0answers
26 views

Driver does not recognize pop-up's - can not switch

In years it is the first time I saw something like this, when I do a: config.getWebDriver().getWindowHandles().size() The result is always 1, but in fact, there is a main window opened and after a ...
0
votes
2answers
1k views

Selenium WebDriver statement is skipping after ajax call

Selenium WebDriver statement is skipping after ajax call for example if we use hotmail signup and want to check whether email is available or not I input the text and on lost focus hotmail return a ...
0
votes
0answers
32 views

Verifying that a pdf is correctly displayed

I have created scripts in new relic synthetics that verify the web application is still behaving correctly. This script does the following things: go to the specific page click on a pdf link ...
7
votes
4answers
139 views

Testing Real World Objects - Interview

I have a Junior QA interview coming up, and I was asked to learn the basics of Selenium. I have done this through free tutorials. I am fine with the Selenium concepts, but I was told I would be asked ...
0
votes
2answers
2k views

Type mismatch: cannot convert from ChromeDriver to WebDriver

I am getting the following Exception: Exception in thread "main" java.lang.Error: Unresolved compilation problems: Type mismatch: cannot convert from ChromeDriver to WebDriver The method get(...
0
votes
4answers
1k views

Gecko Driver not navigating to URL

i am having a funny issue with my gecko driver. The browser loads however it does not redirect to the URL as stated below. Dim fireDriver As New FireFoxDriver(New FireFoxOptions() With {....