Questions tagged [selenium2]

Use for questions about Selenium 2. Selenium 2 is the second major release of Selenium, an open source framework for testing web applications. A major difference between Selenium 1 and Selenium 2 is the latter's use of WebDriver.

Filter by
Sorted by
Tagged with
1
vote
2answers
866 views

Selenium: Getting error with webElement or Webdriver “Drive” Variable

New to automation. Help is greatly needed Anybody could help me with following code Why i am getting NullPointerException? Error: Null pointer access: The variable driver can only be null at this ...
3
votes
1answer
8k views

Uploading a file to a web site: how to handle Windows dialog to choose a file

Just reviewed questions that may already have the answer, but failed to find anything relevant. So the site I am testing has a file upload dialog. When you click Select File -> Browse, a Windows File ...
1
vote
5answers
14k 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 ...
4
votes
1answer
3k views

How do I validate dynamically changing data using Selenium

I have to use Selenium to test an application with a live time stamp. My code is: String validationmessage=driver.findElement(By.xpath("//div[@id='part_log_details']/p[1]")).getText(); System.out....
1
vote
1answer
2k views

How to get List of similar elements using javascriptexecutor using selenium webdriver

I want to get list of similar element into arraylist using javascriptexecutor. However able to store only single element using javascriptexecutor. Here is my code: JavascriptExecutor js = (...
2
votes
3answers
3k views

How to run selenium-cucumber eclipse project through command prompt

I need to run selenium-cucumber (Junit) project from command prompt. I tried using the statement in command prompt: java -cp E:\Workspace2\AP\Jars\*;E:\Workspace2\AP\src\stepDefinition\ cucumber.api....
-1
votes
2answers
6k views

How to write XPath under tag: strong<> <br> after every <strong>

I am trying to find xpath of text 262567 of given below HTML code : <div class="lessthanhalf" > <h4> Listing</h4> <strong style="background: rgb(204, 136, 136); border: 2px ...
1
vote
2answers
6k views

Unable to click on dropdown element using for loop [closed]

I wrote a for loop code that can access a dropdown list. I'm able to print the list but the code is unable to click on the specified option public void userCapturesAccountDetails() { WebDriver ...
1
vote
1answer
26k views

How to use a regular expression to identify xpath of element with autogenerating id

I need to access this element: <input id ="combo-1105-inputWrap"> The 4 digits in the xpath are autogenerated per browser session. I need to find that particular xpath and key in the data. ...
0
votes
1answer
3k views

Element not visible even id present for the element

I want to check one element, with help of that element id, prepared selenium web driver script, when will click on that ui element it will open another hided section on same window, but getting error "...
1
vote
1answer
151 views

Selenium scripts will run successfully on different versions of windows OS?

I have some selenium scripts for my project. I have developed and tested on windows 7 OS.But I would like to know whether these same scripts will run successfully on different versions of windows OS ...
1
vote
2answers
2k views

Duplicate records identification in selenium [closed]

I was asked in an interview this question That two different scenario requires data from a common sheet. How to we identify that data already used , while passing it as input. In general how to ...
2
votes
0answers
711 views

How to set browser window size using Phantom JS + Java

I am working on PhantomJS with Java for one of my project. I am looking for some help in working with PhantomJS in following scenario. Scenario : Step-1 : Mouse hover on tab/link then 2 sub-links ...
0
votes
2answers
4k views

Getting an error after execution as FAILED CONFIGURATION: @BeforeTest Login [closed]

java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/...
0
votes
1answer
1k views

How to iterate a list of WebElements and store the values and to perform DB Comparision [closed]

From UI I have to read the below values (I have given example values) EmployeeID : 100 First name : abc Last name : XYZ Joining date : 22-Aug-2015 Gender : Male Phone Number : 10908333 I have ...
4
votes
2answers
1k views

Selenium / Java: how to handle test case execution on a flaky network connection?

What is the best strategy to handle test case execution when there is a possibility of losing network connectivity during execution? In my case, I have to run 300 test cases which usually take around ...
3
votes
2answers
26k views

How to call a method from one class to another class when both are TestNG classes

I have 2 TestNG classes which are: ProductCanvas package objectRepo; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium....
2
votes
0answers
197 views

How do I access fields within Braintree's Hosted Fields' iframes using selenium

On my application payment gateway is Braintree, I need to automate it and face some difficulties when i am automating it, major problem is I cannot send credit cart details using x path, I research ...
1
vote
3answers
18k views

Locator has 3 matching nodes. How to get Selenium identify the required element?

I'm new to Selenium WebDriver. I'm trying to automate a search function on a particular page. There are a search input box and a search button (actually, it is a search icon) next to it. I'm able to ...
0
votes
1answer
1k views

Unable to call method in main class

I am trying to call a method in the main function using selenium. However, I am not able to do so. Getting null pointer error. The subclass drinks should be called in the main class coop_main. Could ...
7
votes
3answers
5k views

How to get max character count for input fields with selenium webdriver

How to get the maximum allowed character in any text box eg.user name, email address, in selenium webdriver ?
-2
votes
4answers
1k views

Unable to customize XPath containing span

I want to select all the products having rating 4.5 and add to the cart. However, I am not able to customize the XPath. I tried the below XPath: //div[@class='product-item__rating']/span This ...
2
votes
1answer
9k views

How to locate element inside <form> <table> element </table> </form>?

I want to locate element TableHeader which is inside a form table, it has the following page structure: <form> <table id="topNavigation" cellspacing="0" cellpadding="0" border="0" width="...
4
votes
4answers
10k views

Find first IMG element using XPATH

I am trying to find first fridge IMG element in a e-Commerce page but I could not find it alone, It's identifying all Images under First DIV.. Please share you thoughts I tried below XPATH, is there ...
-1
votes
1answer
609 views

Selecting available Usernames while creating Gmail Account using Selenium

How to select from available usernames while creating Gmail account using Selenium when the username was chosen is already taken? driver.get("https://accounts.google.com/SignUp?service=mail&...
0
votes
1answer
639 views

Not able to select flipkart filter in selenium

I am trying to select the filter sub-section ( Left panel) in flip kart page. I am trying to expand "TYPE" section but I could not do it... WebDriver driver = new ChromeDriver(); driver.get("https:...
0
votes
2answers
696 views

I am getting an error “org.openqa.selenium.NoSuchElementException” while running the selenium code

package captionlabs; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; public class Login_captionlabs { public static void main(String[] args) { System....
0
votes
1answer
797 views

Selenium - how to test email delivery

I have to test if users receive email correctly depending upon the following scenario. If user selects 3 mail per day : Should receive mails 3 mails in a day after every 8 hours. Daily : user ...
1
vote
1answer
2k views

driver.getTitle() returns “WebDriver” string everytime for different webpages

I am beginner in learning selenium. My code is like this: driver.get("http://opensource.demo.orangehrmlive.com/"); String T = driver.getTitle(); System.out.println(T); Instead of the actual page ...
0
votes
1answer
4k views

How to handle web element(enable button) having same Xpath?

I am working on a web page which having 3 web elements with 3 enable buttons and all buttons having same Xpath.so my need is to click on the button A and print the title of the webelement on every ...
-1
votes
1answer
1k views

Selenium can not locate sign in button for amazon.com [closed]

WebElement element = driver.findElement(By.className("nav-action-button")); Actions actions = new Actions(driver); try { JavascriptExecutor js = (...
1
vote
2answers
12k views

How to get count of 'li' elements list with selenium webdriver?

I have a list of li elements wrapped in sub-menu class of HTML, before clicking on any of the li element I wanted to cross check all li elements are present with getText() and length but not sure how ...
2
votes
3answers
1k views

Robotframework & Selenium2Library & Python - User sign up test problem (emaill address +n generation)

I am beginner in writing automated tests with robotframework(Python and Selenium2Libraries) and I've faced to the issue related to user registration flow. Challenge is: The application under test ...
4
votes
1answer
227 views

Selenium 3.0: Getting exception every time while launching firefox in remotewebdriver

I'm using Selenium 3.0 and I want to know what are the new updates in Selenium 3.0 over Selenium 2.0? I'm trying to launch my firefox driver using remotewebdriver and every time it throws an ...
2
votes
1answer
4k views

How to make multiple testcases of one value

I have created test cases for email but there are multiple negative test cases for email field then how should I pass multiple values in the input field. I have created function.but don't is that ...
5
votes
2answers
18k views

how do perform menu list selection in web application using selenium?

I am trying to select/navigate to a menu item in the provided URL. I tried Actions but It was not working. https://enterprise-demo.orangehrmlive.com/auth/login uid/pwd : admin/admin I wanted to ...
1
vote
2answers
304 views

What is the best way of separating tests from keywords using RobotFramework?

Our team wants to migrate the tests from QTP. We have the automation flows for UI, API and some database tests. After a long research, I found robotframework would be a nice tool.However as I started ...
3
votes
2answers
1k views

Updates in Selenium 3 over Selenium 2 [closed]

What are the new features/updates are available in Selenium 3 as compared with Selenium-2.0? What are the impacts of using Selenium 3.0? What are the recent errors which were found in Selenium 3.0? ...
1
vote
1answer
667 views

Is it possible to manually resume a session in selenium

Is there a way to hand off a selenium session to a browser locally. I'd like to run a script and somehow release the session or pause it so that I can resume testing from that point. Is this possible ...
1
vote
3answers
320 views

How to click an element which may require another icon be clicked on first

I have list of icons in a column , & at a time only one is clickable , but some times icon is not responding/clickable. TO make it clickable we have click refresh button near icon .
3
votes
4answers
6k views

How does TestNG priority work for a group?

Suppose I have five test cases out of which three are grouped in "Smoke Testing" and two have not been grouped at all. If I have set priority for all my test cases from 1 to 5, will the cases from ...
2
votes
1answer
6k views

Kill browser sessions when driver is instantiated on each test

I am developing a testing framework for an application at my work and am running in to an issue. I use Selenium 3.0.1, NUnit 3.5.0, NUnit3TestAdapter 3.6.0, and a Selenium Grid instance to run my ...
2
votes
1answer
715 views

Selenium Grid sending commands to the wrong node

I am working on setting up a distributed testing environment and am running in to an interesting issue. When running tests in parallel the tests seem to get routed to the correct nodes and execute to ...
5
votes
4answers
3k views

How to get multiple login instances working in Internet Explorer?

Am working on a banking application. Our requirement is to execute tests in parallel in one system. A) Below is how our application responds to selenium parallel execution :- Does not allow ...
3
votes
1answer
629 views

How to get the x, y axis location of the view itself in selenium [closed]

How to get the x, y-axis location of the view itself in selenium? I know I can get the position of a specific element. But I can't find a way to get the coordinate of the window's view itself. So I ...
0
votes
5answers
5k views

How to close pop up in Selenium web driver?

Please help me out for this problem. I tried to close this Pop-up page with Selenium, but not able to do it. HTML code <div class="popupsignup-disp"> <div class="popupsignup-cntbox"> ...
1
vote
0answers
410 views

how to use javascript in selenium for get data from excel

I am using selenium for data entry there are some drop downs in my web page I use dropDown.selectByVisibleText(input.getCellData(i, 0)); for every one but after first drop down it is not working ...
0
votes
1answer
89 views

Selenium Webdriver url related

I want to open any url in firefox browser but it does not open. what should I do? I installed firefox 47. I put in my code here. public class Baseclass { public static WebDriver driver; public ...
6
votes
2answers
2k views

Extending or passing the driver in page objects?

I have 2 different ways of working with the driver in the page object model: Creating the driver in all the pages and passing it from one class to another. You have an example here. Extending the ...
0
votes
2answers
85 views

What exception I will get If I use UnSelectall() on Normal Select element? [closed]

In Selenium I am using UnSelectAll() on a normal select/Input element( Not multi select). What exception I can expect?

1
2
3 4 5
11