Open Source Automation Tools       That Really Work(Have Your Cake And Eat It Too!)       Thursday, April 19, 2012        ...
Agenda• An Doan  Twitter: @doan_an  Gmail: verybadsushi@gmail.com    • Selenium       – Web       – Mobile    • Sikuli    ...
Selenium       http://seleniumhq.org/Automate your browser the way the       user would see it.
What is it?• Selenium 1/RC  – Simulated user interactions via the Javascript engine of the    browser• Selenium IDE  – Fir...
Selenium IDE• Demo
WebDriver•   HtmlUnit Driver•   Firefox Driver•   Internet Explorer Driver•   Chrome Driver•   Opera Driver•   Safari Driv...
Supported Languages• Java• C#• Python• Ruby• php• Perl
API Examples• WebDriver driver = new  FirefoxDriver();• driver.get("http://www.google.com");• WebElement element =  driver...
Locators•   By.id()•   By.className()•   By.name()•   By.linkText()•   By.partialLinkText()•   By.tagName()•   By.cssSelec...
Demo     1.   Identify Locators     2.   Find the WebElement     3.   Perform some action     4.   Repeat Firefox + Fireb...
Sikuli        http://sikuli.org/Sikuli means "God’s Eye" in the language of native Mexicans
What is it?    Picture Driven ComputingNot your ordinary screen scrapper.
API Examples                App Class•   notepad = App.open(“notepad”)•   notepad.focus()•   notepad.close()•   notepad.wi...
API Examples                 Spatial                Operators          •    above()          •    below()          •    le...
API Examples               Image Recognition•   find, findAll, exists, wait, waitVanish•   click, doubleClick, rightClick,...
API Examples            Text Recognition• click(“OK”)• find(“Cancel”)• .text()
Demo1. Pick API2. Screen Capture3. Repeat
Advanced Usage• What if you combine the two?  – Prompts, Print, File Upload, Alerts  – Cross-Browser Testing, visual-consi...
Resources• http://seleniumhq.org/• http://www.slideshare.net/vgod/practical-  sikuli-using-screenshots-for-gui-automation-...
Upcoming SlideShare
Loading in …5
×

Open Source Automation Tools That Really Work V2

1,355 views

Published on

http://sao.site-ym.com/events/event_details.asp?id=215689

  • Be the first to comment

  • Be the first to like this

Open Source Automation Tools That Really Work V2

  1. 1. Open Source Automation Tools That Really Work(Have Your Cake And Eat It Too!) Thursday, April 19, 2012 11:30am – 12:30pm Kells Irish Restaurant
  2. 2. Agenda• An Doan Twitter: @doan_an Gmail: verybadsushi@gmail.com • Selenium – Web – Mobile • Sikuli – Windows – Web – Mobile
  3. 3. Selenium http://seleniumhq.org/Automate your browser the way the user would see it.
  4. 4. What is it?• Selenium 1/RC – Simulated user interactions via the Javascript engine of the browser• Selenium IDE – Firefox plug-in that allows record and playback• Selenium 2/WebDriver – Native user interactions are fired through browser’s own automation support
  5. 5. Selenium IDE• Demo
  6. 6. WebDriver• HtmlUnit Driver• Firefox Driver• Internet Explorer Driver• Chrome Driver• Opera Driver• Safari Driver• iPhone Driver• Android Driver• Native Driver
  7. 7. Supported Languages• Java• C#• Python• Ruby• php• Perl
  8. 8. API Examples• WebDriver driver = new FirefoxDriver();• driver.get("http://www.google.com");• WebElement element = driver.findElement(By.name("q"));• element.sendKeys("Cheese!");
  9. 9. Locators• By.id()• By.className()• By.name()• By.linkText()• By.partialLinkText()• By.tagName()• By.cssSelector()• By.xpath()
  10. 10. Demo 1. Identify Locators 2. Find the WebElement 3. Perform some action 4. Repeat Firefox + Firebug + Firefinder + User Agent Switcher Eclipse
  11. 11. Sikuli http://sikuli.org/Sikuli means "God’s Eye" in the language of native Mexicans
  12. 12. What is it? Picture Driven ComputingNot your ordinary screen scrapper.
  13. 13. API Examples App Class• notepad = App.open(“notepad”)• notepad.focus()• notepad.close()• notepad.window()
  14. 14. API Examples Spatial Operators • above() • below() • left() • right()
  15. 15. API Examples Image Recognition• find, findAll, exists, wait, waitVanish• click, doubleClick, rightClick, hover, dragDrop• type(“text”), paste(“text”)• notepad.window()
  16. 16. API Examples Text Recognition• click(“OK”)• find(“Cancel”)• .text()
  17. 17. Demo1. Pick API2. Screen Capture3. Repeat
  18. 18. Advanced Usage• What if you combine the two? – Prompts, Print, File Upload, Alerts – Cross-Browser Testing, visual-consistency
  19. 19. Resources• http://seleniumhq.org/• http://www.slideshare.net/vgod/practical- sikuli-using-screenshots-for-gui-automation- and-testing• http://www.meetup.com/pdx-se

×