Selenium Basics Tutorial


Published on

Selenium is a software testing framework for automating tests of Web applications. Join Frank Cohen for a Workshop to learn the basics of Selenium. A screencast for this presentation is on the Web site.

Published in: Technology
  • Selenium tutorial- Selenium Interview Questions -
    Are you sure you want to  Yes  No
    Your message goes here
  • I learned a lot at It is an amazing service special there mentoring program gave me real hand on experience in troubleshooting. I was able to create a full selenium testing Project in less than 4 hour time all by myself. Amazing professional team of mentors and software educators. DevMaster also got me selenium testing . They gave very good exam preparation material Visit and, 1(866)340-1375
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice post
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Selenium Basics Tutorial

  1. 1. Selenium Basics WorkshopFrank Cohen, +01 (408) 871-0122, April 20, 2011
  2. 2. Open Source Test AutomationAbout 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 Everyone2
  3. 3. Open Source Test AutomationToday‣ 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 Knowledge3
  4. 4. Open Source Test AutomationManual Testing Process Results 4 1 Recommend Changes Explore Manual Testing Tes 3 t 2 Plan4 Run The Test Steps Create Test Plans
  5. 5. Open Source Test AutomationSide Effects‣ Exhaustion‣ Fatigue‣ Blurry Vision‣ Night Sweats‣ Insanity‣ Hair Loss‣ Acne‣ Divorce5
  6. 6. Open Source Test AutomationOST Architecture Application Under Test PTTMonitor Web, RIA, BPM, SOA CPU, Net, MemoryFunctional 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 FrameworkLoad Test Eclipse Java IDE Fitness Test Operation Console Languages: Java, Python Wiki CollaborationProduction Designer Grid and Cloud Repository Results Analysis Record/Playback Test Deployment MySQL RDBMS Business Intelligence Tool Monitor Continuous Test Repository Bug Tracker Monitoring Integration Management6
  7. 7. Open Source Test AutomationSelenium Browser Automation‣ Selenium Core‣ Selenium RC‣ Selenium Grid‣ Selenium IDE‣ Selenium Domain Specific Language (DSL)7
  8. 8. Open Source Test AutomationSelenium 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 Javascript8
  9. 9. Open Source Test AutomationSelenium Language Basics‣ Page Commands‣ Element Commands‣ Validation Commands‣ Assertion Commands‣ Storage Commands9
  10. 10. Open Source Test AutomationSelenium 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 Selectors10 ‣ css=input.required[type="text"]
  11. 11. Open Source Test AutomationEvent Handling and Ajax‣ Selenium Tests Are Event Oriented ‣ Not Timing Oriented‣ Ajax Web Objects ‣ Complicated Structures ‣ Dynamic Values ‣ Asynchronous Events ‣ No Standards‣ Ajax Example11
  12. 12. Open Source Test AutomationWe Recommend Do Don’t Components Pause Record -> Script Use Static Values Dynamic Locators Storage Values Work With Devs Test and Trash Events Expect The Same12
  13. 13. Open Source Test AutomationFlex, Flash Testing‣ Extend the Selenium RC clients for adding Flash communication ‣ ‣ public void sumForValidNumbers() { flexUITester.type("2").at("arg1"); flexUITester.type("3").at("arg2");"submit"); assertEquals("5", flexUITester.readFrom("result")); }‣ Flex Automation API - Flexmonkium13
  14. 14. Open Source Test AutomationTestMaker and Selenium Application Under Test TestNode Selenium RC SeleniumHtmlUnit Selenese Test TestMaker Console14
  15. 15. Open Source Test AutomationTestMaker 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 Tests15
  16. 16. Open Source Test AutomationResources‣‣‣‣‣‣‣‣ problems-in-ie16
  17. 17. Open Source Test AutomationWhere To Go From Here‣ Watch A Screencast and Tutorial ‣‣ The Selenium Tutorial for Beginners ‣‣ Attend An Open Source Test Workshop ‣‣ Ask For A Proposal on Licenses, Training, Support, Consulting ‣ Call +01 408 871 0122, sales@pushtotest.com17