Automated Testing with Google Chrome - WebDriver- ChromeDriver
-
Upload
manoj-kumar -
Category
Technology
-
view
5.974 -
download
10
Transcript of Automated Testing with Google Chrome - WebDriver- ChromeDriver
http://assertselenium.com
About Me
http://assertselenium.com
Open source contributorDeveloper in TestEditor-in-chief AssertSelenium.com
@manoj9788
http://facebook.com/AssertSelenium
http://about.me/manoj9788
What’s In Store ?
Testing Automated testing Selenium WebDriver WebDriver API WebDriver for Google Chrome ChromeDriver ChromeDriver Architecture ChromeDriver Implementation Demo
http://assertselenium.com
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.
http://assertselenium.com
Automated Testing
Testing a system or its component(s) with an use of an automation tool is called Automation testing.
In a Robotic way
http://assertselenium.com
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
http://assertselenium.com
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)
http://assertselenium.com
Selenium WebDriver
Browser Automation Framework
It automates browser’s
http://docs.seleniumhq.org/
http://assertselenium.com
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
http://assertselenium.com
Selenium Suite of Tools
Selenium IDE Selenium Remote Control (aka) Selenium 1.0
(Deprecated) Selenium WebDriver (aka) Selenium 2.0(aka)
WebDriver Selenium GRID
http://assertselenium.com
Selenium IDE
The Record and Playback tool
http://assertselenium.com
Why WebDriver ?
Because it’s a W3C Working Draft
http://assertselenium.com
WebDriver API
How does the WebDriver API looks like ?driver.findElement(By.name("q"))
http://assertselenium.com
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 locatorsidcssxpathlinktext
http://assertselenium.com
Transformation from Manual to a Automated Tester
http://assertselenium.com
Manual Interaction Automated WebDriver API
Human Opens a browser and loads the URL of app under test
WebDriver driver = new ChromeDriver();driver.get(http://google.com);
Human Click on a button driver.findElement(By.linkText(”Google")).click();
Human types in a name in text field
driver.findElement(By.name("firstName")).clear();driver.findElement(By.name("firstName")).sendKeys(”gdgChennai");
Human selects an option from a dropdown
new Select(driver.findElement(By.id("glsel"))).selectByVisibleText("GB");
CHROMEDRIVER
Maintained and Developed by the Chromium Team at Google
http://assertselenium.com
Chromium
Browser Statistics
http://assertselenium.com
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 ?
http://assertselenium.com
ChromeDriverInteroperable with WebDriver Clients
Open source and maintained by the members of Chromium project
http://assertselenium.com
How does the test look like ?
http://assertselenium.com
How ChromeDriver works ?
http://assertselenium.com
ChromeDriver Implementation
Dev ToolsProvides access to internal of web app• Query and Manipulate DOM tree• Debugging JavaScript• Network Monitoring• Memory and Performance profiling
ExtensionsModify and enhance browser functionality• Window control
http://assertselenium.com
Detailed Architecture ViewChromeDriver
http://assertselenium.com
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
http://assertselenium.com
http://assertselenium.com