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

Extent reports issue in maven project

I am using extent reports in my project but it is showing me error and I am not getting solution for this error: [RemoteTestNG] detected TestNG version 6.14.3 Starting ChromeDriver 75.0.3770.140 (...
1
vote
1answer
502 views

Exception generated after exporting code as runnable jar

D:\RhythmFileDownload>java -jar fileDownload.jar Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b port 36946 Only local connections are allowed. Apr 03, 2017 6:14:23 PM ...
3
votes
2answers
67 views

Script debugging on AJAX base web application. Can I bypass my dependent module test script execution in Eclipse?

I'm testing a web application in which all web controls are loaded dynamically using AJAX. I have a test script project in java Eclipse IDE. Here is my problem. If, for example, I am debugging a test ...
0
votes
3answers
49 views

Trouble deleting NaN in input field

I'm using Selenium to fill in a web form. The fields there have their default values, usually it's 0. If I issue the command Driver.chrome.FindElement(By.Id("ID_of_my_element")).Clear(); the value ...
0
votes
2answers
26 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 ...
8
votes
7answers
22k views

How to write XPath if I have 'apostrophe' in my XPath element?

I came up in a situation where I have to identify an element using XPath and my element starts with apostrophe ('). I will give the example below. This is the usual way we write some XPath. By ...
0
votes
1answer
1k views

Selenium with Chrome mobile emulator- can't make interactions

I'm starting to get frustrated with Chrome emulator: Using JAVA + Selenium + TestNG I'm testing many of our web applications which runs on few browsers. On mobile browser we have a special design - ...
0
votes
2answers
198 views

I got the following error while automate the webpage using testNG

package browserhandling; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa....
0
votes
1answer
34 views

calculate the total of liabilities and check it is matching with the given value

I want to calculate the total liabilities amount from webtable and need to compare with the total amount which is present on webpage. I got the following error : Illegal/unsupported escape sequence ...
-1
votes
2answers
2k views

How to wait for JavaScript scroll action to finish in selenium?

I've come across an interesting problem while automating our web application using selenium webdriver. I'm waiting for page load and all the ajax call to finish but the application use JavaScript ...
5
votes
2answers
522 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
1answer
502 views

Selenium with C# “Element is no longer valid” exception being thrown when repeating steps

I am repeatedly getting a very annoying problem when automating my test cases using Selenium/C# in Visual Studio. This test is designed around validating search criteria text. In order for me to test ...
3
votes
1answer
212 views

Getting and logging the selenium version used in a groovy project

I'm using Selenium in my Groovy application as a Maven dependency. Now I'm looking for a way to log the used Selenium Version to the console. I tried this: BuildInfo info = new BuildInfo(); def ...
1
vote
2answers
2k views

How to upload an image selenium webdriver with javascript?

driver.wait(until.elementLocated(webdriver.By.css('div.border-right:nth-child(2)')), 1000) .then((element) => { element.click(); }); I am using java-script for my test cases. I had an issue to ...
2
votes
0answers
113 views

How to get text from span that is not in Latin Alphabet? [closed]

I'm having difficulty getting text between span tags. The problem is that the said text is not written in Latin Alphabet. I have no problems using UTF text as part of xpath locator. My xpath looks ...
0
votes
1answer
14 views

How to identify java script variable change in selenium C#

As on the below I’m having a HTML page where it change the variable value at the run time. So the java script is to change the isrendered variable to true after 10 seconds. Even after I inspect the ...
0
votes
2answers
39 views

Cucumber sentence autocomplete

I have a difficulty with writing Cucumber tests. The re-usability of the Cucumber sentences is not consistent - I would like to avoid code duplication when creating sentences and methods glued to the ...
1
vote
2answers
482 views

Drag and Drop does not work with headless chromedriver

I am automating drag and drop using Selenium and Java. Following is the code used for performing drag and drop using chrome driver in headless mode. Point classname = targetElement.getLocation(); int ...
0
votes
1answer
27 views

How can my mac be setup to run both appium/selenium with java and python without conflict?

How can my mac be setup to run both Appium/Selenium with java and python without conflict? Are there steps I should take and things I should avoid? What things should I look out for? My mac is setup ...
0
votes
1answer
317 views

Switching to webview fail in Android on Mac OS

I have a problem while switching from native view to webview in Android while testing on MAC OS. But the same scripts works fine in windows. In Mac it gives chrome not reachable as a webdriver ...
15
votes
6answers
24k views

Which locator do you use with Selenium: CSS or XPath?

I have heard that, when using Selenium, the CSS Locator has better performance than the XPath Locator. Which Locator do you use in your tests? Have you seen a great performance improvement when ...
1
vote
2answers
8k views

How to test angularJS search dropdown with Selenium

I am trying to select an option from a drop-down search box as shown below: The HTML of the element is below: <div id="select2-drop-mask" class="select2-drop-mask" style=""></div> &...
0
votes
1answer
52 views

How to keep a single browser window open during multiple search for a website in the code?

I want to search for different items in a website multiple times and add the item to cart after each search and proceed to checkout after last search. Cucumber opens the new browser for every row in ...
0
votes
1answer
64 views

Add XPath parameter dynamically in Selenium

Is it possible in Selenium to add an XPath parameter dynamically? I have following code: @FindBy(how = How.XPATH, using = "//div[@class='boxes']") public List<WebElement> boxes; String ...
0
votes
2answers
440 views

Need to get the current geolocation value through selenium webdriver

In one of my requirements the current geolocation of the customer will be displayed in a text box by default while loading site. I need to get the geolocation value displayed in the text box, and the ...
0
votes
1answer
66 views

TestScript run time error NullPointerException

I am new to Selenium, when I am working with Page object model in the execution time system displays "java.lang.NullPointerException".Here I am going to provide the sample code TestUtil@class public ...
1
vote
1answer
813 views

Trying to get background color

When I'm trying to get bgcolor using xpath I'm not getting the actual color. HTML Code <div class="__title">Preferred 2:1 </div> Selenium code: String bgColor=New_AEMLocators....
4
votes
1answer
389 views

How to control CEF3 portions of .NET project using Webdriver2?

We have a very large .NET project. This has been E2E/regression tested using QTP for 3 years. Eventually our AUT is moving to the WEB. This process is expected to take a couple of years, it will be ...
1
vote
1answer
70 views

How to add row elements in selenium?

I want to add today's count. I am new to selenium, and am not getting how to add using selenium. Can anyone suggest a solution? This is my code: package testpk; import org.openqa.selenium.By; ...
0
votes
2answers
65 views

Unable to get the correct value from the table using css selector in selenium

I am trying to get the value displayed against the Total using the below code: driver.get("https://www.cricbuzz.com/live-cricket-scorecard/20137/sl-vs-eng-4th-odi-england-tour-of-sri-lanka-2018"); ...
1
vote
1answer
678 views

Switching to Webview context fails

I was trying to automate tests for a hybrid app, while switching, it only shows name native context. WebView Context is shown as webview_undefined. Set<String> contextNames = driver....
1
vote
1answer
2k views

Unable to find element for a button in angular application through selenium webdriver [closed]

<span ng-click="addReqPage()" class=" wrapper-xs text-center cursor-pointer" tooltip-placement="bottom" data-toggle="tooltip" tooltip="Add Specification"> <!-- ngIf: ...
0
votes
1answer
769 views

Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to find element with css selector ==

When I am trying to run the below mentioned Selenium web driver code in IE 11 browser , I get below error "Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find ...
3
votes
2answers
9k views

How to check if a file is downloaded using protractor selenium?

This is the path capabilities: { 'browserName': 'chrome', 'chromeOptions': { prefs: { download: { 'prompt_for_download': false, ...
1
vote
1answer
24 views

How to implement seleniums LoadableComponent with a fluent API?

How do we implement LoadableComponent when we have a fluent api, lets create a basic set of classes, shown below: public class LoginPage { // @FindBy locators public DashboardPage login(...
0
votes
1answer
839 views

Selenium script on Pega Platform application behaves weird

I have identified web elements uniquely using customized xpath //table[@pl_prop_class='SOM-FW-PayMaineFW-Data-ProductGroup']/tbody/tr/th[1]/div/div/div[1] But, when I run the test script and ...
3
votes
3answers
9k views

How to handle windows authentication pop up with Protractor?

Use case: When URL loads, it request for Windows authentication (Enter Username and Password). How it goes is: loads the url on clicking Post button in the page. Windows Authentication pops up ...
1
vote
3answers
55 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 ...
1
vote
0answers
31 views

Issue with parallel testing in pytest

So I have two test cases in a map. From command prompt I type "pytest -n 2" then hit Enter. Instead of opening two browsers and execute them in parallel, pytest is opening 4 browsers, but only two of ...
0
votes
2answers
4k views

Firefox browser opens but URL is not launched

I am working on selenium. I am using linux os. I am using firefox driver for automated testing my app. My firefox version is 53.0.3 (64 bit). When I run the code the Firefox browser open and don't ...
0
votes
2answers
98 views

Does One single script can automate entire matches?

I am automating my windows application. My applications are sports related reporter software. In baseball reporter application i will do testing by the following way : I do enter the commentary from ...
0
votes
2answers
223 views

Selenium can't locate element by xpath

I am using Selenium and attempting to locate an element (table cell in a web app) by xpath. However, I am getting a NoSuchElementException when running my test cases. I am positive that the xpath ...
0
votes
6answers
27k views

How to store copied text to a string in selenium webdriver

driver.findElement(By.xpath("//*[@id='printshapesEdit-main']/div/div[2]/div/div[2]/input")).sendKeys(Keys.chord(Keys.CONTROL, "v")); For the above code, I would like to retrieve the copied text to a ...
-1
votes
1answer
30 views

Can I use this library for Junit?

I put this library: import org.apache.commons.io.FileUtils; but it sends an error The import org.apache.commons.io cannot be resolved what library is equivalent exist for Junit?
1
vote
3answers
578 views

While clicking control should go to the new window

When clicked on a button, a new window opened but I am unable to perform any operation on this window. How do I get selenium to use the new window? code: System.setProperty("webdriver.gecko....
0
votes
2answers
50 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 ...
1
vote
1answer
351 views

CLEAR Method skipped while running the tests

I'm writing automation script for a page in which there is a text box. The scenario is as follows: I click on the text box and enter value which will throw error I clear the text box and add valid ...