Automated Testing with Google Chrome - WebDriver- ChromeDriver


Published on

Presented these slides at the Google Conference that happened in Chennai.
Google Developer's Group DevFest 2013

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Automated Testing with Google Chrome - WebDriver- ChromeDriver

  1. 1.
  2. 2. About Me Open source contributor Developer in Test Editor-in-chief @manoj9788
  3. 3. What’s In Store ?          Testing Automated testing Selenium WebDriver WebDriver API WebDriver for Google Chrome ChromeDriver ChromeDriver Architecture ChromeDriver Implementation Demo
  4. 4. Testing ? Is the process of evaluating a system or its component(s) with the intent to find whether it satisfies what it needs to do.
  5. 5. Automated Testing  Testing a system or its component(s) with an use of an automation tool is called Automation testing.  In a Robotic way
  6. 6. Why Automation Testing ?  Automation does not require Human Intervention  Automation increases speed of test execution  Manual testing can be boring and hence error prone  Automation saves you money
  7. 7. Automation Tool  Is a Software or a package that allows you to use high level languages or keywords to create scripts on top of a test framework to manage the build and run of scripts that communicate with the Application under test  To control execution of tests  To compare actual outcomes to expected outcomes  To report the status (PASS/FAIL)
  8. 8. Selenium WebDriver  Browser Automation Framework  It automates browser’s 
  9. 9. Selenium WebDriver  Selenium is an open Source tool and its free.  Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers.  Allows scripting in several languages like Java, C#, Groovy, Ruby, PHP and Python.  Assertion statements provide an efficient way of comparing expected and actual results.  Different browser implementations
  10. 10. Selenium Suite of Tools  Selenium IDE  Selenium Remote Control (aka) Selenium 1.0 (Deprecated)  Selenium WebDriver (aka) Selenium 2.0(aka) WebDriver  Selenium GRID
  11. 11. Selenium IDE  The Record and Playback tool
  12. 12. Why WebDriver ? Because it’s a W3C Working Draft
  13. 13. WebDriver API  How does the WebDriver API looks like ? driver.findElement("q"))
  14. 14. UI Element Locators  We Human’s know what exactly to do on the web page, operations like click, double click…  Automation is a robotic process and we need instruct the bot to click ‘here’ by the element locators – the objects.  Different locators id css xpath linktext
  15. 15. Transformation from Manual to a Automated Tester Manual Interaction Automated WebDriver API Human Opens a browser and loads the URL of app under test WebDriver driver = new ChromeDriver(); driver.get(; Human Click on a button driver.findElement(By.linkText(”Google")).click(); Human types in a name in text field driver.findElement("firstName")).clear(); driver.findElement("firstName")).sendKe ys(”gdgChennai"); Human selects an option from a dropdown new Select(driver.findElement("glsel"))).selectBy VisibleText("GB");
  16. 16. CHROMEDRIVER Chromium Maintained and Developed by the Chromium Team at Google
  17. 17. Browser Statistics
  18. 18. Interrogation As a Web Developer, how can I automatically verify the critical functionality of my app works ? As a Tester, how can I automatically verify the critical functionality of app under test performs what it supposed to do ?
  19. 19. ChromeDriver Interoperable with WebDriver Clients Open source and maintained by the members of Chromium project
  20. 20. How does the test look like ?
  21. 21. How ChromeDriver works ?
  22. 22. ChromeDriver Implementation Dev Tools Provides access to internal of web app • • • • Query and Manipulate DOM tree Debugging JavaScript Network Monitoring Memory and Performance profiling Extensions Modify and enhance browser functionality • Window control
  23. 23. Detailed Architecture View ChromeDriver
  24. 24. Chrome Extensions  Chrome Extensions can be either packed or unpacked.  Packed extensions are single file with a .crx extension  Unpacked extensions are a directory containing the extension, including a manifest.json file
  25. 25.
  26. 26. Thank you!! Email at: