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
82 votes
14 answers
445k views

How to download a file using Selenium's WebDriver?

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too. Here's an example: link = self.browser....
Aaron's user avatar
  • 2,335
59 votes
18 answers
10k views

What are some tools for testing Mobile web apps?

I'm thinking along the lines of a Firebug for the iPhone/iPad/Android/BB that can truly give more insight on the markup/scripts. Even when testing on the simulator/device, it's hard to truly simulate ...
31 votes
13 answers
104k views

How can I reduce the execution speed in webdriver so that I can view properly what is happening on browser?

I want to reduce the speed for execution of script so that I can view the execution properly on browser. I want do this in webdriver.
Ashwani Raj's user avatar
29 votes
6 answers
153k views

How do I work with dropdowns in Selenium Webdriver?

This is a canonical question, intended to provide a comprehensive answer to many related questions. I understand the basics of working with Selenium Webdriver; I can navigate to pages, click buttons, ...
Yamikuronue's user avatar
  • 3,372
29 votes
7 answers
137k views

Selenium: reuse existing browser session, instead of opening new windows?

This has been asked a million times on the web, but there's no clear cut answer. I tried "-browserSessionReuse" today without any luck; my tests keep spawning new browser windows. X:\QA\Automation\...
Aaron's user avatar
  • 2,335
29 votes
9 answers
11k views

Page Objects design issues

I have started using the Selenium 2 /Webdriver web automation framework a couple of weeks ago and I'm generally pleased, but I find myself unsure about how to best design my Page Objects. The ...
Sassy's user avatar
  • 431
27 votes
7 answers
214k views

Running WebDriver without opening actual browser window

I've heard rumors that Selenium WebDriver can run without opening a real browser window, meaning it runs in the background. I am using the C# Client Drivers, FirefoxDriver within the automated tests, ...
JustBeingHelpful's user avatar
24 votes
8 answers
110k views

Can I use Selenium to do Desktop Application testing?

Is it possible to test desktop applications using selenium? Suppose we have a simple application like gtalk. A desktop application, can we automate that application with selenium.
Ashwani Raj's user avatar
23 votes
13 answers
35k 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 ...
Maria Ines Parnisari's user avatar
21 votes
4 answers
64k views

How to Implement Page Object and Page Factory Pattern in Selenium Webdriver?

I am a beginner in learning selenium Webdriver. I am not able to understand how page object and factory models works and how it can be beneficial? Kindly help me explain it with detailed explanation....
tech523's user avatar
  • 213
20 votes
10 answers
129k views

How to handle "Time out receiving message from the renderer" in chrome driver?

I am new to selenium, I'm facing "Time out receiving message from the renderer" in chrome browser while running test with selenium 2.41 and chrome 2.9x. I have tried many tests to reproduce the issue, ...
Ajmal's user avatar
  • 591
19 votes
4 answers
174k views

Selenium: How to identify the button WebElement

In my web page I'm having following two buttons: <button onclick="addToSelected('newApplicationForm');">Add Strategy</button> <button onclick="submitAddNewApplication('...
futurenext110's user avatar
19 votes
5 answers
28k views

Is there a captureNetworkTraffic implementation in Selenium 2 via webdriver?

If yes, how is it called, or where can I find more info about it? (I'm not talking about using WebDriverBackend.) If not, what alternatives are there?
Roni Yaniv's user avatar
19 votes
5 answers
137k views

Webdriver Check if Checkbox is Set and Set it if Not

I am learning Webdriver with JUnit by going through Alan Richardson's Selenium Simplified book and taking translating the exercises/tests from Selenium RC to Webdriver. So far, this has proven to be ...
SheyMouse's user avatar
  • 604
18 votes
12 answers
63k views

Using Selenium Webdriver with Windows Authentication

I'm attempting to create some selenium tests for a website that requires windows authentication. I got my first test up and running fairly easily, but it pauses as soon as the system prompts for ...
timDunham's user avatar
  • 321
17 votes
8 answers
20k views

Problem with IE9 security certificate when accessing HTTPS URLs using Selenium 2 WebDriver

I have some Selenium 2 WebDriver test cases for Firefox and Internet Explorer 9. When I access HTTPS URLs on IE9 (Windows 7 64 bit) I get: There is a problem with this website's security certificate. ...
damo_inc's user avatar
  • 273
17 votes
4 answers
831 views

Where can I find information on getting started with Selenium 2?

Some background. I am a long time WatiN coder, and have been since I first looked at Selenium a few versions ago, and decided that it didn't meet my needs, and then went with WatiN. I now want to ...
Bruce McLeod's user avatar
  • 9,750
16 votes
4 answers
68k views

What is Selenium's default timeout for page loading?

I am using Selenium 2. I have loaded the page using Get command in WebDriver class which is in the package org.openqa.selenium. My question is that what is Selenium's default timeout for page loading?
saikrishna's user avatar
16 votes
5 answers
31k views

How do you wait for jQuery Ajax calls to complete in Selenium 2

I use Selenium 2 in C# to automate testing of our web sites. When building non-Ajax functionality, using webDriver.FindElement(By.Id("element-id")) to find elements on a page works fine, but when ...
DownChapel's user avatar
14 votes
6 answers
25k views

Which locator do you use with Selenium: CSS or XPath?

I have heard that, when using Selenium, the CSS Locator has better performance than the XPath Locator. Which Locator do you use in your tests? Have you seen a great performance improvement when ...
Tarun's user avatar
  • 3,437
14 votes
3 answers
19k views

Automated tests pass every time when run individually, but when they are clumped into a test suite it's a toss up if the tests will pass

I have around 200 test classes for my web application at the moment. I use Selenium2/Webdriver and the tests are written in java, with TestNG used as my framework. When I run each test by itself, ...
squeemish's user avatar
  • 1,265
13 votes
7 answers
99k views

Is it possible to stop page loading on the browser using selenium web-driver?

I searched online, but couldn't find anything about how to stop page loading over a browser using selenium web-driver. Any idea for the same?
CodeLover's user avatar
  • 231
13 votes
3 answers
15k views

Is it a bad practice to use implicit wait in Selenium Webdriver? Should one use only explicit wait?

I was reading up on implicit and explicit waits and found the following two statements: Implicit wait is not considered a good practice because different browsers have different loading times and ...
LittlePanda's user avatar
12 votes
5 answers
119k 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"))....
kenorb's user avatar
  • 377
12 votes
2 answers
3k views

How to manage application data when running multiple tests in parallel?

Our functional test suite is slow I have inherited a functional test suite using Selenium 2 (Webdriver) and Junit. We have around 500 tests written for our Java web application. Running the full ...
Mike R's user avatar
  • 221
11 votes
6 answers
16k views

How do you block Google Analytics from Selenium automated visits?

Basically, we have a javascript integration on client's webpages. We don't have much (or any) control of the deployed environment, hence the only way to test our integration is truly working is using ...
craastad's user avatar
  • 656
11 votes
1 answer
15k views

Faking system time/date with Selenium Webdriver?

Is webdriver capable to run a browser with a faked time, date or time zone? Such ability would be highly useful for my automation purposes. Yet, I did not find any such ability in the webdriver ...
Olivier's user avatar
  • 111
11 votes
6 answers
56k views

How to minimize the browser window which was launched via Selenium Webdriver?

How can I minimize the browser window which has been launched via Selenium Webdriver? I see that there is a method to maximize (documentation), but I cannot find the converse for minimize. I have ...
kanayikkaran's user avatar
11 votes
5 answers
31k 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 ...
SteveCZ's user avatar
  • 463
10 votes
9 answers
86k views

How to verify two images using Selenium WebDriver? [duplicate]

Webdriver does not provide direct any function to image verification, but we can verify images by taking two screenshots of the whole web page using TakeScreenshot WebDriver function, one at script ...
Bharat Mane's user avatar
  • 6,785
10 votes
5 answers
17k views

Testing Page Layout with webdriver

Has anyone tried to test the page layout of a website using webdriver? To be specific, using webelement.getPosition() and webelement.getDimension(). Shouldn't these two methods be enough for testing ...
A.J's user avatar
  • 793
10 votes
1 answer
11k 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 ...
Gil_G's user avatar
  • 103
10 votes
2 answers
21k views

How can I send the action "Ctrl" + "Alt" + "Double Click" to the browser

I am writing automated tests for a site at work and we have certain screens that when we send a specific set of keystrokes, a section of the page will become visible and allows us to see information ...
tmacblane's user avatar
  • 131
9 votes
11 answers
100k views

Selenium test case fails due to page load time

I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever i feel it takes more time to load....
kittudk's user avatar
  • 153
9 votes
5 answers
35k views

WebDriver: Can I inject a jQuery script for a page that isn't using jQuery?

Is it possible to inject a jQuery script into a page if the page isn't already using jQuery? We have a few pages in our sites where we don't add jQuery if it doesn't need it, but I'm using it to ...
JustBeingHelpful's user avatar
9 votes
3 answers
19k views

How to wait until the count of a web element changes in webdriver?

I'm new to selenium. I am facing an issue. The number of web elements in a page increases on a button click(triggered by ajax call). So while getting the size of the element after button click gives ...
Ajmal's user avatar
  • 591
9 votes
9 answers
65k views

What Concepts of Java do i need to learn to use Selenium Webdriver?

I want to learn Selenium WebDriver automation using Java. I have done manual testing before and want to learn automation. I just know the basics of Core Java. Could you please suggest me the Core ...
Drew's user avatar
  • 91
9 votes
3 answers
31k views

Selenium form input sendKeys doesn't always work under IE

We're trying to use Selenium 2.0b3 to verify behavior of a Java web site we've recently acquired from a third party. The site often uses AJAX to plop HTML replacements onto the page. Internet ...
Alan Krueger's user avatar
9 votes
2 answers
7k views

key points for choosing a framework in selenium webdriver - Java

My query is related to this Choosing framework type for selenium RC/Webdriver I am a beginner in Selenium and want to know how to select or choose a framework in Selenium Webdriver. What are the key ...
forumqaa's user avatar
  • 389
9 votes
5 answers
44k views

Selenium 2 element.click() is unreliable

I am using Selenium 2 2.16 build. I've been running into problems where I get a variable response to a click() call, where sometimes the click activates the behaviour behind the element (new page ...
theCesspit's user avatar
9 votes
3 answers
5k views

Attach to browser not spawned by Selenium2

One of the things that I miss about WatiN is the ability to attach to browser instances that were not spawned by Selenium. In my last position, this was the whole reason why I used WatiN, as the ...
Lyndon Vrooman's user avatar
9 votes
4 answers
38k views

How do I start the Internet Explorer WebDriver for Selenium in Python?

I had a devil of a time figuring this out. It wasn't documented on the web anywhere I could find. I ended up reading the webdriver init.py to find out.
Aaron's user avatar
  • 2,335
8 votes
4 answers
250 views

Where does Automation creation happen w/in the Development Cycle?

I’m a Software QA Engineer at a small web development company and I need help wrapping my brain around implementing a new process. As of recently, my shop only handled ‘one-offs’. We would work on ...
glamb's user avatar
  • 165
8 votes
4 answers
9k views

What are recommended scenarios to use Selenium Tests for?

My company is introducing BDD into our projects. Our customers have differents processes-cases wich also may fork at specific points. It is a mostly long and tedious work to test each case and each ...
SDD64's user avatar
  • 231
8 votes
3 answers
66k views

"Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I ...
squeemish's user avatar
  • 1,265
7 votes
7 answers
39k views

Take screen shots using selenium webdriver

How to take screen shot on both test cases "Positive and Negative" results? NOTE: Currently, I am working in selenium webdriver (junit) and I did not have an idea about how to code for adding methods ...
User27's user avatar
  • 151
7 votes
2 answers
7k views

How do I split my PageObject Model classes?

My page object model class is getting rather long. Should I create a different class with the same name as the page object model with a 2 added at the end. Or does this go against the page object ...
Robben's user avatar
  • 1,036
7 votes
4 answers
4k views

Selenium2 assert questions

I've recently started converting my automation suites from WatiN to Selenium2. In both cases, I've been using C#. Although these may seem like simple questions, I've been searching for answers for ...
Lyndon Vrooman's user avatar
7 votes
2 answers
8k views

Solving "SeleneseTestCase is deprecated" issue

I'm working through the "Selenium Simplified" book just to really gain a solid understanding of Selenium and Java. I know the basics of Java, but this one is frustrating me. I must be missing some ...
Jason M's user avatar
  • 535
7 votes
1 answer
38k views

Fieldlevel validation in Selenium Webdriver (Java)

how to test validations for "FIRSTNAME" textfield. Below are the details and code. URL: http://www.vrlbus.in/vrl2013/register_customer.aspx Special chars: #!#!#$@#!$@!$@#$%#%^#$^^&%&$%* (...
QA4it's user avatar
  • 1,412

1
2 3 4 5
11