Activate your free membership today | Log-in

Tuesday, May 12th, 2009

Selenium WebDriver Re-introduced

Category: Testing

Simon Stewart is a smart man, and nice chap, that I had the fortune to meet quite awhile back at Google London. He is an active Selenium hacker, and has re-introduced Web Driver that lets you write this Java code:

JAVA:
  1.  
  2. // Create an instance of WebDriver backed by Firefox
  3. WebDriver driver = new FirefoxDriver();
  4.  
  5. // Now go to the Google home page
  6. driver.get("http://www.google.com");
  7.  
  8. // Find the search box, and (ummm...) search for something
  9. WebElement searchBox = driver.findElement(By.name("q"));
  10. searchBox.sendKeys("selenium");
  11. searchBox.submit();
  12.  
  13. // And now display the title of the page
  14. System.out.println("Title: " + driver.getTitle());
  15.  

WebDriver has a simple API designed to be easy to work with and can drive both real browsers, for testing javascript heavy applications, and a pure 'in memory' solution for faster testing of simpler applications.

Interested? Check out the getting started guide where you do a Google Suggest test, and watch Simon from waaaay back in 2007:

Posted by Dion Almaer at 6:54 am
3 Comments

+++--
3.6 rating from 14 votes

3 Comments »

Comments feed TrackBack URI

And for the .Net guys out there, there exists a zillion similar solutions (which I know about) for .Net. Among one of the more prominently known ones are WatiN, which also carries the bonus of being maintained by Jeroen which is very nice when it comes to listening to feature requests, wants, needs and such.

Comment by ThomasHansen — May 12, 2009

Selenium is a favorite, thanks for the info.

Comment by taheal123 — August 24, 2009

Pass4sure enjoys a wide rang of reputation among the IT learners and candidates by offering variety of product forms, as software, hardcopy, video, E-Zine, etc. In order to show their appreciation of the contribution made by customers constantly, some promotions are adopted, as discounts and Points for gift. Recently, Pass4sure is promoting an Affiliate Program to enlarge its business. The Most Popular exams List :156-215.65642-591 1Z0-042 NS0-163 350-030 642-975 640-721 N10-004 132-S-911.3 650-393 1Z0-053 PW0-104640-460 640-553 646-363 JN0-342 640-822 350-001-LAB 650-175 642-591 642-515 JN0-342 640-802 Click Pass 4 Sure to get more information!

Comment by pass4sure — February 24, 2010

Leave a comment

You must be logged in to post a comment.