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
6
votes
3answers
93 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 ...
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
657 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

<span ng-click="addReqPage()" class=" wrapper-xs text-center cursor-pointer" tooltip-placement="bottom" data-toggle="tooltip" tooltip="Add Specification"> <!-- ngIf: ...
0
votes
1answer
652 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
8k 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
3answers
51 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
1answer
814 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
54 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
votes
1answer
15 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
0answers
10 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
94 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
175 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
25k 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
25 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
40 views

How to find the Xpath of <Td> tag from text which lie under <a> tag of that <td> in selenium c#

I have to find text on a page, which I did. Now I need to find the xpath of the <td> element containing that text so that I can use the <td> xpath to find other elements like the image ...
1
vote
3answers
555 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
47 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
278 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 ...
4
votes
2answers
2k views

Getting Unknown error While Using latest Verison of Selenium With Microsoft Edge Browser

My Code to launch Browser: System.setProperty("webdriver.edge.driver", "C:\\selenium-drivers\\MicrosoftWebDriver.exe"); DesiredCapabilities capabilities = new DesiredCapabilities("MicrosoftEdge", "", ...
0
votes
2answers
349 views

Selenium cannot load reply button on craigslist ad. It seems to be recaptcha problem

When I try to click on the reply button using selenium in craigslist.org It doesn't open anything, it just gives an error like "Error please try again later". If i'm opening the same craigslist's ad ...
0
votes
3answers
556 views

Unable to switch into third window - Selenium

I'm using below code to switch into windows : Set<String> handle=driver.getWindowHandles(); System.out.println(handle); Iterator<String> it=handle.iterator(); String ...
0
votes
2answers
788 views

Use Selenium to select an option from an Input element with multi-select drop-down

I am getting this error message when trying to select a drop-down value: UnexpectedTagNameException with message 'Element should have been "select" but was "input" error' The Error is descriptive ...
-1
votes
0answers
20 views

Getting NullPointerException while usingbApache POI Not able to read data from Excel sheet

SignUpPageTest CLASS : public class SignUpPageTest extends TestBase { TestUtil util; HomePage homePage; SignUpPage signUpPage; String sheetName="SignUp_Data"; public ...
0
votes
1answer
201 views

Why is there different behavior of a Web Application with Automation and with Manual?

I am automating a website, there's web page containing few text fields, dropdowns. There is a mandatory field check for a dropdown, if I select the default option (which is 'Select') I get an error ...
3
votes
2answers
1k views

Headless Selenium Failing for Ajax Calls

How do you troubleshoot an Ajax call that never seems to complete in Selenium running in a headless environment? I'm running Selenium 3.0.1 from a Django unittest to confirm content gets dynamically ...
2
votes
2answers
4k views

java.lang.NullPointerException when running a testcase via Selenium webDriver in Chrome (Page factory model)

I'm getting a java.lang.NullPointerException when running a test case via Selenium webDriver in Chrome (Page factory model) Testcase: package Google; import org.openqa.selenium.WebDriver; import ...
4
votes
1answer
19k views

how to handle if xpath is same for multiple drop down

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 both has same xpath. The Xpath is giving below. //div[@name=...
0
votes
0answers
16 views

Not able to add Bug from Testlink to JIRA (Required Version Number)

I have Integrated JIRA from testlink using REST API. I was also able to link the failed testcase to a bug in JIRA. But while trying to create issue in testlink there is a validation happening for ...
0
votes
0answers
14 views

gitignore of Selenium WebDriver TestNG

For selenium webdriver testng using git, what should be part of gitignore so my scripts can run on any computer without any conflict. Thanks!
0
votes
0answers
32 views

How to protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code?

Opening two chrome browsers. See below logs. Starting **ChromeDriver 76.0.3809.25** (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809@{#271}) on port 8423 Only local connections are ...
1
vote
2answers
8k views

Check Box check and Uncheck using selenium web driver

I am not able to list out the check boxes which are checked and unchecked.the checkboxes are placed in the div tags. And only class name is generated dynamically when the check box is clicked. ...
3
votes
1answer
4k views

How to get coordinates of element inside iframe?

If driver switched to iframe, selenium would take screenshot of iframe content only (EDIT: this is because of bug in gecko driver). I need to mask an element from screenshot, but if I find area by ...
0
votes
1answer
993 views

Selenium Webdriver Java: Setting date on date-picker. Year is not populating in date-picker

I am automating a signup form for web application and there is a date of birth field which has date-picker on it. I am sending values in it by using sendKeys and the problem is that Year is not ...
-1
votes
0answers
26 views

Integrating Mocha/Selenium-Webdriver Tests with Docker

I have been working on developing a suite of Mocha tests which tests the entire frontend of my company's web based application with the goal of having my tests being run as part of our CI process so ...
0
votes
1answer
406 views

How to inspect a element in a drop down menu in chrome and firefox?

The problem here is when we hover the mouse over the particular menu item, drop down items going to visible. When trying to click the inspect element the drop down items are not going to be visible. ...
3
votes
1answer
153 views

Page Object Model: need help with tests that uses more than 1 page object - Appium-Java-TestNG

I have a framework based on POM model. I am able to write test that only uses elements from 1 page but when I need to access elements from another page tests fail because I think it uses the wrong ...
2
votes
1answer
104 views

How can I verify text exist within a table with db using Selenium WebDriver?

Using selenium Webdriver+Java- I am looking for a way to identify and or verify a value in a table. There are more columns in the table, but I am only concerned with the Country column, Also the ...
0
votes
2answers
3k views

Can't find any element using CSS selector with Selenium on Python

I'm running a script on vodafone.co.uk but I can't find any element using the CSS Selector. browser.get("http://freesim.vodafone.co.uk/") browser.find_element_by_css_selector("#frmNew > div:nth-...
0
votes
0answers
10 views

How can I enable variations in Chrome from chromedriver options?

How can I enable variations in Chrome from chromedriver options? Hello, I'm facing a problem with Chrome where when I run an automated UI test with chromedriver, there's issues showing up (such as ...
4
votes
3answers
1k views

What points should be covered in an Automation POC?

Background : We are planning to automate our web application, for that our manager asked for the Proof of Concept (POC). Overview : After studying and analyzing all factors of application, our team ...
3
votes
4answers
8k views

How to check no. of characters accepted by an input field using Selenium WebDriver?

I want to check the validation of an input field that what is the number of character it accepts? Suppose an username field is allowed to accept 15 characters then how can I automate this test?
0
votes
1answer
191 views

Unable to capture the alert in Selenium using Python

I am trying to test a web portal using Selenium and Python. The problem is, I am unable to get around an error, in other words, I am unable to catch the alert. Scenario: Search for a user, if the ...