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

Tool which will record my browser actions and allow me to execute the recorded actions from code

I am first time trying out automated web UI testing. I just tried writing selenium python code which logs in to the website, waits till it redirects to target page and then tries to fetch certain ...
1
vote
2answers
304 views

How to drag an element and drop it in another frame?

Hope you doing well, I'm trying to dragAndDrop an element from FrameOne to FrameTwo but not able to do so.Please help me to understand the concept and what I'm doing wrong here and need to achieve ...
0
votes
1answer
3k views

Unable to locate element in Selenium

I am working in Selenium. And I have got an error unable to locate element username. I'm using Java language. I am following page object design pattern. Here is my code.. Pageobject @FindBy(how=...
-1
votes
1answer
2k views

How to get span value [closed]

I want to get validation message value in Eclipse using Selenium WebDriver. I have written code below but it display syntax error: WebElement errormsgfornewpass = driver.findElement(By.xpath("//...
1
vote
2answers
40 views

Is there a preferred programming language for working with webdriver? [duplicate]

I see there are a number of options from C# to Ruby to Python to Javascript. For a newbie to programming which language would you recommend I choose for this situation (webdriver and newbie ...
1
vote
2answers
4k views

How to get the page size (content rendered) in selenium webdriver?

Background : Web page get blank (So script fails as there is no element to locate, only blank page) during selenium script execution in random place only on staging server while same working on ...
-1
votes
1answer
25 views

Testing Question in Selenium Python

How to get required item hrefs in a flipkart page? This is my code: from selenium import webdriver driver = webdriver.Firefox(executable_path ="/home/yegaiah/Desktop/geckodriver") website_URL ="...
1
vote
1answer
622 views

Selenium - Why driver.quit doesn't work in the following case?

I'm writting some scripts on Selenium combined with Saucelab. However I have an issue. I do a test condition to know if I have an element or not on my page, if there is not this element I want to stop ...
3
votes
3answers
14k views

How to automate an autocomplete search text box?

I am working in Selenium. I'm using Java language. I am following page object design pattern. I want to automate an autocomplete search test box. After entering a single character or multiple ...
2
votes
2answers
89 views

How an automation engineer could maintain a large messy existing test code base?

Background: For an UI automation large codebase having thousands of Selenium tests, which multiple people have developed/updated/patched over a period of few years. There is no documentation/manual ...
0
votes
0answers
32 views

Selenium Webdriver - Toggle switch click is not working

I suppose to test toggle switch element to on and off, but while sending click to the element I am getting Clickable element not found error. I have corrected my code with chain action and JavaScript ...
2
votes
4answers
51k views

How to determine whether element is clickable or not? [closed]

My Question is How to check whether the element is clickable or not ?.Is there any method to chat that like isElementVisible() or IsElementPresent() and etc ... Please let me know if one is having a ...
0
votes
0answers
14 views

POM + PF on project with web and responsive mobile web

I am using Selenium POM (page object model) with PF (page factory) for various desktop web browser tests. I just started quest - testing responsive mobile web on real mobile devices. I already have ...
0
votes
1answer
30 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
1answer
33 views

Test cases stop execution for next test cases after using soft assertion

I have used soft assertion in my test cases, but it stops the execution of all the next test cases. what I know if we are adding soft assertion then particular test case should fail and it should jump ...
0
votes
2answers
41 views

I have added Assertion in my tc and make the login tc failed but I am not getting any output on console provided in assertion

I have added Assertion(Assert.asserttrue(true,"login failed")) in my every tc and conditions are according to that but when login tc failed I am not getting any output on console provided in ...
1
vote
1answer
423 views

How can I fill out web page timesheets using selenium?

I have to fill out my timesheet data every friday in timesheets. I've heard that selenium can be used to automate such manual tasks. I don't have a programming background - how would I use selenium ...
0
votes
2answers
1k views

Select a particular node to run a test in a Selenium Grid

I have set up a Selenium Grid having one normal Chrome node and one debug node. There are some cases where I would like to run a case on the debug node. I am using docker-compose to manage the Grid ...
-3
votes
1answer
1k views

How to develop data driven framework using Selenium with C#? Please provide example [closed]

How we can develop data driven framework using Selenium with C# to test the web applications? In your response can you please provide an example?
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
18 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
498 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
26 views

what does the JavascriptExecutor declaration actually means

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
20 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
143 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
29 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
77 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
23 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
39 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
18 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
37 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
52 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
58 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
272 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
80 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
96 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
52 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)); ...
-5
votes
1answer
25 views

Unable to identify element when span class is closed and text is displayed in it [closed]

No these are not working for me.. could you please suggest the css selector for the following DEMO SITES
7
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
50 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 ...
0
votes
2answers
58 views

Trying to get xPath of a dropdown item on webpage in NewRelic monitor

This is the code which I'm validating but its not able to get the Logout option under the dropdown. I copied the xpath value of Logout from the dropdown. This is what the dropdown looks like. This ...
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 ...