Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [selenium-webdriver]

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

0
votes
1answer
6 views

Selenium WebDriver “Cannot instantiate class ” error is coming

Below is my Base Class: package com.mercury.qa.base; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import java.util....
0
votes
0answers
14 views

How can i close alert message by enter action through keyboard?

I'm looking for different way for closing alert message except accept() or dismiss() methods so how can i close alert message by enter action through keyboard ?
0
votes
1answer
16 views

Capture arguments of onclick() javascript call using Selenium Java

I am writing a selenium script in Java to capture the arguments passed in JavaScript onclick() call/method. Attached is the image in which method/function name is highlighted. Now, In this method ...
0
votes
0answers
17 views

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

I want to retrieve a value in 'Given' function and then store it in a global variable so that the value is accessible in subsequent steps of a scenario in protractor cucumber typescript based ...
0
votes
2answers
32 views

How can we run only selected testcases from extent.html report in selenium webdriver?

I'am running testng suite and then extent.html report is being generated. Now I want to customize my report like; i should be able to select only failed testcases in my report and then should be able ...
0
votes
0answers
14 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 add necessary ...
0
votes
0answers
35 views

Get serenity html reports parallel during execution

Am using serenity with cucumber. Here the html report created for each scenario is with random string. My questions: 1. Can we rename those individual html report by scenario name?. 2. Is the ...
1
vote
1answer
32 views

Selenium | Locate elements via custom attribute

I'm new to test automation with Selenium (Python) and just wondering if it makes sense to locate elements on webpages via a custom attribute? In some places the IDs of the elements are generated and ...
1
vote
1answer
17 views

Selenium WebDriver gives the same window handle across multiple Firefox browser sessions

We use different profiles to test different features of our system. If we open new multiple FF sessions (each with it's own profile), Selenium Webdriver only uses 1 window handle identifier. (pseudo ...
0
votes
1answer
61 views

Interview Preparation

How can prepare for quality automation analyst (1 yr exp) interview? Actually this is the final round. They've said like there will be a technical discussion and soft skills with the QA lead and ...
5
votes
3answers
693 views

How to design automation framework when the app to be tested has 500 web pages?

I have a web application which has around 500 pages. Can we use POM framework and if so, is it a good practice? if not, please suggest some ideas.
0
votes
1answer
27 views

Why can't resolve NaN in Selenium script?

I have recorded some functions using Selenium IDE and exported test into java file. I have used "wait for element visible" condition when performing action in order to assert a notification. ...
0
votes
1answer
34 views

What is the best approach to manage Precondition for set of tests

Lets say I have a set of tests which depends on a precondition. Should I automate the precondition or manually perform the precondition data? If I automate the precondition test and execute them ...
2
votes
2answers
55 views

if/else condition is not working as expected

WebElement radio= driver.findElement(By.xpath("//[@id=\"mydiv\"]/form/div[1]/div[3]/label")); if (radio.isSelected()){ Thread.sleep(2000); driver.findElement(By.xpath("//*[@id=\"mydiv\"]/form/...
0
votes
2answers
22 views

How to use assertion to compare both different size of the rows?

I want both size of the rows shouldn't be matched. int firstnum = 0; List<WebElement> preRoutlList = driver.findElements(By.xpath("//*[@id='txBottomTable']/table/tbody/tr")); ...
-2
votes
0answers
35 views

How to Automate with selenium (payroll cloud based application) [on hold]

I'm new to the payroll application,is there any one who automated payroll application i would like ask that how to start up automation regarding selenium(java) .So what are the proceedings to be taken ...
0
votes
1answer
25 views

How to read data from JSON file , Then Pass these values on web application form with the help of Xpath Locators and Then Write it in Excel file?

Steps : Can you suggest the approach or share some sample script 1.Read data from JSON file - Method to Provide Data (JsonReader.getdata) - Get file location & File Name 2.In @Test(...
0
votes
1answer
42 views

Able to find xpath, but trying to click button throws exception

I tried to click on an element using the code below but it is throwing Exception: No Such Element Selections WebElement clear=driver.findElement(By.xpath(PageUtility.OPEN_LOCATION_POPUP_XPATH)); ...
-2
votes
0answers
23 views

How to check that field is drop down or a text field. First find that filed by id or class then want to send data into that field [duplicate]

issue is that i have some custom fields and you are not sure that how many field may be there. Secondly your are not sure that field is drop down or text field. Third one is that a field may b ...
2
votes
3answers
59 views

How to validate that an object (whose locator we don't know since it is not present) is not present in a page

Let's say I want to verify that an upload button is not present in a page. I cannot use any locator here since I don't know the object locator value. So how do I assert in my test that it is never ...
0
votes
1answer
16 views

Adding Chrome extension in Selenium / Python / Ubuntu

I am having problems in adding extensions in Chrome before Selenium tests, using Python. On the code side, it's pretty simple: options = Options() options.add_extension(/path/to/extension) webdriver....
0
votes
1answer
58 views

How to read data from multiple excel sheets, where each sheet has Unique Column count - Selenium(Java) - Data Driven Framework [closed]

I am trying to get data from Excel from multiple sheets and assign variable to those data. (For my Data Driven Framework) I am successfully able to get the data, but while running the test, I am ...
-1
votes
1answer
42 views

Access Denied when trying to automate the MakeMy trip website using Selenium

I am trying to automate the MakeMy trip website using Selenium Webdriver in Java with Google Chrome. My script is failing once I click on the Search button. Error message: Access Denied You don't ...
2
votes
1answer
43 views

Unable to pass dynamic xpath in repository file?

My code is : for (int z = 0; z < rows.size(); z++) { rows.get(z).findElement(By.xpath("//*[@class='ng-scope'][" + (z + 1) + "]//*[@placeholder='Stop Name']")).sendKeys(shuttleObj.getStopArea()); ...
0
votes
1answer
41 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 ...
-4
votes
0answers
36 views

Get the String count in java [closed]

input string is Str1=INDIA Bt we need to get the result string like I0N1D2I3A? How can we write this I need logic for this?
1
vote
1answer
58 views

Click the last but one checkbox

In a page there are n number of checkboxes. Each time the page refreshes the list of checkboxes will also be refreshed and can be a different size. How do I click the second last (last but one) ...
0
votes
1answer
26 views

Compilation error when extending class and defining a method

I am getting compilation error when I am extending Loginpage class through Loginbusiness, define a method but compilation throws an error to remove illegal identifiers(eg. public) and also for ...
0
votes
1answer
36 views

Selenium. Chrome v74. Freezing after cookies deletion

After updating Chrome to 74.0.3729.131, problems are appeared. Using webdrivermanager 3.4.0 for managing chromedriver. public class UiTestBase { public static WebDriver driver = null; public ...
0
votes
1answer
35 views

How to deal with ui-sref in Selenium

The Context: I'm using selenium in java to click on a link to navigate to the other page of the application. The Problem: The application is made in angular-js wherein I tried to click on the Link,...
0
votes
0answers
28 views

Error: Vuser failed to initialize extension java_int.dll

I am working on running a script on performance center. For that, I have followed these steps: I have integrated LoadRunner with Eclipse. Saved the Selenium script and converted into LoadRunner then ...
0
votes
0answers
43 views

Code can't be executed after running click method

After being run click function , i don't know why but the next sendKeys function can't be executed. eclipse is getting stuck and after a while, i'm facing with "timeout waiting for page to load" error....
-1
votes
1answer
36 views

Email code modifications needed

Below is the email code to send Reports after execution and one method put is used, that's generating error. How to defined that put method to successful Test execution and test report sends ...
0
votes
1answer
47 views

Unable to find the correct xpath for input field?

Unable to locate the element. <div class="col-md-4"> <label class="radio-inline"> <input type="radio" name="routing_option" data-ng-model="generateRoutes" data-ng-value="'...
0
votes
2answers
31 views

Strange drop down automation problem - multiple select

I've tried for days to figure this one out. I have a selector that I can't figure out. It seems to be a regular select statement with multiple options but when clicking one option directly it ...
0
votes
0answers
50 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 ...
0
votes
3answers
59 views

How to select an element whose id/number is dynamic and keeps changing

I have a number that comes to my email that I would like to copy and save but the number keeps changing all the time. If I take the xpath it will contain that number (//b[contains(.,'821016')]) and I ...
2
votes
4answers
121 views

Replacement of @Findby in pagefactory for dynamic value with locator

I like to use POM pattern with page factory and in fact I have been using it since long in my various automation frameworks. Some time I am facing issue where I have to write text based xpaths in ...
0
votes
1answer
32 views

Firefox throws an error message through WebDriverManager

Firefox is mostly working, but the last test case failed - it won't click on an element. unable to read VR Path Registry is the error message. In Internet Explorer, it loads the browser, sometimes ...
0
votes
1answer
24 views

Selenium Webdriver fails to load browser through WebDriverManager

We can run our tests in different browsers in selenium Webdriver, previously we need to executable files to run our test in any browser. But now we can achieve without using exe files & with the ...
0
votes
1answer
38 views

Getting 'java.lang.NullPointerException' on executing test Cases

import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations....
0
votes
0answers
21 views

How to identify the fields and their values in the listview screen which are inside a recyclerView

I am automating a Mobile screen where I have the details of a particular transaction, in which I have fields(fieldnames like card number, transaction date, Transaction ID., etc.) and the subsequent ...
0
votes
0answers
28 views

I'm facing with “timed out waiting for page to load” error although screen is already loaded

After pressing search button by typing number, a table including just one row related to data that i searched is being displayed on same page and i have to press in the another button which is located ...
0
votes
1answer
25 views

HTML file is not generated in the extent report

I have made a script to generate an extent report, but HTML is not generated. Please check below code: Report.java: package report; import org.testng.Assert; import org.testng.ITestResult; import ...
0
votes
1answer
41 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 ...
-2
votes
1answer
51 views

How to assert that particular element is not displayed? [duplicate]

Can someone help me fixing NoSuchElementException. Let me explain what I am trying to do. I am trying to login into an application with multiple sets of data. Lets say, 1) Valid username and ...
-1
votes
1answer
16 views

Selenium using Java code [closed]

I am getting this error While running Selenium in Netbeans through IE 11 org/openqa/selenium/ie/InternetExplorerDriver : Unsupported major.minor version 52.0
0
votes
1answer
29 views

How to handle WebElement Dropdown whose tag starts with <Span>?

Script is selecting country element then entering Text in Search field as "India" which shows 2 values in search result . I am unable to select displayed field value ? Test Case :- 1. Navigate to ...
0
votes
1answer
13 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
35 views

Getting error message on webpage but test cases get passed -using testng with selenium

Driver class: package com.deere.gmsr; import java.util.Properties; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; ...