SlideShare a Scribd company logo
1 of 15
Selenium 2.x / Web Driver

             By
        Aparna Naik
    www.DestinationQA.com




                                1
        www.destinationqa.com
Agenda
What is WebDriver
WebDriver Interface and Implementations
Firefox Driver
Internet Explorer Driver
HTML Unit Driver
Other Drivers

                                          2
                 www.destinationqa.com
Web Driver

Is a Self Contained Library
• No Proxy Server like RC
• Acts just as any normal library

Has Extensive API
• Easy to maintain
• Robust scripting support

                                      3
              www.destinationqa.com
Web Driver Interface
  Selenium JavaDoc

  Base class for different browsers

  The main interface to use for testing

  Represents an idealised web browser

  Methods of WebDriver
  • Control of the browser itself
  • Selection of WebElements
  • Debugging aids



                                                    4
                            www.destinationqa.com
Web Driver



 WebDriver Interface

          Internet   HTML
Firefox                         Opera       Chrome    iPhone    Android
          Explorer    Unit
driver                          Driver       Driver    Driver    Driver
           Driver    driver




                                                                          5
                         www.destinationqa.com
Firefox Driver
Controls the Firefox browser using a
Firefox plugin

Uses a stripped down profile from
what is installed on the machine to
only include the Selenium
WebDriver.xpi (plugin).
By default, the Firefox driver creates
an anonymous profile
                                         6
               www.destinationqa.com
Firefox Driver
Usage
           WebDriver driver = new
           FirefoxDriver();

OS         Windows
           Mac
           Linux      .


Versions   3.0, 3.6

           5, 6

           7, 8


                                                  7
                          www.destinationqa.com
Firefox Driver



    - Runs in a real - Slower than the
    browser and       HtmlUnit Driver
    supports
    JavaScript
    - Faster than the
    Internet Explorer
    Driver

                                         8
              www.destinationqa.com
Internet Explorer Driver
Structure   This driver is controlled by a .dll and is
            thus only available on Windows OS.

Usage
            WebDriver driver = new
            InternetExplorerDriver();
OS
            Windows

Versions    IE 6, IE 7 and IE 8 on XP
            IE 9 on Windows7.
                                                         9
                    www.destinationqa.com
Internet Explorer Driver


                     Comparatively slow
   Runs in a real XPath is not natively
   browser and       supported in most versions.
   supports
   JavaScript with Sizzle is injected - Slower
   all the quirks    than other browsers and
   your end users CSS selectors.
   see.              CSS not natively supported
                     in IE 6 and 7. Sizzle is
                     injected instead.
                     CSS natively supported in
                     IE 8, 9, but doesn’t fully
                  www.destinationqa.com            10
HtmlUnit Driver
Structure   The fastest and most lightweight of
            Drivers. Based on HtmlUnit.
            HtmlUnit is a java based
            implementation of a WebBrowser
            without a GUI.
Usage
            WebDriver driver = new
            HtmlUnitDriver();

OS          Any

Versions    N/A

                                                  11
                  www.destinationqa.com
HtmlUnit Driver



    Fastest                    Emulates other
    implementation of          browsers’
    WebDriver                  JavaScript
    A pure Java solution       behaviour
    and so it is platform
    independent.
    Supports JavaScript


                                                12
                 www.destinationqa.com
Java Script in HtmlUnit
 HtmlUnit’s Java Script engine
 (Rhino) is not used by other popular
 browsers

 What does this mean?
  If web application is tested enabling
  JS engine of HTMLUnit, the results
  may be different as compare to
  other browsers.
                                           13
               www.destinationqa.com
Other Drivers

    Chrome Driver

    Opera Driver

    iPhone Driver

    Android Driver


                                    14
            www.destinationqa.com
Thank You…
Aparna Naik
Email: naik.aparna@destinationqa.com
Tel: +91 99233 50980




                                               15
                       www.destinationqa.com

More Related Content

What's hot

Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
mindqqa
 

What's hot (20)

Selenium
SeleniumSelenium
Selenium
 
Web driver training
Web driver trainingWeb driver training
Web driver training
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Continuous Quality Assurance using Selenium WebDriver
Continuous Quality Assurance using Selenium WebDriverContinuous Quality Assurance using Selenium WebDriver
Continuous Quality Assurance using Selenium WebDriver
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Automatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabsAutomatic Functional Testing with Selenium and SauceLabs
Automatic Functional Testing with Selenium and SauceLabs
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Introduction to Selenium
Introduction to SeleniumIntroduction to Selenium
Introduction to Selenium
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Automating with selenium2
Automating with selenium2Automating with selenium2
Automating with selenium2
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Selenium By Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
 
How to configure Appium with android IDE & eclipse
How to configure Appium with android IDE & eclipseHow to configure Appium with android IDE & eclipse
How to configure Appium with android IDE & eclipse
 

Similar to Selenium drivers

Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
camp_drupal_ua
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
dmethvin
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs
 

Similar to Selenium drivers (20)

Selenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver BasicsSelenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver Basics
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
 
Introduction to PhantomJS
Introduction to PhantomJSIntroduction to PhantomJS
Introduction to PhantomJS
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
Selenium for Tester.pdf
Selenium for Tester.pdfSelenium for Tester.pdf
Selenium for Tester.pdf
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
 
Module 01 - WebDriver Basics
Module 01 - WebDriver BasicsModule 01 - WebDriver Basics
Module 01 - WebDriver Basics
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
 
Selenium Demo
Selenium DemoSelenium Demo
Selenium Demo
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
 
Building a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologiesBuilding a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologies
 
Fastest web browser
Fastest web browserFastest web browser
Fastest web browser
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
Fastest web browser
Fastest web browserFastest web browser
Fastest web browser
 
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
 
Types of Web Browser
Types of Web BrowserTypes of Web Browser
Types of Web Browser
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlight
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

Selenium drivers

  • 1. Selenium 2.x / Web Driver By Aparna Naik www.DestinationQA.com 1 www.destinationqa.com
  • 2. Agenda What is WebDriver WebDriver Interface and Implementations Firefox Driver Internet Explorer Driver HTML Unit Driver Other Drivers 2 www.destinationqa.com
  • 3. Web Driver Is a Self Contained Library • No Proxy Server like RC • Acts just as any normal library Has Extensive API • Easy to maintain • Robust scripting support 3 www.destinationqa.com
  • 4. Web Driver Interface Selenium JavaDoc Base class for different browsers The main interface to use for testing Represents an idealised web browser Methods of WebDriver • Control of the browser itself • Selection of WebElements • Debugging aids 4 www.destinationqa.com
  • 5. Web Driver WebDriver Interface Internet HTML Firefox Opera Chrome iPhone Android Explorer Unit driver Driver Driver Driver Driver Driver driver 5 www.destinationqa.com
  • 6. Firefox Driver Controls the Firefox browser using a Firefox plugin Uses a stripped down profile from what is installed on the machine to only include the Selenium WebDriver.xpi (plugin). By default, the Firefox driver creates an anonymous profile 6 www.destinationqa.com
  • 7. Firefox Driver Usage WebDriver driver = new FirefoxDriver(); OS Windows Mac Linux . Versions 3.0, 3.6 5, 6 7, 8 7 www.destinationqa.com
  • 8. Firefox Driver - Runs in a real - Slower than the browser and HtmlUnit Driver supports JavaScript - Faster than the Internet Explorer Driver 8 www.destinationqa.com
  • 9. Internet Explorer Driver Structure This driver is controlled by a .dll and is thus only available on Windows OS. Usage WebDriver driver = new InternetExplorerDriver(); OS Windows Versions IE 6, IE 7 and IE 8 on XP IE 9 on Windows7. 9 www.destinationqa.com
  • 10. Internet Explorer Driver Comparatively slow Runs in a real XPath is not natively browser and supported in most versions. supports JavaScript with Sizzle is injected - Slower all the quirks than other browsers and your end users CSS selectors. see. CSS not natively supported in IE 6 and 7. Sizzle is injected instead. CSS natively supported in IE 8, 9, but doesn’t fully www.destinationqa.com 10
  • 11. HtmlUnit Driver Structure The fastest and most lightweight of Drivers. Based on HtmlUnit. HtmlUnit is a java based implementation of a WebBrowser without a GUI. Usage WebDriver driver = new HtmlUnitDriver(); OS Any Versions N/A 11 www.destinationqa.com
  • 12. HtmlUnit Driver Fastest Emulates other implementation of browsers’ WebDriver JavaScript A pure Java solution behaviour and so it is platform independent. Supports JavaScript 12 www.destinationqa.com
  • 13. Java Script in HtmlUnit  HtmlUnit’s Java Script engine (Rhino) is not used by other popular browsers  What does this mean?  If web application is tested enabling JS engine of HTMLUnit, the results may be different as compare to other browsers. 13 www.destinationqa.com
  • 14. Other Drivers Chrome Driver Opera Driver iPhone Driver Android Driver 14 www.destinationqa.com
  • 15. Thank You… Aparna Naik Email: naik.aparna@destinationqa.com Tel: +91 99233 50980 15 www.destinationqa.com