Selenium presentation
-
Upload
pargev-ghazaryan -
Category
Technology
-
view
790 -
download
0
description
Transcript of Selenium presentation
SELENIUM
Created by: Pargev GhazaryanReviewed by: Vladimir SoghoyanOgma Applications
Ogma Applications 2
How to Choose the Right Selenium Tool for Your Need
4/10/2013
Selenium IDE
Web Driver
Selenium RC
Selenium Grid
Ogma Applications 3
Features of Selenium IDE
4/10/2013
Menu BarBase URLToolbar
Test Case Pane
Log/Reference/
UIRollup Pane
Ogma Applications 4
Menu Bar
The file format to which your selenium IDE test case will be exported
The unit testing framework to be used
The Selenium framework to be used on the exported test case.
The 2 Export options provided by the file menu
4/10/2013
Ogma Applications 5
Selenium IDE Options dialog box
Default timeout value
Selenium IDE extensions
Remember base URL
Autostart Record
4/10/2013
Ogma Applications 6
Base URL Bar
Toolbar
4/10/2013
Ogma Applications 7
Test Case Pane
4/10/2013
Ogma Applications 8
Editor
You can think of the editor as the place where all the action happens. It is available in two views: Table and Source.
This is and modify Selenese commands. where you create
After playback, each step is color-coded.
To create steps, type the name of the command in the “Command” text box.
It displays a dropdown list of commands that match with the entry that you are currently typing.
Target is any parameter for a command and Value is the input value for those Targets.
4/10/2013
Ogma Applications 9
Source View
It displays the steps in HTML (default) format. It also allows you to edit your script just like in the Table
View.
4/10/2013
Ogma Applications 10
The different types of locators
Method Target Syntax ExampleBy ID id=
id_of_the_elementid=email
By Name name=name_of_the_element
name=username
By Name Using Filters
name=name_of_the_element
filter=value_of_filter
name=tripType value=oneway
By Link Text link=link_text link=REGISTERTag and ID css=tag#id css=input#email
Tag and Class css=tag.class css=input.inputtext
Tag and Attribute
css=tag[attribute=value]
css=input[name=lastName]
Tag, Class, and Attribute
css=tag.class[attribute=value]
css=input.inputtext[tabindex=1]
CSS SelectorTag and IDTag and classTag and attributeTag, class, and attribute
IDNameLink TextInner textXpath
DOM (DocumentObject Model)getElementByIdgetElementsByNamedom:namedom:index
4/10/2013
Ogma Applications 11
Adding User Extensions In The Selenium IDE
For adding extensions click Options->Options. It is possible to add several extensions simultaneously separated by comma.
4/10/2013
Ogma Applications 12
User Extensions
This example types today’s date. For example it is used for creating automated test-cases for registration.
4/10/2013
Ogma Applications 13
Example
In the following example the test suite made with the help of selenium IDE is shown where the program inputs the username and password values from the file.
4/10/2013
Ogma Applications 14
Advantages
It is very convenient for working in big test suites. The method allows to insert values in one file and change all the necessary input data that can be used in one or several test cases at a time without any change in the test suite.
When automating in this way it is possible to save the output values corresponding to each input value in the file if there are such values, of course.
It makes it possible to fully automate test cases. It allows to observe test cases for different input values without changing
test cases and locators. By leaving the test cases unchanged, it is possible to continually use the
same test cases, which makes it easy to perform testing, especially regression testing.
Makes it easy to find the error location.
4/10/2013
Ogma Applications 15
THANK YOU