Www.krishnatraining.com



krishnatrainingusa@

Selenium IDE: addon to FF browser: record and playback feature

How to install this addon: FF must

Steps: 1) open FF browser and open

2) type selenium IDE download in the google search filed

3) simply click on “downloads page- selenium” it will redirect us to selenium official website downloads page

4) inorder to download that selenium IDE addon simply click on the latest version of IDE

5) click on allow button and click on install button after successful installation it wil ask us to restart the browser simply restart the browser

How can we check whether that IDE was installed or not???

Under FF browser options and under webdevelopers >>> selenium IDE will display >> simply click on that one it wil open a new window

Perform a simple recording scenario in IDE:

Scenario1: open , enter some value in search field and click on search button

Simply we can conclude that whatever actions we were performing in FF browser IDE is capturing the scripts.

So finally whatever actions we are perforimg in FF browser for those actions only IDE is going to capture the scripts if at all we are performing some action in other browsers like IE,chrom,safari IDE wont capture or records the script

How can we record a simple script in IDE???

Open IDE window from browser webdevlopers

Verify whether IDE was in recording mode or not ???

At the extreme right end of IDE we can see on red button if that button was in enabled mode then only whatever actions we are performing in browser IDE will capture scripts for those actions. Means if that button was in disable mode and even we perform action in FF browser IDE wont capture scripts

Inorder to capture the scripts with help of IDE we need to check 1st whether that IDE was in recording mode or not…

How can we playback or execute the recorded test case:

With the help of “Play current test case” option in IDE

In the log it will display a detailed information related to test case failure or test case passed

Once after test case got executed by simply looking into the color we can confirm whether our test case got executed successfully(pass means green color) or it was failed(red color)

How can we save the test case and why we need to save test case???

If we wont save the script means whenever it was required we need to record that. Instead of recording each and every time if we save that test case and whenever it was required simply call that test case

Goto file >> select save test case >> it wil display a new window under which select where you want to save that test case with desired name.

Inorder to save any test case in IDE we need to give “.html” extension at last

Example: bing_search.html

Usage of Reference option in IDE???

The objective of this option in IDE is if we place our cursor on any cmd in IDE under reference it will display a detailed information about that cmd means how this cmd wil work and what are the various parameters we need to pass for that cmd

Whether IDE is useful for us in real world???

Yes , cmds we are discussing in IDE al the cmds we are going to discuss in RC as well.

Locators: inorder to identify a object in the web page we are going for this locators concept. Means this concept is similar to objectspy in QTP. The ue of objectspy is we can get various kinds of properties supported for an object. Here for this selenium we are using firebug which is similar to objectspy

How can we install firebug ??? : firebug is an addon to ff browser: to identify various properties of an object

Steps: 1) open th browser and open google home page

2) in the search field enter firebug addon

3) click on “Firebug Addon to Firefox” link among the search results

4) Click on “Add to Firefox” and click on install button automatically firebug will be installed

We can add multiple addons to FF browser

How can we verify whether firebug is installed or not???

1) Simply right click on the browser on an object and in the list of options we can see ”Inspect Element with Firebug” or some time “Inspect Element”

2) At the extreme right top most end of the browser we can see the firebug

How can we see various kinds of object properties???

Simply right click on the object and select “Inspect Element with Firebug” after that a small window wil display within the browser in which few set of cmds were in highlighted mode by simply looking into that we can understand that the highlighted properties were related to our object

Why we are going for this firebug? What is the use of this addon??

Inorder to get various kinds of object properties we usually go for this addon

Is this the only way we can get object properties or do we have some other way???

There were 2 ways inorder to get object properties

1) With simple recording :

Open IDE window keep our IDE recording mode and go to the browser , select the object for which we need to get the properties and perform some actions on that object.

Goto to IDE and in the target it will display as dropdown try to observe the dropdown values.. so finally the dropdown values were the various kinds of properties supported for an object

With simple recording we are getting various properties supported for an object then why we are going for firebug???

We can identify object properties simply with firebug addon

2) With Firbug addon:

Simply right click on the object and select “Inspect Element with Firebug” after that a small window wil display within the browser in which few set of cmds were in highlighted mode by simply looking into that we can understand that the highlighted properties were related to our object

How can we identify an object with the properties disapled in firebug???

Generally we can identify any object in webpage with below properties:

Id:

Name

Class

Link

Text

Xpath

css

how can we identify object with above properties???

Syntax which we need to implement in IDE:

Propertytype=propertyvalue

We can identify an object with any one the above properties..

Id we were unable to identify then goto name property, someother property

Propertytpe:id,class,name,link,,title

Propetyvalue: wecan get it from firebug

Example: id= sb_form_q so we need to keep this syntax in target

assume that in a room there were 10 people we need to identify a single person from that 10 members. We simply know that person name only “murthy”.. if at all there were 3 people with the same name in the room ??? then we are identifying the required person with some other properties like his hight or color or various???

With the default properties if selenium IDE was unable to identify object in webpage what we need to do??? Hpw can we handle these kind of situations???

Xpath: if at all IDE was unable identify object in webpage with default properties then we are going for xpath

Syntax:

//element[@propertytype=’propertyvalue’]

< input/a/span

example:

//input[@type=’submit’]

//input[@value]’Log in’]

Property type, property value we can get from firebug only

Then what is this element???

Scenario: identify object properties for search text field in

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download