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

Does Selenium's LoadableComponent make sense in a SPA (Single Page Application)?

I'm writing a UI testing suite for a single page javascript application using Selenium 2 web driver. I'm still experimenting with how to fit the app inside a page object model. At the moment I am ...
4
votes
4answers
3k views

How to generate good locators for elements in Web pages?

This site contains many questions that are about finding the right locator expression (XPath, CSS, etc) for an object in WebPage or about troubleshooting problems related in invalid or dynamic ...
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 ...
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 ...
3
votes
1answer
396 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 ...
11
votes
5answers
28k views

How to start a Selenium2 WebDriver window in background?

I have a series of Selenium2 test cases in C#/NUnit that are run sequentially. Each test case runs in a new instance of the WebDriver (and this is necessary) - which means that each time a new test ...
6
votes
1answer
2k views

Open [hidden] new window in webdriver without instantiating new driver in WebDriver

I've researched this to some extent already by searching StackOverflow and SQA, but cannot find the answer. Is it possible to open a new WebDriver browser window from the current FirefoxDriver (...
1
vote
2answers
376 views

Division not appended on click event in phantomjs [closed]

On clicking the link: <a href="#">xxx</a> the below div should be appended to the webpage <div class="desc cloned"> <div class="wrap"> ...
-2
votes
4answers
948 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 ...
7
votes
3answers
67k views

How to send Basic Authentication headers in Selenium?

I'm using webdriver.Firefox and I'm trying to send the following custom header: self.headers = { 'Authorization': 'Basic %s' % b64encode(bytes(self.args.user + ':' + self.args.password, "utf-8"))....
2
votes
1answer
7k 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
1answer
13k views

How to send Keyboard Shortcuts to browser using Selenium and Nodejs

I am trying to create a test script in Node.JS using selenium webdriver and in case I need to send keyboard shortcuts to the driver. I tried finding the //body element and sending them but only ctrl+...
4
votes
4answers
7k 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 ...
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? ...
4
votes
4answers
2k views

What roles and activities can automators do apart from writing code?

This might seems to be common question but my concern here is a bit different. I am new to Automation and my development skills are not that Good. We are trying to Automate our Project using Selenium ...
2
votes
1answer
3k views

How to test 2-factor authentication (i.e. confirmation code) using selenium [closed]

How can I automate Confirmation Code using Selenium ? Update: Our web application ask for mobile number and pin for login and sends confirmation code in sms, which is then entered by user on Confirm ...
1
vote
2answers
523 views

Cannot Locate the Link in Selenium Web Driver

The thing what I wanted to do is Automate Gmail Login page on Firefox by using Selenium Web Driver. I was blocked near the locating link of gmail. I tried the correct answer of This. but it gives this ...
-1
votes
3answers
95 views

How to find the element for below code in WebDriver?

I am using Selenium Webdriver in C#. I am trying to find the element for below given Angular code. "<div class="ViewMenu" ng-class="{'selectedViewMenu':SearchObj.param.View=='Videos'}" style="">...
2
votes
4answers
3k views

What are the advantages of web driver over selenium RC?

Please provide answers in detail, So that we could clarify that which one is to choose, Web driver or Selenium RC.
3
votes
2answers
5k views

Selenium Java WebDriver Can not Find Element with xpath or cssSelector

I can't find this element using selenium java webdriver. I have a before class method that loads the firefox driver and set the WebDriverWait. Then I have a test method to look for the elements with ...
1
vote
1answer
5k views

Console prompts error : Compound class names not permitted

The thing what I wanted to do was, write java code for automate the sending an email via gmail. When I try to locate element of send button it throws following errors. The code I used, is like this; ...
5
votes
5answers
34k views

How to handle Login pop up by using Selenium, which is used for login to applications?

Steps that I have to perform I have a website (www.xyz.com) I successfully opened it through Firefox. In the page, there is a google icon (image) which I am suppose to click After clicking the ...
10
votes
1answer
9k views

Extracting hidden text with Selenium

I'm trying to extract a certain message from my app. The text starts up as visible and then changes to style= "visibility: hidden" the visibility period is rather short, and I was wondering how can I ...
7
votes
3answers
32k views

How to click a link / button implemented as a div or span element with WebDriver

in my testing I need to click on a 'link' or a 'button' (actually it just looks like and functions as a link or a button) that is implemented as a div (or span) element. With Selenium IDE, I tried ...
3
votes
2answers
1k views

Selenium: Ajax Testing

Please brief me about the Ajax testing with selenium RC. As in Ajax element does not reflect on the view-source, but using firebug we can see the changes in HTML source code. There are two methods ...
6
votes
1answer
3k views

Read requests and responses made by browser on naviagating a web page in C# webdriver

I wants to read all the requests and responses made and get by the browser on navigating on a page. For example: If I navigate to http://www.yahoo.com then we observe that browser is making a lots of ...
4
votes
3answers
6k views

Where I can get all the commands related to Web Driver / Selenium 2?

I am not able to find all the commands for WebDriver / Selenium 2. Where can I get them?
1
vote
2answers
4k views

How to configure HtmlUnit Driver

I clearly missed a step trying to get HtmlUnit driver working with my app. I am getting the following exception: OpenQA.Selenium.WebDriverException was unhandled HResult=-2146233088 Message=...
3
votes
2answers
3k views

What is the hierarchy to use for finding elements - ID, class, name, xpath?

What is the hierarchy to use 'find element' by ID, class, or xpath and so on. Which is preferred over which? For some elements class is being used - is that recommended?
3
votes
3answers
5k 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 ...
4
votes
2answers
14k 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 ...
4
votes
1answer
2k views

Selenium2 Selecting an item, that apperas on a page occasionally

I am a Software tester who has a very basic knowledge of java and Selenium2. I am trying to write a Junit Selenium2 test to click on an item if it appears on the page.(The majority of the time this ...
3
votes
2answers
6k views

How to navigate to a alert using Selenium Web Driver with Java?

I am trying to navigate the command on the alert box, but I am not able to do it in Web Driver with JAVA. Please help me with it. Apart from this I would also like to know how to tackle with the ...
6
votes
2answers
65k views

How to compare values from the list or from dropdown list in webdriver (Java)?

Below is my code and html code, please let me know how to compare values. When i executed i am getting same result (Mateched) for multiple times. But i want to compare and display result as "Matched" (...
2
votes
2answers
5k views

Running Selenium Script in Chrome browser in android devices

Can any one suggest me how to do a set up to run selenium scripts in chrome browser of android device? Currently script is running fine in native browser of android device, but the requirement is ...
23
votes
13answers
33k views

What is a good website to hack around using Selenium?

I want to learn Selenium, but I don't know what to code. Sure, I can throw Google some queries, I can fill out some forms, press buttons, find divs and links, etc. But I think this stuff is pretty ...
-1
votes
1answer
517 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&...
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 ...
0
votes
2answers
67 views

How to configure css or xpath for below code

I need to configure xpath or css for selection under red border i.e a name contains "Patient List"
0
votes
1answer
480 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
5answers
4k 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
3answers
278 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 .
5
votes
2answers
308 views

How is Selenium 2.0 different from the previous version, apart from the WebDriver API?

I am slowly but surely starting to lean towards selenium 2.0 as everyone is really making a big fuss about it. I would like to know how much different is selenium 2.0 from the previous version apart ...
0
votes
5answers
23k views

JavascriptExecutor is not identifying the button to click in Webdriver

I have this HTML <div class="btnContr"> <input type="button" onclick="return cancel();" value="Cancel"/> Below is the xpath identified, using this xpath, I am not able to click on ...
0
votes
2answers
643 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....
5
votes
5answers
8k views

What kind of test cases can we not automate in selenium webdriver - java [closed]

I want to know what kind of test cases we cannot automate using selenium webdriver. I do not want to use any 3rd party tool (Autoit, etc..) What are the limitations of Selenium WebDriver?
5
votes
2answers
410 views

Matching images in Selenium2

Not sure if I'm even asking this question correctly, however, here goes. I'm looking at validating images in an automation suite that I just started. I am currently validating the location via XPath ...
1
vote
1answer
1k 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
710 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 ...
0
votes
1answer
3k 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 ...