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
-1
votes
1answer
49 views

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

I'm looking for a different way to close an alert message other than accept() or dismiss() methods. How can I close an alert message by entering action through the keyboard?
0
votes
2answers
52 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 ...
1
vote
1answer
142 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
56 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 ...
1
vote
1answer
121 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
433 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
37 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
2answers
149 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
749 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
46 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
69 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
66 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
32 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")); ...
0
votes
1answer
666 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
65 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
3answers
71 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
41 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....
-1
votes
1answer
668 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
69 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
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 ...
1
vote
1answer
63 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
37 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
79 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
161 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,...
3
votes
3answers
232 views

How to use Page Objects in this scenario?

I have a website with a home page that requires a user to be authorized or logged in to see all pages of the website. If you try to access the home page, but you are not logged in, then the website ...
0
votes
0answers
46 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
37 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
54 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="'...
1
vote
2answers
53 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
593 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
123 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
898 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
94 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
231 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
90 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
24 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
107 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
884 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
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 ...
-2
votes
1answer
83 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
115 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
23 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
41 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; ...
2
votes
1answer
42 views

Strange exception when executing tests

I write test automation using Selenium and C#. I use the Page Object Model consistently. And have had a random bug crop up in my code: Type of member 'IWebDriver' is not IWebElement or IList
1
vote
1answer
60 views

I get find element error when I try to click on footer part whole link

My coding logic: List<WebElement> getelement = driver .findElements(By.xpath("//*[@class='footer__content']//a[@class='footer-nav__link']")); WebDriverWait wait=new ...
1
vote
1answer
35 views

Testing a pop-up in Selenium

How to select text from pop up which is opened in the same page in Selenium. With WebDriver I can only check the element from the page, not from pop up.
0
votes
2answers
270 views

Selenium : How to handle a window which automatically closes and back to parent window & Opens window PopUp

I have a test case with following scenario: Click on global Order Mgmt Super user Click on Sales Order link Which Actually Opens new Window & Closes automatically Focus came back to Parent window ...
1
vote
1answer
311 views

Logging js console when doing selenium test using firefox driver

I'm writing selenium tests which are launch on the firefox (gecko) driver. If a test fails, I want to retrieve the log present on the firefox js console. In order to do that, I have added the ...
0
votes
1answer
51 views

Locator Issue regarding multiple attribute

I've located an element correctly by using the following XPath... //a[@class=\"desktop-categoryLink\"][@data-reactid="30"] But when I paste this in my eclipse it looks like below... driver....