Selenium presentation

15
SELENIUM Created by: Pargev Ghazaryan Reviewed by: Vladimir Soghoyan Ogma Applications

description

 

Transcript of Selenium presentation

Page 1: Selenium presentation

SELENIUM

Created by: Pargev GhazaryanReviewed by: Vladimir SoghoyanOgma Applications

Page 2: Selenium presentation

Ogma Applications 2

How to Choose the Right Selenium Tool for Your Need

4/10/2013

Selenium IDE

Web Driver

Selenium RC

Selenium Grid

Page 3: Selenium presentation

Ogma Applications 3

Features of Selenium IDE

4/10/2013

Menu BarBase URLToolbar

Test Case Pane

Log/Reference/

UIRollup Pane

Page 4: Selenium presentation

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

Page 5: Selenium presentation

Ogma Applications 5

Selenium IDE Options dialog box

Default timeout value

Selenium IDE extensions

Remember base URL

Autostart Record

4/10/2013

Page 6: Selenium presentation

Ogma Applications 6

Base URL Bar

Toolbar

4/10/2013

Page 7: Selenium presentation

Ogma Applications 7

Test Case Pane

4/10/2013

Page 8: Selenium presentation

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

Page 9: Selenium presentation

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

Page 10: Selenium presentation

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

Page 11: Selenium presentation

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

Page 12: Selenium presentation

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

Page 13: Selenium presentation

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

Page 14: Selenium presentation

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

Page 15: Selenium presentation

Ogma Applications 15

THANK YOU