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
0answers
72 views

Selenium drop down menu can't locate 11th element

Trying to scrape data from https://www.sgx.com/research-education/securities and the code below works but only for the first 10 iterations after which it throws a NoSuchElement Exception. Starting ...
-1
votes
2answers
115 views

I'm getting Exception in thread “main” org.openqa.selenium.ElementNotInteractableException: element not interactable

I want to perform XSS by entering something like <script> alert (Testing)</script> into text fields. On my page, I have a combination of different types of form fields. The condition I ...
0
votes
1answer
29 views

How do I write a better xpath of this element? [duplicate]

I am working on a project and building automation test suite for a webpage. A certain part of the webpage looks like this. The corresponding HTML is as follows: <p class="customer-service&...
-1
votes
1answer
61 views

How to configure path for file download in python-selenium

I have changed the path of file download from using below code. chromeOptions=Options() chromeOptions.add_experimental_option("prefs", {"download.default_directory": r"C:\...
0
votes
1answer
77 views

Need help for passing arraylist in dataprovider

I am taking values from excel and than saving values in String type. Created object array and passed those values. added Object array to ArrayList. When using it as dataprovider it is giving me erros. ...
0
votes
0answers
23 views

[[TestNGClassFinder]] Unable to read methods on class

[[TestNGClassFinder]] Unable to read methods on class package.CreateCustomer - unable to resolve class reference org/openqa/selenium/WebDriver I have created a testNG program and run the program using ...
0
votes
1answer
241 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
86 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 ...
0
votes
1answer
29 views

Page Object - direct driver.findElement on exact xpath vs. chaining locator via a wrapper

I have a Page Object with two ways of finding the same DOM element: First there's a wrapper for finding the parent transactionsTable, then on this wrapper I call another findElement with the rest of ...
1
vote
1answer
54 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
0answers
24 views

Good way to run Selenium Tests on Azure Devops

We have 5 different env that i want to run my selenium tests against, the tests are configured and will be ran at the end of the release, what is the best approach for this, should we use Selenium ...
0
votes
1answer
36 views

Get most recent downloaded file using python-Selenium

My Python-Selenium script is downloading the particular file but the file is taking long time to start and get completed downloaded. It starts after clicking in 25/30 seconds and completed in 50/55/60 ...
0
votes
1answer
40 views

I want to enter text in search text box and click search icon or enter [duplicate]

I am facing the issue . Kindly assist. The HTML Code snippet is attached I am getting the error as Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: ...
3
votes
1answer
97 views

Selenium Click not working on IE11 using c#

Local Machine: Dell Latitude (i7-8650U CPU @ 1.90GHz 2.11 GHz) with 16.0 GB RAM Operating System: Windows 10 Pro (64-bit) v1909 Display Scale and Layout: 100% Running on Visual Studio 2017 (v 15.9.21)...
0
votes
1answer
341 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 ...
-3
votes
1answer
36 views

Why do we create parameterized constructor in every PageObject class which accepts one driver reference when BaseTest has a global driver object? [duplicate]

When every test class will inherit driver, then why should we create constructor that takes driver object? public class BaseTest{ public static Webdriver driver = new ChromeDriver(); } public class ...
4
votes
4answers
72 views

Is it possible to do load testing with Selenium with many instances of cloud-based virtual machines?

I'm not a QA guy, so I apologies if some of this may sound dumb or far-fetched. Suppose we have a simple Selenium script where the tool queries a website's search field and records the response time....
0
votes
2answers
39 views

How to open browser windows one by one with Jmeter selenium

I was using jmeter with jp@gc - WebDriver Sampler plugin on Chrome driver. When I set thread count to 100 it will open 100 browsers. Is there any way to open the browser 1 after another? Below is ...
0
votes
2answers
58 views

Switching to another window if inside inner frame

If I am inside a inner frame and there is button if I click on that button a new window will open. Will it be possible to switch to newly open window doing driver.switchTo().defaultContent(). ?
0
votes
1answer
17 views

Electron Application toolbar automation using selenium python

Is it possible to automate the tool bar options like File. Edit, View , Window and Help options using Selenium webdriver with python?
4
votes
4answers
3k views

How to test electron app using selenium

In order to test an electron application. How does one use selenium to identify its elements or using F12 dev tools? As in order to write a selenium script one would have to identify the elements ...
0
votes
1answer
347 views

Methods to setup parallel test execution in NUnit with Selenium WebDriver C#

For true parallel execution of Selenium tests in NUnit, does the setup of the webdriver object need to be within the test method itself? Or is there a better way? Previously, for parallel execution ...
1
vote
1answer
107 views

Find Text without span Text - Python - Selenium

I want to get text that is stored on an element. Text is not a property instead when I expand Element (in chrome's inspection [DevTools]) it has two sub-properties, span and text. it looks something ...
0
votes
3answers
5k views

How do I get particular textNode value of a DOM with Selenium

Hello I am trying to find Load # detail from this site. Also You can refer screenshot too. I have tried with xpath: //div[@class='equipment_item']//text()[preceding-sibling::strong[text()='Load #:']][...
0
votes
0answers
22 views

How to write/insert (Embed) the image object into the excel in Selenium WebDriver (POI Jar ) using Java Programming language?

I want to insert (Embed) the image object into the excel file using poi jar. In Excel, we can able to do manually shown in the below screenshot. Similarly, I want to insert an image object through the ...
1
vote
5answers
7k views

Unable to click button using Selenium Webdriver Java

I am trying to click a button through webdriver. After inspecting the button element it highlights to the following: XPath: /html/body/div/div/main/div/div[2]/div/div[2]/table/tbody/tr/td[4]/form/...
0
votes
2answers
2k views

How to reliably click bootstrap dropdown with no button element?

I am using Selenium to try and select an element in a bootstrap dropdown menu, but there is no button element present. The website uses all JavaScript to enable the dropdown. The HTML code for the ...
0
votes
0answers
20 views

The Element is not Attached to the DOM error is displayed when I try to get the text from a list of Web elements after applying a filter [duplicate]

What I want to do is to access a web page that has some elements displayed in a grid and some buttons that implement the filtering functionality. The problem is that when I get the list of elements ...
0
votes
0answers
1k views

Selenium Error - The HTTP request to the remote WebDriver timed out after 60 seconds after clicking install button

While creating my test using c# and selenium I ran into a issue I haven't had before. The test basically opens the web site, logs in as admin, and within the admin page I than have to install a plugin ...
1
vote
3answers
39 views

How can I get the value from span class in selenium?

In the code above, how would I get the span class value (238.67) to show up? What would I exactly use?
0
votes
2answers
38 views

Trouble logging on to a website with selenium web driver

I'm fairly new to developing but I'm having a problem logging into a website. The code I have currently typed in the username, password, and correctly clicks the log in button. However, the page ...
-1
votes
1answer
41 views

until method is not present in class WebDriverWait in Selenium showing complie error

WebDriverWait wait = new WebDriverWait(driver, 1000); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(ExcelFileReader.findElement(xpath))); import org.openqa.selenium.support....
0
votes
2answers
33 views

How to verify a dropdown which is an extended web element is disabled in selenium

I have a dropdown which is disabled and I have to verify the same. How can I do it with an assert statement or any other method?
6
votes
4answers
23k views

How to modify HTTP request header in Selenium WebDriver with Java?

I want to add "iv-user" request header to log into web app. I'm using the newest ChromeDriver. Using extensions like ModHeader or ModifyHeaders is not working in this case. Fiddler is working, but I ...
-1
votes
1answer
43 views

Selenium/Linux throws exception “An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL ”

I am trying to port some Selenium-Tests that I developed under windows (my main platform) to Linux (Ubuntu 19.10 in a VM). I must admit, I'm not too familiar with the environment, so I might be ...
1
vote
3answers
3k views

Stale element reference: element is not attached to the page of the document

I would really appreciate if someone could help figure out what the hell is going on with one of my tests. I'm getting Stale element reference: element is not attached to the page of the ...
4
votes
6answers
34k views

How can I bring Chrome browser to focus when running a Selenium test using ChromeDriver on Mac?

When executing a Selenium test with ChromeDriver, I would like to bring the test browser into focus to see the actions taking place. The way I am able to do that now is by manually clicking the ...
0
votes
1answer
22 views

TestNG: Go to the next test after one iteration of dataProvider

So I have two tests, one that check the sign up "test01_signIn", if it's a PASS, it goes to the the second test "test02_CheckNewsStandElements", which checks the visibility of an element of the ...
0
votes
2answers
814 views

select an dropdown element selenium java

clicking on service provider exposes a submenu and i need to select one of the options in the submenu. i keep getting not interactableas error... org.openqa.selenium.ElementNotInteractableException:...
0
votes
1answer
29 views

How to get text from header having separator

How to fetch text for <h1 _ngcontent-gtj-c13=""> Site-2 <span _ngcontent-gtj-c13="" class="seprator">|</span> Building-1 <!----> </h1> I have used attribute ...
-1
votes
2answers
64 views

How to get incremental xpath for newly added rows in webtable using robot framework-python-selenium

I came across a certain requirement. There is a web table where new rows are added daily.I want to write an automation script in Robot Framework-Python-Selenium-Eclipse-RedEditor Plugin. Right now, I ...
0
votes
1answer
79 views

Run Selenium test case in time interval from a console application c#

how to create a console app - a batch file which will hit my Automation testing application and runs selected test cases. I have test case with code coverage and it runs from my visual studio . and ...
0
votes
0answers
15 views

Running two tests gives me confusion @ the protocol-level

I'm dealing with a stale-element-issue. Have now found a partial the explanation for the problem - but I don't fully understand it yet! Hopefully one of you has an idea... Due to a very stupid bug on ...
3
votes
4answers
20k views

Why this “WebDriver driver = new ChromeDriver();” Not this “ChromeDriver driver= new ChromeDriver();”

Why we always do: WebDriver driver = new ChromeDriver(); Not this: ChromeDriver driver= new ChromeDriver(); Any special reason, except object size ?
2
votes
1answer
7k views

How to write Assertion in Selenium Cucumber BDD?

I want to use assertion in cucumber to verify my test output, can some please write me an example how to do the same in cucumber. As I googled, I found that people use junit/TestNG assertions like ...
0
votes
2answers
169 views

How to Handle Dynamic Changing IDs inside a span

How to Handle Dynamic Changing IDs inside a span In XPath? for example : <span id="listv2_f40a0e90dbcc089cae10d48a489619ee_total_rows" style="margin-left: 1px;">2000</span> In this ...
1
vote
2answers
1k views

How to drag an element and drop it in another frame?

Hope you doing well, I'm trying to dragAndDrop an element from FrameOne to FrameTwo but not able to do so.Please help me to understand the concept and what I'm doing wrong here and need to achieve ...
0
votes
0answers
34 views

Selenium with ChromeDriver not saving login cookies

In the test that I'm running using Selenium on Python, I simply create a new driver instance like so: options.add_argument("user-data-dir=cookies") # enables cookies ...
0
votes
1answer
40 views

Find childs of element without sub-childs - Python - Selenium

I'm trying to create a bot. The functionality I need now is to find a way to get only childs of an element without sub-childs. Take this as example: <Body> <child1>Hi</child1> ...
0
votes
2answers
38 views

Asserting against database during selenium test run

Just wanted to hear some thoughts about asserting against the database during a selenium test suite. For the website I am working on is a SPA with API backend where the majority of the service ...

1
3 4
5
6 7
92