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.

learn more… | top users | synonyms

3
votes
2answers
30k views

How to switch/handle particular popup window (When multiple popup are opened) and close particular popup window

i know how to switch to single popup window, but i do not know how to switch particular popup window when you have more popup windows. Scenario is: Go to the each and every popup 1. Get the title 2. ...
0
votes
1answer
72 views

Getting and logging the selenium version used in a groovy project

I'm using Selenium in my Groovy application as a Maven dependency. Now I'm looking for a way to log the used Selenium Version to the console. I tried this: BuildInfo info = new BuildInfo(); def ...
1
vote
7answers
22k 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 ...
0
votes
2answers
554 views

Selenium - How to get table rows visible in the dialogbox?

In a Selenium Junit test, for a table with 'n' rows in a dialog box of a webpage, I am able to calculate number of rows using Table.size() (Table is a List of elements which finds elements with tag ...
0
votes
4answers
64 views

Escape key for Safari using Selenium

I am using Selenium webdriver (Java) and ran into a problem. I made the method, public void escape() { Actions action = new Actions(driver); ...
1
vote
1answer
33 views

Jenkins build failing for a test case when it have SendKeys() function

if I run my test suite (Selenium WebDriver) with test cases giving text output only using System.out.println("some text"); Build status is successful using Jenkins But whenever it comes to the ...
1
vote
2answers
482 views

Mocking HTTP reponses in Selenium Web Driver using Python

I am currently experimenting with the Python version of Selenium Web Driver. Using the driver has been straight forward so far but I have been struggling recently with the issue of mocking HTTP ...
1
vote
1answer
579 views

“session has expired” error - after clicking a button with webdriver in IE8

After clicking a button in my application with webdriver, it gives me “sorry..your session has been expired” in IE8 and i am unable to proceed. But I am able to do it manually. Now to proceed with ...
0
votes
0answers
17 views

AjaxElementLocatorFactory = Implicit or Explicit

I'm looking for solution in page factory to wait. I don't want to use something like Implicit wait, but something like Explicit. I read about AjaxElementLocatorFactory, but I'm not sure that it ...
3
votes
5answers
15k views

WebDriver API: 'Failed to send keys because cannot focus element' — better workaround than using Firefox instead of Chrome?

There's a bug in the chromedriver.exe Chrome driver for Selenium's WebDriver API. You can't use send_keys for certain types of inputs, like for the jQuery plugin "EZPZ Hint". It works okay on simple ...
12
votes
5answers
31k 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. ...
1
vote
2answers
408 views

Need help to get drop down in a list (phpunit+selenium2)

I am new in Phpunit and selenium2. Need help to get all the values of drop-down in a list. <select id="month" class="_5dba" title="Month" name="birthday_month" aria-label="Month"> <option ...
1
vote
1answer
220 views

Unable to open the specified URL on a real device while running Selenium tests using ios-driver

I am trying to automate mobile web testing using ios-driver on an iPhone 6 plus (real device). The Safari browser opens but the specified URL (google.com in this case) is not opened (i.e. only ...
1
vote
1answer
640 views

Running Selenium webdriver scripts in android device (Samsung galaxy tab)-Portrait mode

I have been stuck in an issue while running selenium webdriver script in android device -Portrait mode. Script is running successfully in landscape mode but when we run the same script in android ...
1
vote
1answer
103 views

sometimes “invisible element” exception and sometime ‘timeout’ appers

I am writing a test script in selenium webdriver(selenium 2.0) with C# for below html- <table id="A_switch" class="tabswitch"> ------ </table> <div id="A" class="page ribbonpage"> ...
3
votes
4answers
215 views

Order in which options are returned by getOptions() in Dropdown box(Select Class) in Selenium WebDriver?

When we get options of a dropdown in Selenium Webdriver the following way Select dropdown = new Select(driver.findElement(By.id(dropDownId))); List<WebElement> options = ...
2
votes
3answers
225 views

how to find the css style attribute of a particular html element using Robot Framework?

I am writing an automation test script using Robot Framework & Selenium2Library for testing our web application. One of my test cases involves checking the CSS style attribute of an HTML tag. Is ...
2
votes
1answer
141 views

Efficent way of checking if Element is Not Present

I currently use TestNG's assertFalse to make sure a particular element is Not shown when not logged in on a site. eg assertFalse(isElementPresent(PageElements.PDFLinkText),"PDF link present when not ...
1
vote
1answer
406 views

Unable to open Safari app on iPhone simulator while running Selenium test using ios-driver

I am trying to automate mobile web testing using ios-driver. The safari browser does not open even though the simulator launches. The configuration as shown on terminal by running the command java ...
3
votes
1answer
323 views

PHPUnit Selenium2TestCase BadMethodCallException

I have installed selenium-server-standalone-2.33.0.jar, phpUnit, selenium extension for phpUnit. This test runs ok: $this->url('/'); $this->assertEquals('my title',$this->title()); But ...
0
votes
1answer
375 views

Selenium Webdriver: No such element exception even though element gets available after waiting for some time

I've been keep on getting NoSuchElementException whenever I try to get an web element. I know that the web element becomes present after some time. So, I've explicitly waited for 5-10 seconds until ...
0
votes
0answers
58 views

Selenium Grid2 and Sikuli

Has anyone tried integrating Sikuli to Selenium Grid architecture ? I have read many articles online but unfortunately couldn't reach to a solution. To briefly explain, my scripts are equipped with ...
1
vote
1answer
450 views

Unable to run Appium Version 1.3.6-(Ophiuchus) on Yosemite for Testing Android App on real device

These are my settings: My SDK path: -/usr/local/adt-bundle-mac-x86_64-20140702/sdk My APK path -/usr/local/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/Setmore.apk Given Package name, Launch ...
0
votes
1answer
59 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; ...
2
votes
2answers
104 views

Does Selenium depend on internet speed

I have a small question regarding selenium automation. I am using selenium automation for one website(live). Does its performance depend on internet speed?
0
votes
1answer
332 views

How to change the Text of a IWebElement of Selenium in C#

The Title pretty much explains everything. I'm searching for a way to change let's say <h1 id="title">Title<h1> to <h1 id="title">Nothing<h1> I'm kind of desperate since ...
0
votes
1answer
1k views

Help with else if statement Webdriver Selenium

I have this code below which seems to not go to the else if statement. It runs the first part but never seems to go to part 2, if element 1 is already selected. Thanks if ...
1
vote
2answers
750 views

Testing pdf/excel content with C#

Our site has a good number of reports that are using SSRS,Crystal and Excel. We are using C# with Selenium WebDriver. I have been searching for the best practices and best ways and tools to test the ...
1
vote
2answers
7k views

Question: C# Selenium: Read rows from html table until the last row is found, and Store in array

The following snapshot is what I see when I do a view of class and Ids in using IE Developer tool. It consists of a table and inside the table there are links. I need to read all the link names, and ...
8
votes
4answers
14k 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.
0
votes
6answers
214 views

Which can be better to work with Selenium WebDriver - Java or Python? [closed]

I have start learning Selenium WebDriver, but i am confused between Java and Python. Which language should i choose? I do have basic ideas of Core Java but haven't wrote a single piece of code with ...
1
vote
1answer
477 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 ...
1
vote
1answer
637 views

Is it possible to use Selenium's RemoteWebDriver and Appium's AppiumDriver in parallel?

I tried asking this on StackOverflow but unfortunately I couldn't find a solution to this there. Then I learned about SQA StackExchange so I thought I'd try here too. I'm trying to write some test ...
0
votes
1answer
2k views

Use Selenium Webdriver to capture all the values from Google Auto Suggest Edit Box and display them in the console

import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; public class ...
0
votes
1answer
557 views

Question about 'self.assertIn' & 'driver.title'

I researched this as much as I could on my own but came to no clear conclusion to my question. I've been teaching myself automation testing via Python + Selenium, I'm as new or n00b as it gets so bare ...
1
vote
2answers
64 views

How to skip failed test cases using TestNG

How to Skip the failed test cases and to execute the remaining test cases when using Selenium, Java and TestNG.
1
vote
2answers
53 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 ...
12
votes
10answers
17k 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 ...
0
votes
2answers
52 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 ...
4
votes
1answer
60 views

How can i automate using selenium to check if an element is present in viewport

My scenario is to make sure that my search bar is not sticky. For this I am scrolling to middle of the page. Now I need to check that my search bar is not visible in my viewport. isDisplayed method is ...
27
votes
14answers
89k 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 = ...
0
votes
2answers
56 views

how do i use list for selenium web driver in java

how do i use list for selenium web driver in java I need to select id which are continuously changing, and one id is in one row. need to select id from each Edit : <tr id="tr-132885-id" ...
1
vote
3answers
5k views

Difficulty setting focus on element with Selenium WebDriver

I have a Selenium WebDriver test where I enter some text into a text input box var input_Note = Driver.Instance.FindElement(By.Id("note")); input_Note.SendKeys("test"); I then attempt to ...
0
votes
1answer
35 views

Need help with getting list of items in Page factory, c#

I am new to Page factory model - I need number of elements in list, I am trying in the following way: **[FindsBy(How = How.XPath, Using = "//*[@id='ABC']/div")] public List<IWebElement> ...
5
votes
1answer
142 views

Eclipse is automatically running unwanted selenium tests

I have two test files (lets say they're SomethingTestA and SomethingTestB). Inside SomethingTestA, I have a bunch of mini smoke tests methods, like so @Test public void testCreate() { ... } ...
0
votes
3answers
2k 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.
0
votes
0answers
28 views

Division not appended on click event in phantomjs

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
2answers
42 views

Benefits of @FindBy annotations

I have recently come across @FindBy as a method of locating elements within webdriver. What are the benefits or disadvantages of this approach compared with the to more common approach of using ...
5
votes
4answers
13k views

Desktop Application testing using selenium

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.
0
votes
3answers
172 views

How to handle file upload and download using Robot Class?

I'm trying to build a framework using Selenium. There is a scenario where I need to download a file, and there is another where I need to upload one. I've gone through the option in AutoIt, but it ...