We recently released the first of the betas for Selenium 2. It’s available for Java, C# and Ruby. If you’ve been holding off trying Selenium 2 because of the alpha label, then the biggest improvement you’ll see is with the new WebDriver APIs, but there’s a lot more!
- A promise of relatively stable APIs
- For Firefox only right now, an API for dealing with alerts, prompts and confirms.
- A brand new IE driver.
- Better selenium emulation when using webdriver
- And a better implementation of webdriver’s API backed by the traditional Selenium technology.
- Ubiquitous use of Sizzle for emulating CSS selectors where native CSS selectors aren’t supported
- The advanced user interactions API
- An update to the AndroidDriver’s Android app.
Of course, we’d love this release to be completely bug free, but this is, after all, a beta, so there are some known issues:
- The selenium 1.x emulation using IE is a little flaky.
- The ChromeDriver is not as capable as the others.
- Anything in our bug list.
You can download it from here:
http://code.google.com/p/selenium/downloads/list
You can read the javadocs and the ruby docs.
An obvious question is “When will the beta end?” The short answer is when we’ve implemented the alerts and prompts and advanced user interactions APIs in all supported browsers. We expect there to be some flex in some APIs (removing deprecated methods, and within the advanced user interactions API) but what you have here is basically what you’re going to get when we hit 2.0 final. I have no idea how long this will take, but if you’re interested in helping out, let us know!
Thanks are due to all the committers who have worked so hard to get this code into shape. Thanks are also due to all the people who have taken the time to file bugs, ask for features and participated on the mailing lists. Thank you to you too, for going out and trying this new beta of Selenium 2.
You rock. 🙂
Good news!
I’m waiting when it will be available as Maven2 repo.
Comment by Slava Semushin — December 24, 2010 @ 12:42 pm GMT+0000 |
Love writing test cases now and I do know when Alerts would be available for IE?
Comment by Venu — December 28, 2010 @ 8:11 pm GMT+0000 |
In maven repo soon?
Comment by Adrian Mitev — December 29, 2010 @ 10:58 am GMT+0000 |
Good news indeed! I hope it becomes available in the maven repo soon so we can start testing it.
Comment by Eirik Maus — December 29, 2010 @ 11:46 am GMT+0000 |
Surely want to give a try on Google chrome.
Comment by Nikesh — December 29, 2010 @ 12:35 pm GMT+0000 |
can’t find the jars for the webdrivers. I mean Selenium-htmlunit-driver-2.0 beta 1
Comment by Smruti — December 30, 2010 @ 12:33 pm GMT+0000 |
@Smruti The individual drivers are merged into the selenium-java download.
Comment by shs96c — December 30, 2010 @ 1:06 pm GMT+0000 |
With Firefox i get NullPointerException with driver.swtichTo().alert().getText() where the same thing works with .switchTo().activeElement().getText() works. Also the old js API for alerts works.
What should be working in the new beta for alerts? Sample code?
Comment by Adrian Mitev — January 3, 2011 @ 11:06 pm GMT+0000 |
Actually i found it. The problem was that i was using selenium.click() instead of webdriver.findElement(..).click().
Comment by Adrian Mitev — January 4, 2011 @ 11:41 am GMT+0000 |
After upgrading from 2.0a7 to 2.0b1 using Maven my JUnit tests silently skipped. After investigation I found than 2.0b1 now depends from Test-NG and when this JAR is present my tests not running at all.
Don’t know it is a bug or not, but be carefully!
Comment by Slava Semushin — January 8, 2011 @ 3:21 pm GMT+0000 |
This happened to me too!
It should be clear somewhere else!
For everyone using JUnit, add this to your pom:
org.seleniumhq.selenium
selenium
2.0b1
org.testng
testng
Comment by jordi — January 10, 2011 @ 12:52 pm GMT+0000 |
I mean…
org.seleniumhq.selenium
selenium
2.0b1
org.testng
testng
Comment by jordi — January 10, 2011 @ 12:54 pm GMT+0000
Probably, you mean:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0b1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
? 🙂
Comment by Slava Semushin — January 10, 2011 @ 4:08 pm GMT+0000
Hi,
Will it be possible to take entire page screenshot in other browsers too other than Firefox? Since the tool supports multiple browsers, we use it for browser testing of application, so screenshots are necessary for later reference.
Comment by Sudeep — January 9, 2011 @ 4:55 am GMT+0000 |
Good news…Now does it support waitForAjax or something. Com eon, We are web 2.0
Comment by Jigar Shah — January 20, 2011 @ 1:39 pm GMT+0000 |
@jigar shah: Selenium 2 has a handy Wait interface and WebDriverWait class for just that sort of thing.
Comment by shs96c — January 20, 2011 @ 2:37 pm GMT+0000 |
Is there any document that details about what’s new and give some examples about using web driver?
Comment by thavva — February 16, 2011 @ 3:17 pm GMT+0000 |