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
275 views

Element is not clickable at point (x, y) because another element obscures it - BLOCK UI class

When I run my test, I receive an error because an element obscures the element I want to click. How do I create a wait that will be executed only IF this class is detected, wait it to disappear and ...
0
votes
1answer
32 views

Using priority in test cases with retry listener

I have test cases which have priority tags on them. Let's say 30 cases run sequentially one by one. But this does not allow me to attach a retry listener to my cases due to tests being dependent on ...
-1
votes
5answers
119 views

Finding elements

I need some help with finding the elements using webdriver. On the webpage this is the label 'Password' < div _ngcontent-c1="" class="form-group text-left"> < label _ngcontent-c1="">...
-1
votes
1answer
87 views

Deprecation issue for InternetExplorerDriver

I want to use PAGE_LOAD_STRATEGY strategy while launching IE driver by using the following code but I'm facing a deprecation issue for InternetExplorerDriver. What's the reason for it? ...
1
vote
5answers
172 views

Why can't we write “ChromeDriver driver = new ChromeDriver();” in Selenium?

Why do we create a ChromeDriver instance and then assign it to a "WebDriver" interace reference. Webdriver driver = new ChromeDriver(); Why cant we create a Chromedriver , Firefoxdriver or IEDriver ...
0
votes
1answer
43 views

Automation testing

I have a situation where I had to handle drop down and click the drop down to select some values. There are two drop down in same page and one from the next page total three drop downs, they 3 have ...
2
votes
3answers
82 views

Selenium forgets the authentication

I'm using Selenium and Java to automate tests. When opening the page under test, Chrome performs basic authentication (prompts for username/password). However, authentication should be solved on the ...
0
votes
1answer
239 views

I am getting the error UnhandledPromiseRejectionWarning: UnsupportedOperationError: sendKeysToActiveElement

I used the below lines of code but i have been facing an issue. browser.actions().mouseMove(control).keyDown(protractor.Key.CONTROL).keyUp(protractor .Key.CONTROL).perform().then(function());
1
vote
1answer
146 views

Disable physical mouse and keyboard in selenium

I am trying to run an automated test that requires me to move the mouse around the page. The problem is that whenever the person running the test moves the physical mouse while the test is running, ...
-1
votes
1answer
45 views

Problem with checking if prices are between two values (Selenium + Python)

URL = http://practice.automationtesting.in/shop/ I need to check if the prices of the books are between two values. I tried to find all the prices: prices = driver.find_elements_by_xpath("//*[@class='...
0
votes
1answer
41 views

Using API calls to speed up selenium tests

Once I test a certain part of the website, I don't repeat that process again. For example, if I tested creating a 'Stackoverflow question'(which takes 10 seconds on UI), and if I need to test some ...
1
vote
1answer
52 views

Can't select price range (Selenium + Python)

I have a small test case: Open the browser Enter the URL “http://practice.automationtesting.in/shop/” Adjust the filter by price between 150 to 450. I tried to use ActionChains, but no result. ...
0
votes
2answers
30 views

Java Selenium: Custom Assert Message for Multiple Checkbox

I'm working with an automated script for multiple checkboxes that has dependent permissions. Given there are multiple checkboxes Checkbox A Checkbox B Checkbox C Checkbox D Checkbox E When I ...
0
votes
4answers
60 views

How to validate that user is not able to enter any data in the given field using selenium java

I want to validate that field is not editable. Code I am trying is: driver.findElement(By.xpath("//div[@comp-id='1494']")).click(); driver.findElement(By.xpath("//div[@comp-id='1494']")).sendKeys("...
0
votes
3answers
118 views

How to get value of WebElement init in PageFactory?

For example: @FindBy(xpath = "//div[@id='panel']//span[@class='name']") private WebElement panel; I've got a panel element. Is it possible to get value of XPath that I init above? I need a solution ...
-1
votes
2answers
35 views

How to handle web dropdown for below action method & Also How should I write reusable method for such Action?

How to create Page Object for such element with Reusable Action Method ? Methods to include: A method to select an option from list dropdown, example: selectFromList(String option)
1
vote
1answer
266 views

Check if password field displays masked characters (Selenium + Python)

I'm new to automation testing, so I have a question regarding the code that I used to execute a simple test case: "Check if password is masked". 1. Open the browser; 2. Enter the URL “http://practice....
1
vote
2answers
241 views

Stop page load, or visit page without waiting for full page load -Capybara

Background: A web page takes about 2+ minutes to load. Problem: I am currently automating acceptance test using Capybara, Rspec, Selenium. Visit(URL) -- waits for all the way until the page is ...
1
vote
3answers
83 views

How do find XPath when only value is given in the source code?

What will be the XPath of a 'Search' button from the expression mentioned above?
0
votes
2answers
51 views

How do I click on an element available in a specific row where dynamic row is added?

In the below pic, I need to click on the icon in a row which is newly added and column1 value is stored as global variables. Have used the below code, unable to find a solution. WebElement ...
0
votes
3answers
125 views

How should I fail a test when an if condition becomes false

I want a test to fail when the if condition below becomes false. last_url = self.browser.current_url if 'https://***/news/' in last_url: print("test passed") else: #Test should fail if it ...
0
votes
1answer
38 views

How to write test that have same code in the beginning?

I am writing test automation for the application that have following features Login Create News Create Event In Create News and Create Event I have to repeat login code. Is there a way to use login ...
1
vote
1answer
70 views

How to get the href value from the xpath?

Below is my element location, i need to find the id from this link. <a href="bnf_view.aspx?QBnfId=BGOOE00003" class="case-hdr" xpath="1">Dean Ambrose</a> Expecting this output-BGOOE00003 ...
1
vote
3answers
61 views

Selenium WebDriver Java: not able to select a value from a drop-down list

I'm trying to select an option from a drop-down list, and I'm not able using the common methods of the Select class. I also tried the selectByVisibleName and selectByValue and same result. Select ...
0
votes
0answers
21 views

run Unittests from bin Folder instead of ..\Out\… in MSTest

I am working with 'VS 2017, Version 15.9.12', I work with a Unit-Testproject but currently when I debug a test my IDE always runs the Test in the "....\TestResults\testuser_notebook1065 2019-06-11 ...
0
votes
2answers
41 views

User Acceptance Tests with mouse/keyboard capture and picture compare

We have several Angular applications (Micro UIs) and they are all 100% covered by our UATs (User Acceptance Tests) written with Protractor (Angular Test Framework based on Selenium). There are ...
0
votes
3answers
316 views

C# element not interactable

I am unable to click login form element below site: http://www.w-trading.co.kr/member/login.php? I try: driver.FindElement(By.XPath("//*[@id='memberId']")).SendKeys("my_id"); and driver....
0
votes
0answers
89 views

Cannot instantiate class tests.LoginPageTest

package tests; import java.net.MalformedURLException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.testng.annotations.AfterTest; import org.testng....
-1
votes
1answer
45 views

What should be Assert for below code, tried for assertTrue,assertFalse,assertNull and assertNotNull

I have written below code to verify web table data headers and value of rows and columns but when I am adding different assertion for it, its not working and throwing compilation error. Can any one ...
0
votes
1answer
25 views

remote webdriver in Linux

I have the following setup for my selenium tests: Hub machine in Linux. Couple of virtual machines as nodes, Linux and Windows created using Vagrant scripts. If I start selenium node in Linux ...
0
votes
1answer
59 views

how to use assert in selenium python to check my page load time is less than 5 sec?

start2 = datetime.datetime.now() button8 = driver.find_element_by_xpath("//span[contains(text(),'Last Month')]").click() timeout = time.time() + 60 * 2 while len(driver.find_elements_by_css_selector(...
0
votes
1answer
29 views

Compilation error when iterating through While loop, compilation error at line no. 10, start of While loop

I am getting compilation error when trying to store list size value into an int. public class HandleWebTable { private static WebDriver driver; public HandleWebTable(){ super(); } public ...
0
votes
1answer
23 views

Switching from inner iFrame to the outter (parent) iFrame

I have an iFrame in another iFrame, I´am able to switch to the parent iFrame and then to the child iFrame, but I´am just not able to switch back to the parent one. Is it even possible to switch up top ...
-1
votes
1answer
71 views

How to assert links count on web page through selenium webdriver

I have written below code in a separate class to count links on a particular webpage, How to assert this in a test case class: public static void navigateToLinkInHomePage() throws Exception { ...
0
votes
2answers
67 views

Not able to inspect one of the overlay which disappears in fraction of sec before page loads completely

Once i reset the password through selenium script the confirmation overlay page just remains for 2 sec which i`s not captured by selenium to inspect. Please suggest me how to capture/ignore that ...
8
votes
4answers
148 views

Testing Real World Objects - Interview

I have a Junior QA interview coming up, and I was asked to learn the basics of Selenium. I have done this through free tutorials. I am fine with the Selenium concepts, but I was told I would be asked ...
1
vote
0answers
93 views

How can i use an existing existing chrome browser instance in selenium C#

How do I use an existing chrome browser in selenium C# ? Currently I have the following but it always creates a new window SessionId sessionId = new SessionId(""); var driver = new phantomJSDriver();...
1
vote
2answers
40 views

Can not choose button with the same name (Windows)

The problem I have two buttons with the same name in Windows program. So I do: "self.driver.find_element_by_name("button name").click()" - it selects the first one, but I need the second one. I ...
0
votes
1answer
59 views

Selenium deprecated org.open.selenium.internal.Locatable

I am starting a project by using a library that depends on the said interface. The library worked well with Selenium 3.14.0. The moment I decided to upgrade Selenium, this deprecation has caused a ...
1
vote
1answer
73 views

Is there a way to disable the logs created by the pagefactory

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox I did try the below options for chrome and firefox and I had also ...
0
votes
0answers
61 views

Unable to set proxy with BrowserMobProxy while modifying http header request in Selenium with Java

I am able to modify http request header using BrowserMobProxy, the same way explained https://sqa.stackexchange.com/a/37318/9043 But, the problem I am having at the moment is, that I am executing my ...
0
votes
2answers
42 views

Output Contents of an Element?

I am currently creating a tool. That will login into my Krispy Kreme account and then output my saved address. I am currently at the stage where I have managed to use the tool and : log into the ...
-3
votes
2answers
128 views

Is it possible to automate IE webpage dialog in selenium [closed]

F12 is not working on webpage dialog, tried to change the settings of IE with no luck. Dont want to use AutoIT.
1
vote
1answer
91 views

Selenium C# Using relative XPath inside the wait.Until()

How do you use a relative xpath inside of a wait.until? For example, the below will work: elementA.FindElement(By.Xpath(.//div)); However, putting a 'FindElement' inside of the wait.Until() ...
0
votes
0answers
28 views

Unable to install apk & launch the application in Appium

Appium Server Log: [ADB] Getting package info for 'io.appium.unlock' [ADB] Running 'C:\Users\ab.chauhan\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 93e6ecca0903 shell dumpsys ...
0
votes
1answer
60 views

How to handle multiple tests in same webdriver instance without closing and opening browser again?

Below is my testscript, have called other class methods to it. I would like to divide the testcases to different tests. Now running all in one that would increase my count again more. @Listeners(...
-1
votes
1answer
38 views

Automation Selenium - Dynamic XPath [duplicate]

In the below XPath, the index [1] is changing every time. Can we handle this? //button[contains(text(),'Action')][1] HTML: <button aria-expanded="false" aria-haspopup="true" class="dropdown-...
0
votes
4answers
191 views

How to find broken links using Selenium C#? [closed]

Script for testing broken links using Selenium C#.
0
votes
1answer
24 views

How to insert data into the excel using LINQ in Selenium C#?

For a login check case-> how to insert data into the Excel sheet after each login is checked whether the login credentials are valid or not using LINQ in Selenium C#.
-1
votes
1answer
63 views

when I try to launch any driver the webpage is not getting loaded

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: syncGUID":"{4ef3f74f-a8c6-4d0a-9f70-82419b95c42f}","...