SlideShare a Scribd company logo
1 of 17
Download to read offline
Selenium Basics Workshop

Frank Cohen, +01 (408) 871-0122, fcohen@pushtotest.com

                    April 20, 2011
Open Source Test Automation




About PushToTest
‣ Our Mission: Test, To Make A More Reliable World
‣ Make It Easier To Move From Manual To Automated Testing
‣ Support Advanced Testing, including Agile, Load, Integration
‣ Open Source Testing (OST) For Everyone



2
Open Source Test Automation




Today
‣ How To Use Selenium in Rich Internet Application (RIA, using Ajax)
  Environments

‣ How To Data Enable Selenium Tests Using TestMaker
‣ Testing in Flash/Flex Environments Using AMF Protocols
‣ Integrating TestMaker Tests Into Your Continuous Integration
  Environment

‣ How To Analyze Test Results Into Actionable Knowledge

3
Open Source Test Automation




Manual Testing Process
          Results




                        4                    1



      Recommend Changes
                                              Explore
                              Manual
                              Testing

                                                         Tes
                    3                                        t
                                              2         Plan



4        Run The Test Steps
                                        Create Test Plans
Open Source Test Automation




Side Effects
‣ Exhaustion
‣ Fatigue
‣ Blurry Vision
‣ Night Sweats
‣ Insanity
‣ Hair Loss
‣ Acne
‣ Divorce
5
Open Source Test Automation




OST Architecture
                                Application Under Test                                     PTTMonitor
                                      Web, RIA, BPM, SOA                                 CPU, Net, Memory




Functional
                                                   Test Injector                                                   Test Authoring
   Test
                   Bundles                   ScriptRunners               Data Production Libraries                      SoapUI (Pro)
                MySQL, HtmlUnit         Sahi, Selenium, SoapUI, Java        csv files, rdbms queries                      Sahi (Pro)
                                                                                                                   JUnit Class Framework
Load Test                                                                                                             Eclipse Java IDE
                                                                                                                           Fitness
                                          Test Operation Console                                                  Languages: Java, Python
                                                                                                                     Wiki Collaboration

Production      Designer           Grid and Cloud           Repository          Results Analysis
              Record/Playback       Test Deployment        MySQL RDBMS        Business Intelligence Tool
 Monitor


             Continuous                                                   Test
                                  Repository          Bug Tracker                          Monitoring
             Integration                                               Management




6
Open Source Test Automation




Selenium Browser Automation
‣ Selenium Core
‣ Selenium RC
‣ Selenium Grid
‣ Selenium IDE
‣ Selenium Domain Specific Language (DSL)


7
Open Source Test Automation




Selenium Architecture
                      Selenium 1                                  Selenium 2 (WebDriver)

                                        Browser                                               Browser

                                         iFrame                                              Browser API
    Selenium Client      Selenium RC                 Selenium Client   Selenium Server
                                       Browserbot                                            Application
                                                                                             Under Test
                                       Application
                                                                                               (AUT)
                                       Under Test
                                         (AUT)                                                  DOM
                                          DOM
                                                                                              Javascript
                                       Javascript




8
Open Source Test Automation




Selenium Language Basics
‣ Page Commands
‣ Element Commands
‣ Validation Commands
‣ Assertion Commands
‣ Storage Commands


9
Open Source Test Automation




Selenium Locators
‣ Identifiers
  ‣ loginForm
  ‣ id=loginForm
  ‣ name=loginForm
‣ XPath (1.0 from W3C, no support of 2.0 and XQuery)
‣ Link Locator
  ‣ link=Continue <a href=”myurl”>Continue</a>
‣ DOM APIs
  ‣ dom=document.getElementById('loginForm')
‣ CSS Selectors
10
  ‣ css=input.required[type="text"]
Open Source Test Automation




Event Handling and Ajax
‣ Selenium Tests Are Event Oriented
  ‣ Not Timing Oriented
‣ Ajax Web Objects
  ‣ Complicated Structures
  ‣ Dynamic Values
  ‣ Asynchronous Events
  ‣ No Standards
‣ Ajax Example
11
Open Source Test Automation




We Recommend
            Do                Don’t
       Components             Pause
      Record -> Script   Use Static Values
     Dynamic Locators     Storage Values
      Work With Devs      Test and Trash
          Events         Expect The Same


12
Open Source Test Automation




Flex, Flash Testing
‣ Extend the Selenium RC clients for adding Flash communication
  ‣ http://code.google.com/p/flex-ui-selenium/
  ‣ http://code.google.com/p/flash-selenium/
       public void sumForValidNumbers() {
            flexUITester.type("2").at("arg1");
            flexUITester.type("3").at("arg2");
            flexUITester.click("submit");
            assertEquals("5", flexUITester.readFrom("result"));
       }



‣ Flex Automation API - Flexmonkium
13
Open Source Test Automation




TestMaker and Selenium
            Application Under Test




                       TestNode
         Selenium RC              SeleniumHtmlUnit

                   Selenese Test




            TestMaker Console

14
Open Source Test Automation




TestMaker Object Designer
‣ Point-and-Click Functional Test Record/Playback
‣ Record Tests In IE, Chrome, Firefox, Safari, Opera
‣ Automatic Ajax Synchronization
‣ Drag-and-Drop Data Driven Testing
‣ Creates Selenium, Sahi, and Flex Tests


15
Open Source Test Automation




Resources
‣ http://www.pushtotest.com/
‣ http://seleniumhq.org
‣ http://selenium.pushtotest.com
‣ http://refcardz.dzone.com/refcardz/getting-started-selenium
‣ http://refcardz.dzone.com/refcardz/getting-started-selenium-20
‣ http://www.pushtotest.com/products-comparison
‣ http://www.pushtotest.com/selenium-conference-2011-analysis
‣ http://www.slideshare.net/frankcohen/selenium-xpath-performance-
  problems-in-ie
16
Open Source Test Automation




Where To Go From Here
‣ Watch A Screencast and Tutorial
  ‣ http://www.pushtotest.com/screencastcentral
‣ The Selenium Tutorial for Beginners
  ‣ http://www.pushtotest.com/selenium-webinar-series
‣ Attend An Open Source Test Workshop
  ‣ http://workshop.pushtotest.com
‣ Ask For A Proposal on Licenses, Training, Support, Consulting
  ‣ Call +01 408 871 0122, sales@pushtotest.com
17

More Related Content

What's hot

Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
 

What's hot (20)

Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Handle Exceptions in Selenium Webdriver | Edureka
Handle Exceptions in Selenium Webdriver | EdurekaHandle Exceptions in Selenium Webdriver | Edureka
Handle Exceptions in Selenium Webdriver | Edureka
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Appium basics
Appium basicsAppium basics
Appium basics
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Test Automation Using Python | Edureka
Test Automation Using Python | EdurekaTest Automation Using Python | Edureka
Test Automation Using Python | Edureka
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium Grid
 

Similar to Selenium Basics Tutorial

Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6
Clever Moe
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
Promet Source
 

Similar to Selenium Basics Tutorial (20)

Migrating from HP QuickTest Pro QTP to TestMaker Object Designer
Migrating from HP QuickTest Pro QTP to TestMaker Object DesignerMigrating from HP QuickTest Pro QTP to TestMaker Object Designer
Migrating from HP QuickTest Pro QTP to TestMaker Object Designer
 
Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX Testing
 
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT OpsAgile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
 
Continuous Integration with TestMaker, Hudson, Jenkins, Bamboo
Continuous Integration with TestMaker, Hudson, Jenkins, BambooContinuous Integration with TestMaker, Hudson, Jenkins, Bamboo
Continuous Integration with TestMaker, Hudson, Jenkins, Bamboo
 
Agile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business ManagersAgile Open Source Performance Testing Workshop for Business Managers
Agile Open Source Performance Testing Workshop for Business Managers
 
Neil Tompson - SoftTest Ireland
Neil Tompson - SoftTest IrelandNeil Tompson - SoftTest Ireland
Neil Tompson - SoftTest Ireland
 
Open Source Test Workshop for CIOs, CTOs, Managers
Open Source Test Workshop for CIOs, CTOs, ManagersOpen Source Test Workshop for CIOs, CTOs, Managers
Open Source Test Workshop for CIOs, CTOs, Managers
 
Where Testing and Test Management Collide
Where Testing and Test Management CollideWhere Testing and Test Management Collide
Where Testing and Test Management Collide
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
 
Codeception
CodeceptionCodeception
Codeception
 
San Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker PresentationSan Jose Selenium Meet-up PushToTest TestMaker Presentation
San Jose Selenium Meet-up PushToTest TestMaker Presentation
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
 
Oracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JATOracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JAT
 
Selenium XPath Performance Problems in IE
Selenium XPath Performance Problems in IESelenium XPath Performance Problems in IE
Selenium XPath Performance Problems in IE
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads Conference
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
TestMaker Object Designer Training - Basics
TestMaker Object Designer Training - BasicsTestMaker Object Designer Training - Basics
TestMaker Object Designer Training - Basics
 
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUISPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
 

More from Clever Moe

Making With A Disney Imagineer and Muppeteer
Making With A Disney Imagineer and MuppeteerMaking With A Disney Imagineer and Muppeteer
Making With A Disney Imagineer and Muppeteer
Clever Moe
 

More from Clever Moe (20)

6 solutions to ad costs going up while results are flat.
6 solutions to ad costs going up while results are flat.6 solutions to ad costs going up while results are flat.
6 solutions to ad costs going up while results are flat.
 
1.6 billion people are on Facebook, how will you get to the 1 that buys your ...
1.6 billion people are on Facebook, how will you get to the 1 that buys your ...1.6 billion people are on Facebook, how will you get to the 1 that buys your ...
1.6 billion people are on Facebook, how will you get to the 1 that buys your ...
 
How do I get good at Twitter Ads?
How do I get good at Twitter Ads?How do I get good at Twitter Ads?
How do I get good at Twitter Ads?
 
Marketing faster than your competitors in 5 easy steps
Marketing faster than your competitors in 5 easy stepsMarketing faster than your competitors in 5 easy steps
Marketing faster than your competitors in 5 easy steps
 
Local customers are out there, just where
Local customers are out there, just whereLocal customers are out there, just where
Local customers are out there, just where
 
Do i need an ad agency to be good at facebook ads
Do i need an ad agency to be good at facebook adsDo i need an ad agency to be good at facebook ads
Do i need an ad agency to be good at facebook ads
 
I know facebook ads, how do i expand to twitter, linked in, youtube
I know facebook ads, how do i expand to twitter, linked in, youtubeI know facebook ads, how do i expand to twitter, linked in, youtube
I know facebook ads, how do i expand to twitter, linked in, youtube
 
5 solutions to the digital ad networks unsolvable puzzle
5 solutions to the digital ad networks unsolvable puzzle5 solutions to the digital ad networks unsolvable puzzle
5 solutions to the digital ad networks unsolvable puzzle
 
Instagram ads look super complicated, what can i do in 15 minutes?
Instagram ads look super complicated, what can i do in 15 minutes?Instagram ads look super complicated, what can i do in 15 minutes?
Instagram ads look super complicated, what can i do in 15 minutes?
 
How to get 1,000 people to look at your product for $1,000
How to get 1,000 people to look at your product for $1,000How to get 1,000 people to look at your product for $1,000
How to get 1,000 people to look at your product for $1,000
 
Defending your ad budget from Facebook and LinkedIn AIs
Defending your ad budget from Facebook and LinkedIn AIsDefending your ad budget from Facebook and LinkedIn AIs
Defending your ad budget from Facebook and LinkedIn AIs
 
Do i need an ad agency to be good at Facebook ads?
Do i need an ad agency to be good at Facebook ads?Do i need an ad agency to be good at Facebook ads?
Do i need an ad agency to be good at Facebook ads?
 
Marketing faster than your competitors in 5 easy steps
Marketing faster than your competitors in 5 easy stepsMarketing faster than your competitors in 5 easy steps
Marketing faster than your competitors in 5 easy steps
 
Making With A Disney Imagineer and Muppeteer
Making With A Disney Imagineer and MuppeteerMaking With A Disney Imagineer and Muppeteer
Making With A Disney Imagineer and Muppeteer
 
Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014
 
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test AutomationSTARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
 
Use Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test AutomationUse Jenkins For Continuous Load Testing And Mobile Test Automation
Use Jenkins For Continuous Load Testing And Mobile Test Automation
 
Deeper Root Cause Analysis to App Performance Bottlenecks with Appvance APM I...
Deeper Root Cause Analysis to App Performance Bottlenecks with Appvance APM I...Deeper Root Cause Analysis to App Performance Bottlenecks with Appvance APM I...
Deeper Root Cause Analysis to App Performance Bottlenecks with Appvance APM I...
 
CloudBees Continuous Integration and Test with Appvance PerformanceCloud
CloudBees Continuous Integration and Test with Appvance PerformanceCloudCloudBees Continuous Integration and Test with Appvance PerformanceCloud
CloudBees Continuous Integration and Test with Appvance PerformanceCloud
 
Running JMeter Tests In Appvance PerformanceCloud
Running JMeter Tests In Appvance PerformanceCloudRunning JMeter Tests In Appvance PerformanceCloud
Running JMeter Tests In Appvance PerformanceCloud
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.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 ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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...
 
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
 
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...
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Selenium Basics Tutorial

  • 1. Selenium Basics Workshop Frank Cohen, +01 (408) 871-0122, fcohen@pushtotest.com April 20, 2011
  • 2. Open Source Test Automation About PushToTest ‣ Our Mission: Test, To Make A More Reliable World ‣ Make It Easier To Move From Manual To Automated Testing ‣ Support Advanced Testing, including Agile, Load, Integration ‣ Open Source Testing (OST) For Everyone 2
  • 3. Open Source Test Automation Today ‣ How To Use Selenium in Rich Internet Application (RIA, using Ajax) Environments ‣ How To Data Enable Selenium Tests Using TestMaker ‣ Testing in Flash/Flex Environments Using AMF Protocols ‣ Integrating TestMaker Tests Into Your Continuous Integration Environment ‣ How To Analyze Test Results Into Actionable Knowledge 3
  • 4. Open Source Test Automation Manual Testing Process Results 4 1 Recommend Changes Explore Manual Testing Tes 3 t 2 Plan 4 Run The Test Steps Create Test Plans
  • 5. Open Source Test Automation Side Effects ‣ Exhaustion ‣ Fatigue ‣ Blurry Vision ‣ Night Sweats ‣ Insanity ‣ Hair Loss ‣ Acne ‣ Divorce 5
  • 6. Open Source Test Automation OST Architecture Application Under Test PTTMonitor Web, RIA, BPM, SOA CPU, Net, Memory Functional Test Injector Test Authoring Test Bundles ScriptRunners Data Production Libraries SoapUI (Pro) MySQL, HtmlUnit Sahi, Selenium, SoapUI, Java csv files, rdbms queries Sahi (Pro) JUnit Class Framework Load Test Eclipse Java IDE Fitness Test Operation Console Languages: Java, Python Wiki Collaboration Production Designer Grid and Cloud Repository Results Analysis Record/Playback Test Deployment MySQL RDBMS Business Intelligence Tool Monitor Continuous Test Repository Bug Tracker Monitoring Integration Management 6
  • 7. Open Source Test Automation Selenium Browser Automation ‣ Selenium Core ‣ Selenium RC ‣ Selenium Grid ‣ Selenium IDE ‣ Selenium Domain Specific Language (DSL) 7
  • 8. Open Source Test Automation Selenium Architecture Selenium 1 Selenium 2 (WebDriver) Browser Browser iFrame Browser API Selenium Client Selenium RC Selenium Client Selenium Server Browserbot Application Under Test Application (AUT) Under Test (AUT) DOM DOM Javascript Javascript 8
  • 9. Open Source Test Automation Selenium Language Basics ‣ Page Commands ‣ Element Commands ‣ Validation Commands ‣ Assertion Commands ‣ Storage Commands 9
  • 10. Open Source Test Automation Selenium Locators ‣ Identifiers ‣ loginForm ‣ id=loginForm ‣ name=loginForm ‣ XPath (1.0 from W3C, no support of 2.0 and XQuery) ‣ Link Locator ‣ link=Continue <a href=”myurl”>Continue</a> ‣ DOM APIs ‣ dom=document.getElementById('loginForm') ‣ CSS Selectors 10 ‣ css=input.required[type="text"]
  • 11. Open Source Test Automation Event Handling and Ajax ‣ Selenium Tests Are Event Oriented ‣ Not Timing Oriented ‣ Ajax Web Objects ‣ Complicated Structures ‣ Dynamic Values ‣ Asynchronous Events ‣ No Standards ‣ Ajax Example 11
  • 12. Open Source Test Automation We Recommend Do Don’t Components Pause Record -> Script Use Static Values Dynamic Locators Storage Values Work With Devs Test and Trash Events Expect The Same 12
  • 13. Open Source Test Automation Flex, Flash Testing ‣ Extend the Selenium RC clients for adding Flash communication ‣ http://code.google.com/p/flex-ui-selenium/ ‣ http://code.google.com/p/flash-selenium/ public void sumForValidNumbers() { flexUITester.type("2").at("arg1"); flexUITester.type("3").at("arg2"); flexUITester.click("submit"); assertEquals("5", flexUITester.readFrom("result")); } ‣ Flex Automation API - Flexmonkium 13
  • 14. Open Source Test Automation TestMaker and Selenium Application Under Test TestNode Selenium RC SeleniumHtmlUnit Selenese Test TestMaker Console 14
  • 15. Open Source Test Automation TestMaker Object Designer ‣ Point-and-Click Functional Test Record/Playback ‣ Record Tests In IE, Chrome, Firefox, Safari, Opera ‣ Automatic Ajax Synchronization ‣ Drag-and-Drop Data Driven Testing ‣ Creates Selenium, Sahi, and Flex Tests 15
  • 16. Open Source Test Automation Resources ‣ http://www.pushtotest.com/ ‣ http://seleniumhq.org ‣ http://selenium.pushtotest.com ‣ http://refcardz.dzone.com/refcardz/getting-started-selenium ‣ http://refcardz.dzone.com/refcardz/getting-started-selenium-20 ‣ http://www.pushtotest.com/products-comparison ‣ http://www.pushtotest.com/selenium-conference-2011-analysis ‣ http://www.slideshare.net/frankcohen/selenium-xpath-performance- problems-in-ie 16
  • 17. Open Source Test Automation Where To Go From Here ‣ Watch A Screencast and Tutorial ‣ http://www.pushtotest.com/screencastcentral ‣ The Selenium Tutorial for Beginners ‣ http://www.pushtotest.com/selenium-webinar-series ‣ Attend An Open Source Test Workshop ‣ http://workshop.pushtotest.com ‣ Ask For A Proposal on Licenses, Training, Support, Consulting ‣ Call +01 408 871 0122, sales@pushtotest.com 17