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
3answers
97 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
391k 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
47 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
114 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
58 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
83 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
51 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
38 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
170 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
448 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
33 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
33 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
119 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
221 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
46 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
51 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
2answers
75 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
70 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
285k 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
208 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. ...
0
votes
4answers
702 views

Not able to click on menu using Selenium WebDriver Java

I am not able click on the specific element, which is in the image format. I have tried using available locators i.e id and image using XPath and remaining locators are same for all remaining menus. ...
0
votes
1answer
40 views

Finding an item in a table - Selenium scripts

I need to select/click an item from the table. I'm new/beginner to selenium. when I inspect the individual property, it has: <a id = "rpn" style=”cursor: pointer”, ng-click=”grid.appScope....
4
votes
1answer
201 views

Selenium PageFactory vs Page Object Model

I've created a framework in C# using the Page Object Model for fun and am now creating a framework in Java to learn Jenkins etc... also for fun. I have come across the PageFactory concept for Java ...
0
votes
1answer
42 views

New error message 'A Java exception has occured' but code has not changed

When I try to execute selenium code in Eclipse, I get the error message 'A Java exception has occurred'. Last week the same code ran without issues. I have done with configuration part, when we try ...
1
vote
1answer
69 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....
6
votes
2answers
879 views

How to make run only failed test cases in NUnit

Can anyone please tell me how to run only failed test cases using NUnit.
2
votes
1answer
215 views

how to click an available time slot in customized UI calendar

I have customized UI calendar attached in screenshot having date and time slots to book some test drive. actually the booked slot div contains some class and available slot contains some class name . ...
-1
votes
2answers
647 views

I am getting java.lang.NullPointerException while executing my test case

I am getting java.lang.NullPointerException while executing my test case , I am using Page Object Modle with PageFactory ,following are the code snippets TestBase Class: ackage com.base; import ...
0
votes
2answers
59 views

How to find an new element recently added on webpage dynamically after drag and drop in selenium?

Currently I am working on a webpage which has rappid js components. I am trying to achieve dragging and dropping of elements from the palette as seen in the screenshot to the grid. The element I drag ...
0
votes
1answer
38 views

How to get content of clickable element. Facing issue to read content after clicking an element

I have tried below code: if(webElement2.isDisplayed()) { webElement.explicitWaitToClickElement(4,webElement); webElement2.click(); } String tagContent = (String) ((...
0
votes
1answer
47 views

Unable to execute single tc, login then run other application features, right now its running as a suite

I have to execute my test cases as a single as well as a suite, right now its running as a suite but not as a single test case in selenium webdriver: Below is my test which are calling methods present ...
0
votes
2answers
80 views

Element located when put in a single test case but not located when put in separate test case

I am in a weird situation where I found that my element is located when I wrote in a single test case. But as soon as I put that element in a separate test case, Unable to locate element Exception is ...
1
vote
1answer
38 views

IE 11 auto accepts the alert pop up

So I am on an edit page and when I click the cancel button to stay on the edit page the IE driver automatically accepts the leave page in alert pop up. I even added the IE capabilities saying: ...
0
votes
1answer
2k views

How to get src link using Selenium?

The task is simple: to extract the link of an audio of pronunciation for a word from a Yahoo Dictionary Webpage: e.g. Yahoo's Dictionary@ "real" Using "Chropath", I can locate the Xpath of the ...
0
votes
2answers
184 views

Find when iframe is closed in selenium

I am writing tests on a third party system, that utilizes iframes. I have been going through my code and eliminating places where I have been using waits/sleep for 2-5 seconds, and looking more for ...
1
vote
3answers
105 views

One Selenium framework to rule them all (or an actively maintained collection of frameworks)

I am looking for most universal, up to date, open source, selenium framework for test automation. Or at least a number of frameworks for different languages. I am surprised as how every company and ...
0
votes
1answer
76 views

Selenium for Internet explorer on Jenkins

Recently, my tests started failing. I'm testing on IE11(company policy) on a jenkins windows slave. My tests all hang on the "This is the initial start page" if I'm not connected to the server. If I ...
1
vote
2answers
64 views

Handling the case when users get different main pages based on usertype after login

It's more like a theoretical question and I am seeking the best practice here. Given an application where you have different user types, newly registered users get a new UI while old users are ...
1
vote
3answers
44 views

Programmatically determine chrome browser version regardless of OS

My problem is chromedriver 78 (currently the latest) doesn't work with Chrome 77. Ubuntu still has 77 in the apt-get repo for google-chrome-stable. My regression script automatically pulls down the ...
0
votes
2answers
105 views

Can't find element locator

I have created this Keyword: Validate Header Wait Until Page Contains id=outputtext-text-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1 Element Should Be ...
0
votes
2answers
63 views

How to Automate the fields that are text and drop downs. You are not sure that how may fields will be and of which type (text/drop down.)

here situation is like that admin set the Specified fields for front end user and its upon admin that how many fields he set for user. One thing is that he can only create 2 types of fields either ...