2022 Developer Survey is open! Take survey.

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
12 votes
7 answers
88k views

Is it possible to stop page loading on the browser using selenium web-driver?

I searched online, but couldn't find anything about how to stop page loading over a browser using selenium web-driver. Any idea for the same?
0 votes
2 answers
4k views

Use Selenium to select an option from an Input element with multi-select drop-down

I am getting this error message when trying to select a drop-down value: UnexpectedTagNameException with message 'Element should have been "select" but was "input" error' The ...
1 vote
1 answer
3k views

Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with css selector ==

When I am trying to run the below mentioned Selenium web driver code in IE 11 browser, I get below error: Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable ...
0 votes
1 answer
114 views

Is it a good design to use a single Webdriver instance in Base Class and then each Page Object class inherits the driver instance in Cucumber Steps?

Im using Cucumber BDD framework with Selenium+Java. Now, I have made on BaseClass.Java in which i declare on public static WebDriver driver; Now, in my .feature file i have many scenarios and in each ...
0 votes
3 answers
889 views

Getting error : NoSuchElementException - Unable to locate element with ID attribute

I am running this code: from selenium import webdriver from `selenium.webdriver.firefox.options` import Options Setup: options = Options() options.add_argument("--headless") def get_results(...
0 votes
2 answers
87 views

How to run java+selenium method continuously

Simply, There is a functionality like in sometimes one of modal pops up and there is a button on it. if the modal pops up user need to click on that button. this is continuous process and need to ...
0 votes
3 answers
462 views

Selenium - How to remove &nbsp from my text value

I am trying to use this xpath to find the number of elements that have a value between X and Y. The problem I am facing is since there is &nbsp in the HTML, and the code doesn't detect the text ...
0 votes
1 answer
486 views

Exception in thread "main" java.lang.Error: Unresolved compilation problems [closed]

I'm new to selenium. I installed all the required Jars, but at the end when I run the script to see if it works, I got an error message. Please help. Code: import org.openqa.selenium.WebDriver; ...
1 vote
2 answers
1k views

Click getting to lower item (under dropdown) instead of dropdown in Selenium

I m trying to click on the dropdown menu item and i am able to select the dropdown and the menu item but instead of clicking on item the click is going to the element right under it. Before the ...
1 vote
2 answers
111 views

Strange drop down automation problem - multiple select

I've tried for days to figure this one out. I have a selector that I can't figure out. It seems to be a regular select statement with multiple options but when clicking one option directly it ...
0 votes
2 answers
49 views

can we test GUI and a network protocol (SNMP) using selenium?

I have to test a website using Selenium. This website is a graphical user interface for controlling a device and to shows data from that device. This device is using SNMP which is used to give an ...
0 votes
1 answer
3k views

Unable to create new service - Selenium + Jenkins

I have an error in my Jenkins + Selenium integration, the Selenium Grid Version is 3.7.1 (Installed by default for the Jenkins Selenium Plugin). I'm using the last chromedriver version. When I run my ...
-1 votes
3 answers
64 views

Not able to select value from drop down menu

https://demo.guru99.com/test/newtours/register.php I was trying to automate the drop down country menu on this page but am unable to select any value from the drop down. Eclipse is throwing the ...
0 votes
2 answers
54 views

Unable to capture the element using xpath

I'm trying to capture the dynamic code using xpath(Selenium+Java). I want to get that code and store it in a variable, but it always returns no such element exception. My xpath looks like below when ...
2 votes
3 answers
699 views

Close a one windowHandler at the Webview

I am writing scripts to automate a hybrid application. On my app I have two windowHandles. For example, after performing some actions when I execute below code I get "2" windows as the windowHandles ...
0 votes
2 answers
1k views

While reading repository properties file getting error response as: The method click() is undefined for the type Object

Code isn't able to read Properties file. It returns validation error message in response; The method click() is undefined for the type Object Properties obj = new Properties(); FileInputStream ...
0 votes
1 answer
301 views

Firefox throws an error message through WebDriverManager

Firefox is mostly working, but the last test case failed - it won't click on an element. unable to read VR Path Registry is the error message. In Internet Explorer, it loads the browser, sometimes ...
0 votes
0 answers
105 views

Is it possible to automate electron applications with RobotFramework Browser library?

I am currently using selenium and python to launch and access elements from an electron application. I've used RobotFramework Browser (rfbrowser) library to automate angular webpages previously and I ...
0 votes
2 answers
77 views

how to add "\n" to the method

I have the below method: PUBLIC methodname(WebDriver driver,formEntryMap<String,String>,String Colkey) { String Xpath = This will have the xpath of the input text box inputfieldEntry(driver,...
0 votes
2 answers
601 views

How to maximize browser window irrespective of windows versions

I have some scripts which are running on Firefox browser. Here, the problem was, I am using driver.manage().window().maximize(); code to maximize the browser. It is working perfectly fine with Windows ...
1 vote
1 answer
533 views

How can I enable variations in Chrome from chromedriver options?

How can I enable variations in Chrome from chromedriver options? Hello, I'm facing a problem with Chrome where when I run an automated UI test with chromedriver, there's issues showing up (such as ...
1 vote
3 answers
2k views

[Selenium + Java]: How to handle tooltip on onmouseover?

The test case is to check if the tooltip message shows. My html code is as: <td id="pendingBalance" align="right"> <a onmouseover="displayHelpPopup(this,arrHelp[20][0]...
1 vote
2 answers
2k views

To work with two different drop downs which are dependent on each other

I have a scenario, which I am finding bit difficult to automate. The test scenario is : There are two drop down. To select the state. To select the respective cities. So, I need to write a script to ...
-1 votes
0 answers
12 views

How to use arrays while automating dynamic webtables?

I can write program to print total number of rows/columns and data present in each cells of dynamic Webtable. But how to use arrays while automating dynamic webtables? I am using Selenium tool with ...
1 vote
1 answer
10k views

How do I enable ChromeDriver to use browser cache or local storage with selenium python

I was trying to automate a website and it's a PWA. I need the caching data for this site as it takes too long to load, once loaded it's pretty fast. But every time I run my scripts chrome starts a new ...
1 vote
2 answers
278 views

Finding dropdown name where only the first word matches given string using Selenium

I am trying to match the first word in a drop down list with a given string. What is happening is when I am creating a new drop-down name, it is getting updated by some different name, though the ...
0 votes
0 answers
27 views

SwitchTo method in WebDriver Interface

In the WebDriver interface(Javadoc) we have method SwitchTo and its type is WebDriver.TargetLocator, but when clicked on WebDriver.TargetLocator interface, in that interface SwitchTo method is not ...
0 votes
3 answers
105 views

How to get text of <span> based on the <p>?

How do I find the element with text "Jessica" based on "3000" displaying in the web page using xpath? I'm getting ...not a valid xpath error. <div> <span><b>...
2 votes
2 answers
1k views

Logging js console when doing selenium test using firefox driver

I'm writing selenium tests which are launch on the firefox (gecko) driver. If a test fails, I want to retrieve the log present on the firefox js console. In order to do that, I have added the ...
0 votes
2 answers
478 views

Selenium driver for web app testing on chrome in incognito windows

So I am trying to use a selenium web driver extension on chrome to record a web application test on a chrome browser that is in an incognito mode. How do you run a test on a web application in an ...
0 votes
2 answers
1k views

Finding sibling of found element using selenium

I've got a field with a date in it that's identified by a code that's shown in the div previous to it. <div class="fcode"> <div class="fcode_n">(123)</div> ...
0 votes
1 answer
24 views

How to make the WebDriverWait.Until() method to NOT whitelist the NoSuchElementException

I am using the WebDriverWait.Until() method in my script to wait for an element to disappear from the UI. For this, there is the ExpectedConditions class and I could have used its ...
0 votes
1 answer
371 views

Selenium + Python: how can we close all opened tabs except the first tab/main tab?

This is my code, ''' import time from selenium.webdriver.common.by import By from selenium.webdriver import ActionChains from selenium.webdriver.support import expected_conditions as EC ...
0 votes
3 answers
45 views

Is there a way to record a video of my Selenium automation with Python?

I'd like to have video recordings of the Selenium automation at work. And then delete the recording when the tests pass. This way whenever the tests fail we can quickly replay the video to see what ...
0 votes
1 answer
6k views

App is launched but not able to perform further actions (App automation using appium)

I am new in mobile app automation I have successfully launched Google Playstore application in my android device. but,i can not click on next tab "GAMES". My Code package com.automate.app....
0 votes
1 answer
21 views

Can we write a part of a test with Selenium IDE and the other part with WebDriver and combine the two into one test?

I am new to selenium and am wondering if we can combine both Selenium IDE and WebDriver and write one test. What I mean to ask is, can we use Selenium IDE for the easy tasks that we want to test and ...
0 votes
1 answer
35 views

ScreenShot taken isn't of what's showing in the screen, but rather that of the header until a page size

When I try to take a screenshot, I added a scroll so that it can take a significant screenshot and not only the header. Right now, the picture is still taken from the header/top of the page. Am I ...
1 vote
1 answer
151 views

Unable to run test on gitlab pipeline due to DevToolsActivePort file doesn't exist

I created a sample Selenium Webdriver test using java and maven and pushed it out to my gitlab repository. Then I created a new pipeline to run the automated tests. This is my first time running a ...
2 votes
8 answers
85k views

How to close pop up window in Selenium webdriver?

Below is my Selenium Webdriver script. When I run this script my website is opened but the popup window is also opened. How do I close this popup window so the script can continue? Take a look on ...
9 votes
1 answer
440 views

Building trust in automated front-end testing

I recently came across a Google Tech Talk during which the speakers seemed to stress, that trust in a test suite is crucial to the overall software development process. Here the link. Can anyone share ...
2 votes
1 answer
169 views

How do we generate load in the queue using selenium?

We are trying to generate videos (video streaming via Youtube URL's) in the queue. Some of the users will be watching the videos in FIFO Format so we would like to know the process where we can push ...
0 votes
3 answers
7k views

How to integrate/merge multiple extent reports into one single report using selenium, extent report v3xx

I am running selenium scripts using jenkins jobs/multijob and its creating multiple html reports for different modules. How can we combine/merge all html reports to one single report? Extent report ...
0 votes
0 answers
15 views

How to handle elements inside JavaScript function? There is no elements\xpath..but in UI we login

I have a scenario where when I click the login button, it opens a display (with email & password). But when I try to inspect those text boxes, it shows me the below code. How can I sendkeys to ...
1 vote
3 answers
6k views

How to upload an image selenium webdriver with javascript?

driver.wait(until.elementLocated(webdriver.By.css('div.border-right:nth-child(2)')), 1000) .then((element) => { element.click(); }); I am using java-script for my test cases. I had an issue to ...
1 vote
1 answer
5k views

java.lang.NullPointerException on driver line of the code

I am new to selenium, can someone help on the below issue. I am using page object model Page code: package pages; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import ...
0 votes
1 answer
53 views

Compilation stuck at find element by xpath without giving any error

I'm trying to automate a project using selenium page object model. Below is the html code <div class="type-1 overflow-hidden card"><div class="col-xl-8 offset-xl-2">&...
0 votes
1 answer
24 views

Button element found but click() action not performed

I am trying to verify close button using selenium java page object model. Close button is located in a pop up window. Below is the html code for the button. <div class="...
0 votes
1 answer
57 views

Calculate the total of liabilities and check it is matching with the given value

I want to calculate the total liabilities amount from webtable and need to compare with the total amount which is present on webpage. I got the following error : Illegal/unsupported escape sequence ...
0 votes
1 answer
321 views

Not able to add Bug from Testlink to JIRA (Required Version Number)

I have Integrated JIRA from testlink using REST API. I was also able to link the failed testcase to a bug in JIRA. But while trying to create issue in testlink there is a validation happening for ...
1 vote
1 answer
608 views

Exception generated after exporting code as runnable jar

D:\RhythmFileDownload>java -jar fileDownload.jar Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b port 36946 Only local connections are allowed. Apr 03, 2017 6:14:23 PM ...

1
2 3 4 5
98