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
1 answer
3k views

How do I use Selenium to drag and drop drawing elements into a canvas?

I have an element with an id which I need to select, then drag and drop into a drawing canvas. How do I do this? The element is outside the canvas and I need to draw it inside the canvas. function ...
sathish kumar's user avatar
-1 votes
6 answers
16k views

Unable to click on checkbox using Selenium & Java

please send me the full code I tried Some XPath and CSS: XPath: //div[@id='autofill']/div/label //div[4]/div/label CSS: div.col-md-1.checkbox.checkbox-primary > label* but using above ...
Renold Reno's user avatar
3 votes
4 answers
26k views

How to handle browser closing popup

In one of my scenario I am filling the form but not submitting due to my requirement. Now I am closing the browser but while closing browser it is browser an alert by saying "Are you sure .... ". How ...
QAMember's user avatar
  • 1,520
0 votes
5 answers
11k views

How do I get particular textNode value of a DOM with Selenium

Hello I am trying to find Load # detail from this site. Also You can refer screenshot too. I have tried with xpath: //div[@class='equipment_item']//text()[preceding-sibling::strong[text()='Load #:']][...
manish kumar's user avatar
0 votes
2 answers
570 views

How to handle dynamic submenu items diaplaying based on different user roles in selenium?

I have the following menu structure: Main Menu1 > Sub menu1, submenu2 Main Menu2 > sub menu 1 etc. And sub menus change based on different user. I need to have common method to handle this. ...
Shilpa Kuri's user avatar
1 vote
3 answers
3k views

Automation testing of mainframe application using Selenium

is it feasible to test mainframe, which is a desktop based application with selenium? If yes, then how?
Ayush Akhouri's user avatar
1 vote
2 answers
2k views

Selenium: Getting error with webElement or Webdriver "Drive" Variable

New to automation. Help is greatly needed. Why am I getting a NullPointerException? Error: Null pointer access: The variable driver can only be null at this location Code: import org.openqa....
Kkat's user avatar
  • 11
3 votes
1 answer
10k 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 ...
Racoon's user avatar
  • 201
1 vote
5 answers
26k 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 ...
Shameera Rassool's user avatar
5 votes
1 answer
4k 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....
user8303682's user avatar
1 vote
1 answer
4k 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 = (...
manish kumar's user avatar
2 votes
3 answers
4k 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....
Sandeep's user avatar
  • 333
-1 votes
2 answers
12k 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 ...
manish kumar's user avatar
1 vote
2 answers
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 ...
Thabiso Ditabe's user avatar
1 vote
1 answer
36k 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. ...
chandrasekhar gandrakota's user avatar
0 votes
1 answer
6k 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 "...
Nilam Nikam's user avatar
1 vote
1 answer
435 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 ...
QAMember's user avatar
  • 1,520
1 vote
2 answers
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 ...
Abhishek Kumar's user avatar
3 votes
1 answer
956 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 will ...
QAMember's user avatar
  • 1,520
0 votes
2 answers
8k 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/...
Narendra Bhupati Chowdary's user avatar
0 votes
1 answer
2k 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 ...
praveen cn's user avatar
4 votes
2 answers
2k 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 ...
user27641's user avatar
3 votes
2 answers
32k 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....
Kenzie008's user avatar
3 votes
1 answer
613 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, the major problem is I cannot send credit card details using xpath, I research ...
Sajini Fernando's user avatar
1 vote
3 answers
23k 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 ...
kodesmann's user avatar
0 votes
1 answer
2k 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 ...
Pratiksha's user avatar
7 votes
3 answers
10k 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 ?
Lav Sharma's user avatar
-2 votes
4 answers
2k 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 ...
Pratiksha's user avatar
2 votes
1 answer
12k 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="...
Rose's user avatar
  • 101
4 votes
4 answers
16k 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 ...
SQA_LEARN's user avatar
  • 435
-1 votes
1 answer
737 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&...
VarzTester's user avatar
0 votes
1 answer
1k 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:...
SQA_LEARN's user avatar
  • 435
0 votes
2 answers
717 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....
aarushi sharma's user avatar
0 votes
1 answer
906 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 ...
Som's user avatar
  • 1
1 vote
1 answer
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 ...
omkar vaidya's user avatar
1 vote
1 answer
6k 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 ...
nitish's user avatar
  • 11
-1 votes
1 answer
2k 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 = (...
newtoSelenium's user avatar
1 vote
2 answers
19k 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 ...
Prasad_Joshi's user avatar
2 votes
3 answers
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 ...
Adam's user avatar
  • 21
4 votes
1 answer
268 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 ...
Sophia's user avatar
  • 367
3 votes
1 answer
5k 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 ...
Rutvi Soni's user avatar
6 votes
2 answers
22k 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 ...
SQA_LEARN's user avatar
  • 435
1 vote
2 answers
362 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 ...
Ranadheer's user avatar
3 votes
2 answers
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? ...
Bharat Mane's user avatar
  • 6,785
1 vote
1 answer
883 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 ...
user2108258's user avatar
1 vote
3 answers
391 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 .
user23354's user avatar
3 votes
4 answers
8k 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 ...
NiNa's user avatar
  • 31
2 votes
1 answer
8k 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 ...
Isaiah Moran's user avatar
2 votes
1 answer
936 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 ...
Isaiah Moran's user avatar
5 votes
4 answers
4k 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 ...
TechDog's user avatar
  • 181

1
2
3 4 5
11