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
51 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
0answers
32 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
2answers
47 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 ...
0
votes
1answer
108 views

How to Allow notification permission for desktop-notifications in Chrome Browser using python scripting

Hi i have been trying to automate a page using Selenium Python. And in one of the page it requires the user to grant permission for mic & cam. I have written the code for the same using the ...
1
vote
1answer
53 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
59 views

Selenium WebDriver document.getElementById instead of send_keys

I have the following code driver.find_element_by_id("Element_ID").send_keys(str(sheet.cell(row=r, column=2).value)) Values is taken from excel, but instead send_keys, I want to use document....
0
votes
1answer
44 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 ...
4
votes
2answers
493 views

Using Python Selenium Not able to perform click operation

I am automating for the following page on CHROME Browser https://study.yupl.us/studies/5d5a64aa8b5bb92fb776753b?auth=false Here I'm able to identify the unique element from the console for the XPATH ...
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
1answer
54 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 ...
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
1answer
56 views

Verifying that a pdf is correctly displayed using new relic synthetics [duplicate]

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 ...
1
vote
1answer
70 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 ...
2
votes
1answer
52 views

Selenium python checkbox by span class

I have an issue with checkbox check in selenium python, I want to make not exact xpath, but something like I did earlier in the code : browser.find_element_by_xpath(".//span[contains(text(), 'Dalej')]"...
0
votes
1answer
51 views

How to run script continuously in selenium even Assertion is fail or Pass

I have scenario, in Excel file in first column having 3 URL. And with help of for loop i am able to launch first URL and trying to find whether single image is getting displayed or not. But in ...
-1
votes
2answers
36 views

Can anyone explain use of Driver Factory and its implementation to get parallel browser at same time?

When do we need to create a Driver Factory ? What advantages do we get over regular initialisation of driver when we use driver factory approach. Also how to initiate parallel browser testing using ...
3
votes
2answers
65 views

Success rate of “click” actions with Selenium? (Relatively)

I've used a tool called Ranorex for my test automation projects, and it has an annoying issue with click actions: They are not stable. A click on any element can be missed at any time, even when the ...
-1
votes
1answer
38 views

Turning off captcha in selenium [duplicate]

i want to get rid of filling a query form on daily basis and want to automate it. But it is having captcha and i want to turn off captcha so that i can automate form using selenium webdriver using ...
3
votes
1answer
80 views

Launch web driver without instaling it?

I was trying to launch a PhantomJS browser and it works on Azure VM. (I just point the PhantomJS.exe and it works) Then I try to launch a google web-driver and its asking me to locate the google ...
0
votes
1answer
29 views

Advice or articles about unit testing page objects and related UI test infrastructure code

Does anyone write unit tests for page objects and related UI test infrastructure? If so, what suggestions do you have for designing those unit tests? Do you mock WebDriver instances, or take another ...
-1
votes
1answer
15 views

The navigator does not take the url that I indicate to him using Selenium on Python

everyone. First, excuse me for my bad English. I will try to go a specific URL but just the browser its open. This is my code 1 file: from selenium import webdriver class Objects: def __init__(...
0
votes
1answer
61 views

I`m using Selenium, is there any way i could reduce the time taken to continue the script if the element is not available?

If the element is found it takes only around 3 seconds to move to the next code, but the script takes around 2.5 min to execute the steps if the element is not available. Is there any way that I could ...
0
votes
0answers
12 views

PackageRelationshipCollection issue in selenium

Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.apache.poi.util.POILogger.log(ILjava/lang/Object;)V from class org.apache.poi.openxml4j.opc....
-1
votes
1answer
50 views

Extent reports issue in maven project

I am using extent reports in my project but it is showing me error and I am not getting solution for this error: [RemoteTestNG] detected TestNG version 6.14.3 Starting ChromeDriver 75.0.3770.140 (...
1
vote
1answer
128 views

I need my selenium webdriver to wait a bit more, but don't want to add an explicit wait

I'm trying to send keys to an input box that is displayed within a dialog. The problem is that sometimes I get only the last few letters of my text, because the send_keys is sending them too fast. I'...
0
votes
1answer
20 views

Selenium to test Dygraphs

Is it possible to use selenium(C# bindings) to write automated tests for testing Dygraph charts? If selenium does not support this? Are there any other tools which can be used? http://dygraphs.com/ ...
0
votes
1answer
27 views

How to click on the menu buttons in tinymce editor using selenium

I need to click on Insert menu in the tiny mce editor , i have switched to frame and was able to enter text in it but couldn't perform any click action on the menu. Any help is much appreciated
-1
votes
3answers
75 views

Selenium exception: element not intractable

WebDriverWait wait = new WebDriverWait(driver, 30); WebElement button = wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.xpath("(//div[contains(@class,'...
0
votes
1answer
15 views

How to identify java script variable change in selenium C#

As on the below I’m having a HTML page where it change the variable value at the run time. So the java script is to change the isrendered variable to true after 10 seconds. Even after I inspect the ...
2
votes
0answers
115 views

How to get text from span that is not in Latin Alphabet? [closed]

I'm having difficulty getting text between span tags. The problem is that the said text is not written in Latin Alphabet. I have no problems using UTF text as part of xpath locator. My xpath looks ...
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
1answer
85 views

Unable to launch Firefox driver using selenium

I'm getting error like Exception in thread main java. NoClassDefFoundError:com/google/common/collect/immutableMap and above are the full screen shots:
1
vote
2answers
62 views

Tests fail when triggered through jenkins

I have upgraded my test suite to latest selenium,Firefox and gekodriver. When I run the tests locally they work fine, when I run them on a remote box executing the command in remote box they work fine....
0
votes
2answers
42 views

Cucumber sentence autocomplete

I have a difficulty with writing Cucumber tests. The re-usability of the Cucumber sentences is not consistent - I would like to avoid code duplication when creating sentences and methods glued to the ...
1
vote
0answers
34 views

Issue with parallel testing in pytest

So I have two test cases in a map. From command prompt I type "pytest -n 2" then hit Enter. Instead of opening two browsers and execute them in parallel, pytest is opening 4 browsers, but only two of ...
-1
votes
1answer
31 views

Can I use this library for Junit?

I put this library: import org.apache.commons.io.FileUtils; but it sends an error The import org.apache.commons.io cannot be resolved what library is equivalent exist for Junit?
0
votes
1answer
105 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 ...
0
votes
1answer
33 views

gitignore of Selenium WebDriver TestNG

For selenium webdriver testng using git, what should be part of gitignore so my scripts can run on any computer without any conflict. Thanks!
0
votes
1answer
76 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
3answers
64 views

How to find the Xpath of <Td> tag from text which lie under <a> tag of that <td> in selenium c#

I have to find text on a page, which I did. Now I need to find the xpath of the <td> element containing that text so that I can use the <td> xpath to find other elements like the image ...
-2
votes
2answers
49 views

How to make a test fail if driver takes long time to look for an element. I am not sure which elements will throw this exception

I am not sure which elements will throw this exception.In general is there any method other than providing - a page load time out , implicit, explicit or frequent wait for a particular element .
-1
votes
1answer
54 views

How to i find the count of check boxes is selected?

In the UI there are 50 check boxes. If I selected 20 check boxes. How to I find count of 20 is selected?
0
votes
1answer
39 views

How to add and remove line from notepad file using selenium

Need code to add and remove lines from notepad file using selenium in java. I have to do some more operations on notepad but add and remove will be helpful.
0
votes
1answer
29 views

See Test Steps in Python when using selenium

I'm converting some manual tests to Python and using Selenium to test them. Currently the manual steps are written like to: Requirement 1 - Can add new person, if none exists Step 1 - Search for ...
0
votes
1answer
38 views

How to specify target in the TakesScreenshot interface's getScreenshotAs method

On reading the Java documentation of TakesScreenshot interface, it was observed that the method syntax and description for getScreenshotAs are: getScreenshotAs(OutputType<X> target) ...
0
votes
2answers
94 views

Robotframework installation - keyword not found error

I have set up robotframework on my machine and I have installed all necessary plugin and using Pycharm as IDE. But I am getting keyword not found error and also SeleniumLibrary library which I have ...
-1
votes
1answer
22 views

Not able to execute Selenium maven automation project using Eclipse Run as “Maven Test”

When i execute my selenium java project using maven test its not executing. its showing me error. Its execute properly when i execute through TestNG.xml file. But its showing error when execute it ...
0
votes
0answers
34 views

Which language has more libraries and bindings for Selenium WebDriver? Java or Python?

This question might sound repeated. I have searched Stack exchange and found many questions by users who ask mainly on which language they should choose for Selenium WD: Java or Python? But their ...
-1
votes
1answer
42 views

How to validate test logic for date dropdown?

I have a close date field where the date is already populated, and a date creation field which is the actual activity creation date and the logic I want to validate is below - Validate that the ...
0
votes
2answers
57 views

Unable to select <li> element from a <ul> list

How do I select a "li" element from a "ul" tag list? This is my current code vtenants.VT_USDelselectfld.Click(); //Clicks field to display the dropdown Thread.Sleep(500); IList<IWebElement> ...