Share
Embed
Transcript
17 slides
-
Manual: 14s to enter a form with 8 field. Automation:
02s to enter the same form. How about if I want to fill up the form 50 times? Manual: 14s x 50 times = 700s Automation: 02s x 50 times = 100s 1:7 MY PERSONAL! -
WHY DO WE CARE ABOUT SELENIUM? - Selenium is a
free (open source). - Automated testing for web applications. - Across browsers and platforms. - Support multiple languages: Java, PHP, Python, Ruby, C#... -
SELENIUM IS NOT JUST A SINGLE TOOL BUT A SUITE
OF SOFTWARE'S -
• Selenium IDE: Firefox add-on that you can only use
in creating simple test cases and test suites. • Selenium Remote Control (Selenium 1): The first Selenium tool that allowed users to use programming languages in creating complex tests. • WebDriver: Allows your test scripts to communicate directly to the browser, controlling it from the OS level. • Selenium Grid: Running multiple tests across different browsers, operating systems, and machines in parallel. -
OVERVIEW • IDE stands for “Integrated Development Environment”. • It
is a Firefox extension. • Allows you to record, edit, and debug tests. • Selenium IDE should only be used for a simple test cases. -
1. Menu bar 2. Test Case List 3. Test Case
Panel (Steps & Commands) 4. Log/Reference -
ADVANTAGES • Easy to install and use. • No programming
required! (but some HTML is needed). • Can export and reuse in Selenium WebDriver. • Support test results and reports. • Support for more extensions. • Can debug and set breakpoints. • Good way to learning Selenium script syntax. -
DISADVANTAGES • Available only in Firefox. • Just use for
a simple test case. • It does not directly support loops and conditions. • Slower than Selenium RC and WebDriver. -
HANDS-ON LAP - Install Selenium IDE, Firebug, Firepath. - Creating
the First Selenium IDE script. - Use Locators in Selenium IDE. - Data-Driven with SelBlocks. - Customize, save and export a script. - Hands-on: Create multi-user accounts by using XML data. -
DATA.XML <testdata> <vars User="user-01" Email="[email protected]" Firstname="User" Lastname="01" Website="ab.com" Label="Editor"/> <vars
User="user-02" Email="[email protected]" Firstname="User" Lastname="02" Website="ab.com" Label="Editor"/> <vars User="user-03" Email="[email protected]" Firstname="User" Lastname="03" Website="ab.com" Label="Administrator"/> </testdata>