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

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
 

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

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

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