Thursday, February 20, 2014

Basic Commands in Selenium IDE

Some of the Selenium commands

1.open 
       This command is for opening the URL what you specified.

2.click 
This command is used while link (or) button is need to click it
here the target is filled with id (or) name (or) css (or) xpath
No data in value field

3.clickAndWait
This command is used while link (or) button is need to click it and wait for page load
here the target field is filled with id (or) name (or) css (or) xpath
No data in value field

4.type
This command used to send the values to particular field
here the target is filled with id (or) name (or) css (or) xpath
the value is present "what the value is assign to text box (or) textarea box"

5.Verify and assert
before going with verifyText(or)verifyTextPresent and assertText(or)assertTextPresent,
the function of verify and assert is

verify-just verify the text-the script execution is continue-if its fail

assert-just verify the text-the script execution is not continue-if its fail


verifyTextPresent

This commands are used used to confirm that text is present in web page or not
here the target is filled with "the text to confirm it"
No data in value field

The result is display with pass as green and fail as red

assertTextPresent

This commands are used used to confirm that text is present in web page or not
here the target is filled with "the text to confirm it"
No data in value field

The result is display with boolean value pass as True and fail as false

verifyText

This commands are used used to confirm that text is present in web page or not
here the target is filled with id (or) name (or) css (or) xpath
In value field-it is filled with "the text to confirm it"

The result is display with pass as green and fail as red


assertText

This commands are used used to confirm that text is present in web page or not
here the target is filled with id (or) name (or) css (or) xpath
In value field-it is filled with "the text to confirm it"

The result is display with boolean value pass as True and fail as false

6.goBack and goBackAndWait

goBack

This command is used to goes to the used browser backward page
No data in target field
No data in value field

goBackAndWait

This command is used to goes to the used browser backward page and wait for page load is complete
No data in target field
No data in value field

        The difference will analyse when the speed of the test is in high(1000ms)

7.setSpeed (another option to set speed)

This command is used to set the speed of the test execution through coding
here the target field is filled with number of milliseconds as 900 like that
No data in value field

Sample commands with selenium ide





No comments: