Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Selenium Topic 2 IDE
1. Copyright 2015 IT Professional Academy 1
Selenium- Training
Topic - 2
2. Copyright 2015 IT Professional Academy 2
Agenda
• Introduction
• Begin with Selenium IDE
• Getting started
• Features of Selenium IDE
• Scripts – recording & running
• Formatters available in Selenium IDE.
3. INTRODUCTION
History of Selenium
• Jason Huggins from Thoughworks
• Developed to test internal app
• Birth of Selenium Remote Control
About Selenium IDE
• Shinya Kasatani from Japan started working
• Firefox plugin to develop test cases
Copyright 2015 IT Professional Academy 3
4. Begin with Selenium IDE
INSTALLATION
• A Firefox add-on
• Can download from official website
• Available at – Tools -> Selenium IDE.
Copyright 2015 IT Professional Academy 4
6. About Selenium IDE
Selenium IDE (Integrated Development Environment) is a
prototyping tool for building test scripts.
It is a Firefox plugin and provides an easy-to-use interface for
developing automated tests.
Selenium IDE has a recording feature, which records user actions as
they are performed and then exports them as a reusable script in
one of many programming languages that can be later executed.
Copyright 2015 IT Professional Academy 6
7. Features of Selenium IDE
Record and playback
Intelligent field selection will use IDs, names, CSS or X-Path as
needed
Auto complete for all common Selenium commands
Walk through test cases and test suites.
Debug and set breakpoints
Save tests as HTML, Java or other formats
Copyright 2015 IT Professional Academy 7
8. Controls available on IDE
• Toolbar controls:
• Speed Control
• Run All
• Run
• Pause/Resume
• Step
• Record.
click to Record Now Recording
Copyright 2015 IT Professional Academy 8
9. Building and Running scripts
Recording
• Automatically inset commands into test pane
• By default record button is ON
Selenium commands
• Actions - e.g. “click this link” and “select that option”.
If an Action fails, or has an error, the execution of the current test is
stopped.
• Accessors - Examine the state of the application and store the results
in variables, e.g. “storeTitle”.
• Asserts - To check the web properties. E.g. “make sure the page title is
X” and “verify that this checkbox is checked”.
Copyright 2015 IT Professional Academy 9
10. Building and Running scripts
• Edit using
• Table view
• Source view
• Execution of the script as
• Single test case
• Test Suite.
Copyright 2015 IT Professional Academy 10
11. Additional features
• Toggle Breakpoint:
• Use to stop the script execution as define
• Useful for debugging the script
• Set/Clear Start point:
• Use for executing script from define line
• Useful for running scripts from middle
Copyright 2015 IT Professional Academy 11
12. Script Format
• By default recorded as HTML format
• User can change it to required languages
• JAVA, C#, Python are few of them
Copyright 2015 IT Professional Academy 12
13. Commands
• Open: opens a page using a URL.
• click/clickAndWait : performs a click operation, and optionally waits for a
new page to load.
• verifyTitle/assertTitle : verifies an expected page title.
• verifyTextPresent : verifies expected text is somewhere on the page.
• verifyElementPresent : verifies an expected UI element, as defined by its
HTML tag, is present on the page.
Copyright 2015 IT Professional Academy 13
14. Commands
• verifyText : verifies expected text and its corresponding HTML tag are
present on the page.
• verifyTable : verifies a table’s expected contents.
• waitForPageToLoad : pauses execution until an expected new page loads.
Called automatically when clickAndWait is used.
• waitForElementPresent : pauses execution until an expected UI element,
as defined by its HTML tag, is present on the page.
Copyright 2015 IT Professional Academy 14
15. Exporting Test case and Test Suite
Copyright 2015 IT Professional Academy 15
16. Advantages of IDE
• Easy to learn & understand
• Support various language formatter
• User friendly UI and controls
• Has functionalities which are needed regularly
• Can exported easily for further execution.
Copyright 2015 IT Professional Academy 16