SlideShare a Scribd company logo
1 of 8
A Bluffer's Guide
to Selenium 2
By: Simon Stewart & Anthony Long
www.seleniumcoe.com
What Is Selenium / Sel 2 / Webdriver
Selenium is a test automation framework that interacts with a
browser via javascript.
Webdriver is a test automation framework that interacts with
the browser directly.
Selenium 2 is the merging of the Open Source "selenium" and
"webdriver" projects.
The most recent release is Selenium 2.0a4.
It's really rather good.
www.seleniumcoe.com
Alphas!?
Alphas - finish "baking" the new APIs
ā€¢ Mostly done
o Need to add the advanced user API
o and handling alerts and prompts
ā€¢ What's there is stable: we're only adding methods now
ā€¢ Timeline: ~2 months
Betas - Implement all APIs in all supported browsers
ā€¢ Supported browsers?
o Firefox 3-latest, IE 6-latest, Chrome, Android, iPhone
ā€¢ Timeline: Unknown
Release - As beta, but equal support for Python, Ruby, Java
and C#
www.seleniumcoe.com
How Does It Differ From Selenium 1
Two major differences:
ā€¢ Not trapped in the JS sandbox
o So there's a way to handle "alerts" on window load
cleanly.
o Better emulation of user input, such as clicking and
typing.
ā€¢ Cleaner API
o So it's easier to write and maintain code.
o Far less confusion about which method to call.
www.seleniumcoe.com
Why Change?
ā€¢ The OSS team are now focusing almost all their effort on
Selenium 2
ā€¢ Better support for IE
o Still a huge part of the market
ā€¢ Support for testing mobile browsers
o Will form a large part of the market in future
ā€¢ Buy-in and support from browser manufacturers:
o Opera
o Chrome
ā€¢ Becoming used by a broader range of OSS projects
o Not only Selenium, but also Watir
o More eyes and users means bugs detected more quickly
o And fixed more rapidly!
www.seleniumcoe.com
How Do I Migrate?
ā€¢ Download Selenium 2
ā€¢ Drop JARs into CLASSPATH
o Using Selenium 1 tech, but with the new classes
available.
ā€¢ Replace "DefaultSelenium" with
"WebDriverBackedSelenium"
o An implementation of selenium using the new technology
o Inefficient, but allows a managed migration.
ā€¢ Migrate code to the new API on an "as needed" basis
o Suggestion: when you edit a file using the old API, move
to the new one
www.seleniumcoe.com
What's Coming Up?
ā€¢ Advanced User Interaction API:
o Allows you to model "click here, then hold shift, click on
these three elements, release shift, and drag everything
over here"
o Will be necessary for complex applications
o Selenium 2.0a5 or 6
ā€¢ Implicit Waits:
o The framework will wait for an element to be present
before continuing
o Timeout easy to control
o Preview in Selenium 2.0a4, fully implemented in 2.0a5
ā€¢ Android support:
o Selenium 2.0a5
www.seleniumcoe.com
If You're Working on the Selenium
Code Itself
ā€¢ Shared JS
o JS is great for querying the DOM
o Shared JS functions between all webdrivers and
Selenium 1.x
o Dramatically easier to fix issues to do with JS in all
browsers
ā€¢ Simplified Build Grammar
o Hey, it matters to us :)
ā€¢ To build:
o svn checkout http://selenium.googlecode.com/svn/trunk/
selenium-read-only
o rake build
o cd build/
www.seleniumcoe.com

More Related Content

What's hot

Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
Shreshtt Bhatt
Ā 
Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009
Ajax Experience 2009
Ā 

What's hot (19)

End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms Organizations
Ā 
Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
Ā 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
Ā 
Peeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API SecurityPeeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API Security
Ā 
Python Testing 101 with Selenium
Python Testing 101 with SeleniumPython Testing 101 with Selenium
Python Testing 101 with Selenium
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Ā 
Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009Ted Husted Presentation Testing Ajax Applications Ae2009
Ted Husted Presentation Testing Ajax Applications Ae2009
Ā 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1Learn Test Automation using Selenium - Lesson 1
Learn Test Automation using Selenium - Lesson 1
Ā 
From IDE to Selenium 2
From IDE to Selenium 2From IDE to Selenium 2
From IDE to Selenium 2
Ā 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
Ā 
Make Your UI Tests Resilient with the Next Generation of Frameworks
Make Your UI Tests Resilient with the Next Generation of FrameworksMake Your UI Tests Resilient with the Next Generation of Frameworks
Make Your UI Tests Resilient with the Next Generation of Frameworks
Ā 
Cypress
CypressCypress
Cypress
Ā 
Mobile automation: a three act tragedy
Mobile automation: a three act tragedyMobile automation: a three act tragedy
Mobile automation: a three act tragedy
Ā 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
Ā 

Similar to Selenium 2

Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
Ā 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
Ā 
[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security
OWASP
Ā 
Selenium - The Way Of Success
Selenium - The Way Of SuccessSelenium - The Way Of Success
Selenium - The Way Of Success
Zbyszek Mockun
Ā 

Similar to Selenium 2 (20)

Selenium
SeleniumSelenium
Selenium
Ā 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
Ā 
[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver
[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver
[Rakuten TechConf2014] [Osaka] Introducing Selenium 2 WebDriver
Ā 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Ā 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Selenium Overview
Selenium OverviewSelenium Overview
Selenium Overview
Ā 
Selenium Latest Version Update | QR Solutions Pvt Ltd
Selenium Latest Version Update | QR Solutions Pvt LtdSelenium Latest Version Update | QR Solutions Pvt Ltd
Selenium Latest Version Update | QR Solutions Pvt Ltd
Ā 
Testing and Automation
Testing and AutomationTesting and Automation
Testing and Automation
Ā 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Ā 
[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security[OWASP Poland Day] A study of Electron security
[OWASP Poland Day] A study of Electron security
Ā 
Selenium - The Way Of Success
Selenium - The Way Of SuccessSelenium - The Way Of Success
Selenium - The Way Of Success
Ā 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
Ā 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
Ā 
Selenium overview ppt by quontra solutions
Selenium overview ppt by quontra solutionsSelenium overview ppt by quontra solutions
Selenium overview ppt by quontra solutions
Ā 
Selenium
SeleniumSelenium
Selenium
Ā 
Demystifying Selenium framework
Demystifying Selenium frameworkDemystifying Selenium framework
Demystifying Selenium framework
Ā 
What is selenium
What is seleniumWhat is selenium
What is selenium
Ā 

More from onlinemindq

Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
onlinemindq
Ā 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
Ā 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
onlinemindq
Ā 
Selenium.ppt
Selenium.pptSelenium.ppt
Selenium.ppt
onlinemindq
Ā 
Selenium 2
Selenium 2Selenium 2
Selenium 2
onlinemindq
Ā 

More from onlinemindq (7)

Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
Ā 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
Ā 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
Ā 
Selenium.ppt
Selenium.pptSelenium.ppt
Selenium.ppt
Ā 
Selenium 2
Selenium 2Selenium 2
Selenium 2
Ā 
A Buffer's Guide to Selenium 2
A Buffer's Guide to Selenium 2A Buffer's Guide to Selenium 2
A Buffer's Guide to Selenium 2
Ā 
Selenium Open Source Tool
Selenium Open Source ToolSelenium Open Source Tool
Selenium Open Source Tool
Ā 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Ā 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Ā 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Ā 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Ā 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 

Selenium 2

  • 1. A Bluffer's Guide to Selenium 2 By: Simon Stewart & Anthony Long www.seleniumcoe.com
  • 2. What Is Selenium / Sel 2 / Webdriver Selenium is a test automation framework that interacts with a browser via javascript. Webdriver is a test automation framework that interacts with the browser directly. Selenium 2 is the merging of the Open Source "selenium" and "webdriver" projects. The most recent release is Selenium 2.0a4. It's really rather good. www.seleniumcoe.com
  • 3. Alphas!? Alphas - finish "baking" the new APIs ā€¢ Mostly done o Need to add the advanced user API o and handling alerts and prompts ā€¢ What's there is stable: we're only adding methods now ā€¢ Timeline: ~2 months Betas - Implement all APIs in all supported browsers ā€¢ Supported browsers? o Firefox 3-latest, IE 6-latest, Chrome, Android, iPhone ā€¢ Timeline: Unknown Release - As beta, but equal support for Python, Ruby, Java and C# www.seleniumcoe.com
  • 4. How Does It Differ From Selenium 1 Two major differences: ā€¢ Not trapped in the JS sandbox o So there's a way to handle "alerts" on window load cleanly. o Better emulation of user input, such as clicking and typing. ā€¢ Cleaner API o So it's easier to write and maintain code. o Far less confusion about which method to call. www.seleniumcoe.com
  • 5. Why Change? ā€¢ The OSS team are now focusing almost all their effort on Selenium 2 ā€¢ Better support for IE o Still a huge part of the market ā€¢ Support for testing mobile browsers o Will form a large part of the market in future ā€¢ Buy-in and support from browser manufacturers: o Opera o Chrome ā€¢ Becoming used by a broader range of OSS projects o Not only Selenium, but also Watir o More eyes and users means bugs detected more quickly o And fixed more rapidly! www.seleniumcoe.com
  • 6. How Do I Migrate? ā€¢ Download Selenium 2 ā€¢ Drop JARs into CLASSPATH o Using Selenium 1 tech, but with the new classes available. ā€¢ Replace "DefaultSelenium" with "WebDriverBackedSelenium" o An implementation of selenium using the new technology o Inefficient, but allows a managed migration. ā€¢ Migrate code to the new API on an "as needed" basis o Suggestion: when you edit a file using the old API, move to the new one www.seleniumcoe.com
  • 7. What's Coming Up? ā€¢ Advanced User Interaction API: o Allows you to model "click here, then hold shift, click on these three elements, release shift, and drag everything over here" o Will be necessary for complex applications o Selenium 2.0a5 or 6 ā€¢ Implicit Waits: o The framework will wait for an element to be present before continuing o Timeout easy to control o Preview in Selenium 2.0a4, fully implemented in 2.0a5 ā€¢ Android support: o Selenium 2.0a5 www.seleniumcoe.com
  • 8. If You're Working on the Selenium Code Itself ā€¢ Shared JS o JS is great for querying the DOM o Shared JS functions between all webdrivers and Selenium 1.x o Dramatically easier to fix issues to do with JS in all browsers ā€¢ Simplified Build Grammar o Hey, it matters to us :) ā€¢ To build: o svn checkout http://selenium.googlecode.com/svn/trunk/ selenium-read-only o rake build o cd build/ www.seleniumcoe.com