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
2k views

How to run a NUnit test using cmd

I created a simple test suite using NUnit by opening a new .Net console application project. In the Visual Studio at Test explorer I can see my test methods. Now I want to run them using CMD, i.e. at ...
0
votes
1answer
20 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. ...
2
votes
1answer
504 views

How to identify floating button using Selenium

I came up in a scenario where I have floating button to identify. There is two buttons, Save and Cancel. When I am on top of the page buttons are like in a floating panel and once I scroll down and ...
0
votes
1answer
31 views

what does the JavascriptExecutor declaration actually means [on hold]

I am trying to understand the meaning of the following declaration: JavascriptExecutor js = (JavascriptExecutor) driver; I know that the left side means to create an identifier js with type as ...
0
votes
4answers
4k views

What is the difference between Selenium vs Appium WebDriver?

When exploring automation for Android with running Appium server, I noticed using Selenium WebDriver my code works fine. In a previous example, I saw Appium driver for iOS automation. So what is the ...
0
votes
1answer
27 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 ...
2
votes
3answers
2k views

Selecting element value from drop down list with selenium using POM

I'm trying to make simple test to register in website - https://www.midomi.com/. I'm using c# and selenium but have stuck in selecting values from dropdown list using Page object model. My project ...
1
vote
2answers
144 views

What are the types of Xpath expressions for web application automation

What types of Xpath expressions can I use when automating web applications? I need to know different ways of finding elements so that if I can't use an ID I can always locate the element I need to ...
0
votes
1answer
31 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 ...
2
votes
1answer
79 views

how to open a firefox browser through selenium 3.6.0 with another profile using Javascript

I want to launch the Firefox browser through selenium-webdriver 3.6.0 with some of the default settings of the browser changed. Specifically, I want Firefox to download files, during automated testing,...
1
vote
1answer
2k views

Selenium cannot find element with link text, but a seemingly similar element works fine

I will start by saying that I am new to Selenium and also to Java. I installed Selenium IDE, recorded some steps and modified this basic test and executed it as JUnit test within Eclipse. I was able ...
1
vote
1answer
24 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
42 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
1answer
21 views

change attribute value using selenuim python

I am try to change non input attribute value in Firefox frame in the format: <div id='100' class='abc'> <p> hello </p> </div> <div id='200' class='abc'> <p> hello ...
0
votes
1answer
39 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
3answers
59 views

How to identify the web-element for a Text Box using Selenium

I am attempting to locate the empty textbox by the input id 'Department_input' <input id="Department_input" type="text" aria-required="true" size="40" class="field_input ui-widget-content" ...
0
votes
2answers
62 views

assertequals() returns true but make my test case failed

I have added assertion(Assert.assertEquals(condition,"expected","message")), it returns true then also it gives an error and make my testcase failed, with Assertion error and message? Can any one help ...
0
votes
1answer
282 views

Selenium does not click on radio button on pop up

On form, there is one binocular. On click on binocular, pop up opens. There are radio buttons on pop up. I need to click on radio buttons, it's failing. I have tried below code but it shows error ...
1
vote
3answers
3k views

How to locate Facebook POST button using Java Selenium WebDriver?

Code: driver.findelement(By.xpath(".//*[@id='js_2y']/div[4]/div[2]/div/div[2]/div/button")).click(); Every time I try by locating XPath, it's gives an exception, could not locate element. May 04, ...
3
votes
3answers
84 views

How to catch a spinner?

Note: This is intended as a Q and A post for sharing successful strategies. Please, feel free to add more solutions! Problem background: Automating a web application Tester with limited access to ...
0
votes
1answer
103 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
27 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 ...
0
votes
1answer
53 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)); ...
8
votes
4answers
2k views

How to validate against texts overlapping each other using selenium?

I am writing automated test cases for a company. One interesting problem is that texts on a webpage overlap each other, is there anyway to validate against this?
-1
votes
1answer
51 views

Getting error in selenium with node.js automation

I am working on automation. I am using Selenium with nodejs code. I am just beginning to learn selenium with nodejs. I am trying to open a application, but I am getting error. Here is my sample code.....
0
votes
2answers
32 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 ...
1
vote
2answers
1k views

How to resolve NoSuchElementException in Selenium with java?

CODE: driver.findElement(By.name("USER")).sendKeys("XYZ"); driver.findElement(By.name("PASSWORD")).sendKeys("abc"); I have tried various ways not just name but by xpath, css selectors but every time ...
6
votes
5answers
8k views

How to integrate/merge multiple extent reports into one single report using selenium web driver

I need to know how to integrate/merge multiple extent reports into one single dashboard report. I have multiple modules in my project.If I run for single module I will get report in my target ...
0
votes
1answer
451 views

calling TIS/TSM in non-main thread environment

macOS 10.14.3 Chrome 72.0.3626.96 Chromedriver 2.46 While trying to execute following code I receive an error: import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa....
1
vote
2answers
2k views

How to interact with material-ui datepicker using Robot Framework/Selenium

The Web application I am currently working on has changed the calendar widget. They are now using the datepicker from the material-ui library. The problem with this widget is that it does not have ...
1
vote
1answer
40 views

Can I create an executable TestNG Selenium jar with my tests using maven

##### My POM file pom.xml http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 company.myproj myproj 0.0.1 jar <properties> <project.build.sourceEncoding>UTF-8</project....
1
vote
2answers
94 views

What is the best way to check for element is present if i have many to check using Selenium?

I have around 40-50 elements to check in a page using Selenium WebDriver and I am using the code below to check each element. Can someone please tell me what is the best way to do such testing if I ...
-1
votes
1answer
32 views

Need code to compare web element present on the web with download excel in selenium [on hold]

I have a requirement where I need to compare web data with Excel, I need code for the same.
-1
votes
2answers
28 views

What is the difference between hasNext() and next()? [closed]

What is the difference between hasNext() and next() and where it is used? Is it used in Selenium WebDriver or Selenium IDE.
0
votes
2answers
42 views

Unable to find xpath using position(), last(),[1] indexing([1]--eg.) following:siblings, child, parent nothing is working

I am trying to find out the XPATH. I am getting 30 matches for an element. I tried using last(), position(), indexing[], child, parent, following:siblings, preceding:siblings, absolute XPATH is also ...
1
vote
1answer
62 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 ...
17
votes
11answers
28k views

Load Testing, Selenium Vs JMeter Vs other tools

I have been using Selenium/Webdriver for functional testing in a grid setup. We are in the process of transitioning to a Solr based search service. I already have Solrmeter for load testing the ...
0
votes
2answers
53 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 ...
2
votes
5answers
4k views

Selenium WebDriver not properly waiting

I am trying to download a file from a website using a webdriver. But my browser is shutting down before it was able to properly export. I inserted a wait() before I call dispose() but it is not ...
1
vote
2answers
5k views

Protractor: How to verify text present in the table row?

TestCase: Verify the table ROW contains text. To verify text present in Table Row, i tried Using "expect.gettext().toContain(datefinal)". But ouput returns "Expected '7/18/17' to contain undefined."...
0
votes
1answer
47 views

Need help sending text to field

Using Python and Selenium, how can I send text to an element that is 'hidden?' When trying to do it, I am getting errors that the element is obstructed by another element. The field I am trying to ...
1
vote
1answer
37 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
6k views

WebDriver - Problem with loading profile of Tor Browser Bundle

Could you give me any suggestions how to solve the weird problem I experience with WebDriver? I like to use WebDriver to control the browser from the Tor Browser Bundle (TBB). Controlling the TBB via ...
1
vote
4answers
202 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. ...
0
votes
2answers
133 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. ...
0
votes
3answers
330 views

Getting error : NoSuchElementException - Unable to locate element with ID attribute

I am running this code: from selenium import webdriver from `selenium.webdriver.firefox.options` import Options Setup: options = Options() options.add_argument("--headless") def get_results(...
-1
votes
4answers
4k views

Button won't click even though I can see it's taking me to the button when doing automation

My code which takes me to the button and highlights it (I'm running java scripts within Eclipse) driver.findElement(By.xpath("//button[contains(text(),'Save')]")).click(); My HTML code <button ...
1
vote
2answers
13k views

How to select hidden dropdown list in selenium webdriver with java?

I am trying to select the item from dropdown in selenium webdriver using java, but not able to select it. Its showing element not found exception and in html tag drop down is hidden. html code are: ...