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
4
votes
6answers
8k views

How to run same test case of testng on 100 different URL/Domain?

I have one difficult scenario for automation testing. I want to run one test cases for 100 different URLs/Domain. Precondition : Script is generalize and running individuality properly. Use of ...
0
votes
0answers
25 views

Get list of all hover menus and and their all nested hover menus using selenium

@Test public void MedicineList() throws InterruptedException { driver.get(sitedata.getProperty("Medication_url")); WebElement mainmenu = isElementPresentt("dog_xpath"); ...
7
votes
3answers
1k views

What to look for in code reviews / pull requests?

Are there any standard set of things that one should look for during Code Reviews / Pull Requests ? Are there also particular ones for automation vs application code and/or for UI automation (using ...
2
votes
1answer
95 views

Selenium's execution time increases if a web element is absent on a web page

I have a table on my web page I am trying to automation that contains x number of rows (tr)s and under each (tr), there are a varying number of (td)s. In my flow, I have to check for the existence of ...
8
votes
11answers
80k views

Selenium test case fails due to page load time

I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever i feel it takes more time to load....
0
votes
2answers
18 views

detect new element in html using selenium, python

is it possible to detect in selenium, that new dynamic element added in html msg_box = driver.find_element_by_class_name('_3u328') msg_box.send_keys('---') button = driver....
0
votes
7answers
93 views

How to handle changing absolute XPath?

/html/body/div/main/div/div/div[2]/div/div/div/div[1]/div/div***[4]***/div/div[2] The div[4] element keeps changing. If a new item comes into the web, the div number changes. How do I handle this?
0
votes
4answers
65 views

Locate Element using selenium

I am trying to locate an element to click in order to Sign In , not able to succeed. I tried the below steps, Click Element class=mat-raised-button mat-accent Click Element class=mat-focus-...
0
votes
3answers
67 views

Unable to click on 'sign out' link

I am trying to click on sign out link, but not able to succeed: I tried the below ways, Click Element class=mat-icon.notranslate.mat-primary.material-icons Click Button name=Sign Out Click ...
1
vote
3answers
53 views

What is the use of Maven in Selenium WebDriver Automation Project?

Do we use Maven only to create dependencies in pom.xml file? Isn't there any other use of Maven in selenium project?
1
vote
2answers
58 views

How can I get this 'Version: 0.1.0 - 94" value from the <div> tag in selenium webdriver?

How can I get this Version: 0.1.0 - 94 value from the <div> tag in selenium webdriver? and here is my code: <div _ngcontent-qbk-c3="" style="text-align: center;">Version: 0.1.0 - 94</...
-3
votes
3answers
45 views

what is the difference between //span and //*?

I am learning selenium Xpath. what are the different ways of Xpath ? what is the difference between //span and//*?
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
3answers
11k views

Order of execution for Tests in TestNg, If Priority set only for few Test Methods

I have three methods as mentioned below, two with priority ( 0 , 1 ) and third method(Test) with no priority attribute. What is the order of execution. Code snippet given below.. @Test(priority = 1) ...
0
votes
1answer
43 views

Issue in displaying webpage in IE11 in selenium webdriver

I am able to input the username, the password, and then click on the login button, but after clicking on the login button it displays nothing on webpage in IE11 but works fine with Chrome and Firefox. ...
1
vote
1answer
54 views

Keyboard ArrowDown in listbox using Selenium with C#

I'm working in selenium c# automation, I'm trying to traverse down in list box values. <ul> and <li>. I have tried many options in trial and error. The kind of code I'm trying to use is ...
0
votes
1answer
72 views

How to run my selenium runnable jar in a different machine without driver files

I am trying to export my project as a runnable jar and run it without driver.exe files being present. I tried incorporating them with below code to make it independent but still unable to run the jar ...
-2
votes
0answers
17 views
0
votes
3answers
83 views

Exception in thread “main” java.lang.IllegalStateException: The driver executable does not exist: C:\Selenium\chromedriver_win32.exe

package com.selenium; import org.openqa.selenium.*; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class MySelenium { public static void main(String[...
22
votes
8answers
387k views

How to find element using contains in xpath

Can anyone please help me how to use contains in my xpath? My xpath changes all the time when users are added, so I can't find element using xpath. This is my xpath: .//*[@id='contentText']/table/...
0
votes
2answers
45 views

Avoid default selection when selecting random value from dropdown

I have a method below that selects a random item from a dropdown list. This works well mostly, but on occasion it will reselect the default option which is usually "Please Select" or a blank value. ...
5
votes
4answers
1k views

When and how to do regression testing?

I am learning selenium. I am trying to get into more and more automation. Scenario (example): We are working in agile 2 week sprints. We have a release after every 3 sprints. In our framework we ...
0
votes
1answer
41 views

Python Selenium - How to give 100 comma separated list values to selenium send keys?

sheet1 = client.open_by_url("https://docs.googlesheet")-- using google sheet here sh = sheet1.worksheet("Sheet1") dera = gd.get_as_dataframe(sh1,evaluate_formulas = True,skiprows = 0,has_header = ...
0
votes
1answer
1k views

Unable to read data from excel in selenium POM pattern

I am keeping my data in excel file and read the data from there, because of avoid hard code.. Page public void fielding(String field,String dist,String velo,String diff) { enterFielding.sendKeys(...
-1
votes
3answers
104 views

Selenium automation interview preperation question [closed]

What error does this line return when I pass a URL without HTTPS or HTTP driver.get("www.google.com"); It was asked to a fresher in his interview.
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
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
2answers
50 views

How can I handle the chrome Http Authentication popup window in selenium without AutoIT?

I have tried https://{USERNAME}:{PASSWORD}@xyz.com pattern to authenticate URL but it doesn't work for me. Can someone suggest me the best way to handle chrome HTTP authentication popup?
1
vote
1answer
43 views

Verifing pdf using Selenium + Java

How can one verify pdf using Selenium + Java? Until recently, I was verifying pdf using Firefox (making sure that the pdf file wasn't empty). This was nice and working fine, but it's not multi-...
-3
votes
1answer
37 views

Iterating in drop down through selenium web driver

How do I iterate in drop-down using Selenium Webdriver? I have a drop-down like B008124/001, B008124/002, B008124/003, B008124/004. Here I have to select B008124/001 and perform some option like ...
3
votes
2answers
165 views

RPA tool for automation

Is it a good idea to use TagUI (RPA tool) for website automation? if so what are the merits of using this tool over selenium?
0
votes
1answer
324 views

Selenium: how to prevent a just-started Chrome window from receiving focus

Using Selenium + chromedriver on Linux, like so; chrome_options = Options() driver = webdriver.Chrome('/usr/bin/chromedriver',options=chrome_options) driver.get('https://www.somewebsite.com') Chrome ...
0
votes
2answers
3k views

How to get Embed link from Openload API after Remote upload? Selenium & Python

im trying to use Openloads API in python, i can do a remote upload like this: ol_url = driver.current_url resp = ol.remote_upload(ol_url) file_id = resp.get('id') Now i have a file uploaded in ...
1
vote
0answers
32 views

How expected condition 'Isclickable' works in protractor

I am trying to click the below button element: <button _ngcontent-xjt-c6="" class="ef-ui-btn-inline-sm ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only" icon="pi pi-chevron-...
0
votes
2answers
31 views

How to rerun failed test from where they instead of from beginning? (TestNG)

Is there any way to re run the failed testcase from the page where it got failed instead of running the testcase from beginning in Selenium Java ?
1
vote
1answer
103 views

How to run selenium script recorded using Selenium IDE along with jMeter?

Here are the steps I have followed so far.... 1) Recorded steps using Selenium IDE 2) Then I export it (".side" file) into a java(junit 4) file. 3) Created a maven project and added the ...
1
vote
1answer
207 views

What is the good practice to instantiate page object in POM and PageObjectFactory?

I am practicing POM and Page Object factory. I would like to learn good practices in instantiating the pages. till now I am Instantiating the pages from test class (e.g. TC_01_Register.java) using ...
0
votes
2answers
43 views

Unable to filter the child elements, using selenium in python

I want to locate all the child element using tag name 'li', and then filter them using id. How to do this. Lets say i have 4 child elements with tag name 'li' and each of them have class. I want to ...
0
votes
1answer
1k 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.screens; ...
0
votes
0answers
47 views

Why doesn't 'this.driver = driver', do the same as 'PageFactory.initElements(driver,this)'?

I have a page object with im trying to instantiate so that I can perform methods on it in my tests like goto etc. But when I try to use it with PageFactory.initElements(driver,this);. The browser ...
0
votes
2answers
53 views

How can I verify that saved data is displayed corrrectly using Selenium + C#?

<p class="details-info-block__text"><span class="details-info-block__label">Business Address 1:</span> 1010 Priority Way West Dr</p> I want to verify the address value (e.g. "...
0
votes
1answer
36 views

Unable to connect to Remote Server using Selenium Chrome RemoteWebDriver

public static IWebDriver UserMultiUserSignIn (IWebDriver driver, string port, string hostName, string password, string Username) { string name = Dns.GetHostName(); ChromeOptions Options = new ...
0
votes
2answers
42 views

How to bring elements to view automatically in Protractor or selenium

I have a webpage to be tested which has a button at the footer of the page. When i click it, there should be an error message shown near to it. I was successful in automating this scenario but the ...
0
votes
2answers
74 views

Getting nullpointer exception for 2nd test case working fine for login

Driver set to null for 2nd test case, working fine for login. Driver class: public class Driver { private static WebDriver driver;; /** * * @return * @throws Exception */ public static ...
0
votes
1answer
66 views

Selenium not allowing to choose from dynamic drop down list values

I'm using Firefox and Selenium with Python 3.7. What I'm try to do is: from the Yahoo Finance page search for IBM in the search box and go to that page and select "chart." This brings up the chart ...
1
vote
1answer
48 views

Azure Access to Internal Selenium Server

Asking those network people smarter than me....We are currently testing out DevOps but one thing that I can't do is have MSTest hit our internal server (which is housed in Azure) that contains ...
62
votes
14answers
282k views

How to download a file using Selenium's WebDriver?

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too. Here's an example: link = self.browser....
0
votes
2answers
199 views

How to perform click on an element using selenium for which I am getting staleState Exception

Problem: There are couple of radio buttons with the same ID and I need to perform click on these. The first radio button gets the click where the second one is getting StaleElementReferenceException. ...