selenium
Post on 13-Dec-2014
270 Views
Preview:
DESCRIPTION
TRANSCRIPT
Selenium framework for testing
Content
2
What is Selenium
Selenium Components
Steps to start with Selenium
Selenium Commands
Features of Selenium
What is Selenium?
3
• Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
• Works anywhere JavaScript is supported
• Hooks for many other languages - Java, Ruby, Python
• Can simulate a user navigating through pages and then assert for specific marks on the pages
• All you need to really know is HTML to start using it right away
Selenium Components
4
Selenium-IDE
5
• IDE stands for Integrated Development Environment.
• Which is used for Record and Play back the scripts.
• It is an Add on for Mozilla Firefox, which means we can download the Selenium IDE from Mozilla Firefox and we can Record and Run the scripts in Mozilla Firefox only.
• Selenium IDE is accountable for user actions.
• We can Run the Recorded scripts against other browsers by using Selenium RC.
Selenium-RC
6
• RC stands for Remote Control.
• It is a Server and launches the Browser.
• It acts as a API and Library of Selenium.
• We need to configure the Selenium RC with the supported language, then we can automate the application.
Selenium-Grid
7
• Selenium Grid is used for launching the multiple browsers with supported operating system in parallel.
• We can run the scripts on different browsers in parallel.
• It allows you to easily run multiple tests in parallel, on multiple machines, in a heterogeneous environment.
Steps to start with Selenium!
8
1) Begin: write and run tests in Firefox. Selenium IDE is a Firefox add-on that records clicks, typing, and other
actions to make a test, which you can play back in the browser.
2) Customize: your language, your browser. Selenium Remote Control (RC) runs your tests in multiple browsers and
platforms. Tweak your tests in your preferred language.
3) Deploy: scale out, speed up Selenium Grid extends Selenium RC to distribute your tests across
multiple servers, saving you time by running tests in parallel.
Selenium Commands
9
• Actions are commands that generally manipulate the state of the application. They do things like “click this link” and “select that option”.
Can be called with “AndWait” suffix, e.g. “clickAndWait”.
• Accessors examine the state of the application and store the results in variables, e.g. “storeTitle”.
They are also used to automatically generate Assertions.
• Assertions are like Accessors, but verify that the state of the application conforms to what is expected. Eg. “make sure the page title is X”, “verify that this checkbox is checked”.
All Selenium Assertions can be used in 3 modes: “assert”, “verify”, and ” waitFor”. For example, you can “assertText”, “verifyText” and “waitForText”.
Features of Selenium
10
• Functional Automation tool for Web applications.
• Open source, free to use and free of charge.
• Supports more languages.
• Supports different browsers.
• Supports various operating systems.
• Supports mobile devices
• Can execute the tests while browser is minimized.
• Can execute the tests in parralel.
• Flexible.
Selenium IDE
The list ofactions in theactual test caseto execute
The root of web application youwant to test
The log of theevents that wereexecuted, includingany errors orwarning that mayhave occurred
Selenium IDE
ExecutionCommands
Record testactions
Try the test inthe Web basedTestRunner
Specify commands,including asserts
Reference of thecurrently selectedcommand
Questions ?
13
Email Us @ support@zeteoconsulting.com
Worldwide Offices:USA (Dallas)India (Pune)
Partner Offices:Monterrey (Mexico)Frankfurt (Germany)Stockholm (Sweden)
Email: support@zeteoconsulting.com Corporate URL: www.zeteoconsulting.com
top related