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
7 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='...
2
votes
4answers
52k views

How to determine whether element is clickable or not? [closed]

My Question is How to check whether the element is clickable or not ?.Is there any method to chat that like isElementVisible() or IsElementPresent() and etc ... Please let me know if one is having a ...
6
votes
3answers
3k views

What practices are used to avoid constantly testing the login screen in web driver tests?

Good tests shouldn't shouldn't have duplication and should be concise, however when testing a web application with authentication the test must first get past authentication to perform the desired ...
0
votes
3answers
67 views

Test cases stop execution for next test cases after using soft assertion

I have used soft assertion in my test cases, but it stops the execution of all the next test cases. what I know if we are adding soft assertion then particular test case should fail and it should jump ...
-1
votes
2answers
32 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
votes
0answers
10 views

Can not find Classpath error in Intellij IDE?

"C:\Program Files\Java\jdk-12.0.1\bin\java.exe" -ea -javaagent:C:\Users\adongar.m2\repository/org/aspectj/aspectjweaver/1.9.4/aspectjweaver-1.9.4.jar -Didea.test.cyclic.buffer.size=1048576 "-javaagent:...
3
votes
5answers
23k views

Is there any way to continue selenium web driver script after assert fails?

I have some script which is written with selenium webdriver. Actually, I have put some assert statement in between script. When an assert statement fails my script stops execution. Is there any way ...
0
votes
1answer
26 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
28 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
4answers
43 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
34 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 ...
6
votes
2answers
485 views

Performance for WebDriver vs AndroidDriver vs iOSDriver

I initially wrote a few selenium scripts to test my web application. The scripts use RemoteWebDriver call for initialising web driver. I now wanted to run the same scripts to test the web application ...
0
votes
2answers
20 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 ...
1
vote
1answer
69 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 ...
0
votes
1answer
24 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. ...
0
votes
0answers
24 views

Want to click on one of the element from drop down and get selection text for comparison [on hold]

There is a scenario in which I have to add a user(admin adds a user) from one function of the application and go to other feature and confirm user name is present in the dropdown list. So here the ...
0
votes
1answer
35 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 ...
1
vote
1answer
40 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
3answers
64 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?
1
vote
3answers
46 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
2answers
30 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
84 views

Getting Cannot instantiate class error

package com.crm.qa.test; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.crm.qa.base....
1
vote
2answers
38 views

Creating a common import statement for commonly used imports

import java.util.Properties; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; I have a page object model and each page object requires these ...
1
vote
1answer
23 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 ...
0
votes
2answers
44 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
102 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 ...
1
vote
1answer
842 views

C# Selenium WebDriver Foreach not working

This is my code in C# I press the delete button and open a pop up where I select the amount of deletions that I want to delete and press again on delete it will delete. PropertiesCollections....
1
vote
4answers
4k views

How can I execute selected test cases from list of testcases in TestNG at runtime?

I want to create a page with the details of test cases (say a HTML Page with some content). Say the testcases will be listed there. When i want to run the test cases then I will select them and click ...
0
votes
1answer
55 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
2k 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 ...
0
votes
1answer
128 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 ...
1
vote
1answer
32 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
51 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 ...
0
votes
0answers
41 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....
0
votes
1answer
31 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 ...
-2
votes
0answers
19 views

WebDriver cannot resolved and chrome driver cannot be resolved to a type

This type of error occurred when writing the Testing program. WebDriver cannot be resolved and chrome driver cannot be resolved to a type. Can anyone help me with this?
3
votes
3answers
155 views

How to abstract data classes to be more object oriented?

I have run into problems keeping my tests as object-oriented as possible. I have had to rewrite large portions of my code multiple times now, and I feel that there is a better approach to what I'm ...
0
votes
1answer
509 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
2answers
105 views

How Does Test Planning Differ for Manual and Automation Projects?

I am now into automation projects. So can anyone help how the test plan will differ from manual and automation projects.?
3
votes
4answers
44k views

How to get value of text wrapped in paragraph element <p> with Selenium in Java

I have a button, clicking on it generates a number which is wrapped in paragraph text such as <p>random number <p> , I want to get that random number value and do operations based on ...
0
votes
0answers
15 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
1answer
23 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 ...
1
vote
1answer
87 views

How to split a variable in Selenium IDE?

I am quite new to Selenium IDE. I want to split an error message and extract the first word of the error message. I have used the following commands as in the image. Following are the results of the ...
0
votes
2answers
59 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 ...
-1
votes
1answer
40 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 ...
1
vote
1answer
41 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 ...
0
votes
2answers
144 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. ...
1
vote
1answer
44 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
4answers
267 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. ...