"break" Command

Main use of "break" command is to halt execution of script until user resume it again manually. Supposing if you want to take some actions manually at any specific stage of your currently running script, then you need to halt your current execution and you can do it with "break" command. See bellow example for better understanding.

New Test
CommandTargetValue
openhttps://www.google.com
break

openhttps://www.yahoo.com
goBack



Here first it will open "https://www.google.com" URL in browser. Second command will halt selenium IDE execution and now it will show "Pause/Resume" button enabled in selenium IDE window. Your script's execution will remain halted until you manually resume it by pressing "Pause/Resume" button on selenium IDE

"storeSelectOptions" Command

We can use "storeSelectOptions" command with only list box and drop downs. Function of this command is it will store all option labels names of targeted drop down or targeted list box in to variable. See bellow given example.


New Test
Command Target Value
storeSelectOptions ctrl55_Contentitem_State label
storeValue chk_box_01value

In above example, "storeSelectOptions" command will store all option labels names of targeted list box

"storeSelectedLabel" Command

We can use "storeSelectedLabel" Command only with drop down and list box. When you want to know or you need to compare selected option value of drop down with some other value at that time first you need to store value of selected label. In such condition you can use "storeSelectedLabel" Command. Let we see with example.

New Test
Command Target Value
storeSelectedLabel ctrl55_Contentitem_State value
storeSelectedLabels ctrl55_Contentitem_Statevalues


In above example, First command "storeSelectedLabel" will store selected label name of drop down(ctrl55_Contentitem_State) into variable "value". Here "ctrl55_Contentitem_State" is the name of drop

"assertEditable"  Command

You can use "assertEditable" command with only and only input fields like text box, list box, drop downs etc. You can check and assert that targeted element is editable or not. If targeted element is not editable then it will stop execution of remaining selenium script.


New Test
CommandTargetValue
openhttps://www.google.com
assertEditableid=gbqfq
assertNotEditableid=gbqfq
assertEditableid=gbqfq

Here in this example, second command(assertEditable) will check that target element search text box(id=gbqfq)is editable or not. If its editable then and then it will execute next command. If it is not editable

"captureEntirePageScreenshot" command

This command is very useful for capture and save full page screenshot. You can use this command anywhere in between. It will store screen shot of current selected browser tab.


New Test
Command Target Value
open http://www.google.com
captureEntirePageScreenshot D:\\selenium.jpg

VIEW CAPTURE SCREENSHOT EXAMPLE IN WEBDRIVER

In above example, "captureEntirePageScreenshot" command will capture and store screenshot of Google home page in "D" drive with file name selenium.jpg. You can change file name and file storing path as you

"storeSelectedIndex" Command

storeSelectedIndex works with only select or multi-select target element like drop down and list box. Using this command, you can get option index of selected option.


New Test
CommandTargetValue
storeSelectedIndexctrl5_Main_ddlStateindexno
echo${indexno}
storeSelectedIndexesctrl5_Main_ddlStateindexnos
echo${indexnos}

(Note : Click here to view examples of other store commands.)

In above example, ctrl5_Main_ddlState target element is list box.Here command "storeSelectedIndex" will store index value of current selected option of target element ctrl5_Main_ddlState list box into variable "indexno". We can also use this command with any drop down. We can use "storeSelectedIndex " if there is

You can use mouseOver and mouseOut command when your targeted software web page element has effect on mouse over and mouse out. Targeted element can be button or image or link or anything else. 

Suppose you have one image on software web page and it is changing image when you move mouse on it. Now if you want to see this effect with selenium IDE software test then you can use "mouseOver" and "mouseOut" Commands. Let we see it with example.

"mouseOver" Command

On Google search page, there is one button named "Google search". That button's text becomes dark when we put mouse cursor on button and it becomes light when we remove mouse cursor from button. Let we check it with selenium IDE software testing tool.
New Test
CommandTargetValue
openhttps://www.google.com
mouseOverid=gbqfba
pause5000
mouseOutid=gbqfba

In this example "mouseOver" command will put mouse cursor on button id=gbqfba virtually. You can see its

You can use check and uncheck commands only with checkbox and radio buttons of webpage. Let we see how we can use check command in selenium IDE.

"check" command

check command will check the check box if have check box on your webpage. You can also select radio button using check command.

New Test
CommandTargetValue
openmail.google.com/
checkid=PersistentCookie
uncheckid=PersistentCookie

In above example, check command will check the check box with id=PersistentCookie. You can use id of radio button if you have radio button on page. You can also use "click" command at place of "check" and

All these three commands useful only some time when you have multiple buttons or multiple fields or multiple links on page and you need ids of every element. Let me describe all these commands with example for better understanding.

"storeAllButtons" Command

If you are working on any webpage and you need ids of all available buttons on page then you can use storeAllButtons command. This command will store all buttons ids in given variable.


New Test
Command Target Value
open https://www.google.com
storeAllButtons i
echo ${i}
storeAllFields j
echo ${j}
storeAllLinks k
echo ${k}

In this example, storeAllButtons will store ids of all available buttons on google home page in variable "i". If

"select" Command

Purpose of "select" command is to select label from drop down/combo box or list box.

New Test
Command Target Value
open http://only-testing-blog.blogspot.com/2014/01/textbox.html
select name=FromLB Russia

View example of HOW TO SELECT VALUE FROM DROP DOWN IN WEBDRIVER.

In this example, You need to add combo box id/Name/Xpath into target column and need to add option's value or visible text or index into value column. Supposing if your option name is "Russia" then you need to add it as Russia.

"storeLocation" Command

"storeLocation" command is useful to store current selected window's URL in selenium IDE software testing tool. See bellow given example for more reference.


New Test
Command Target Value
open https://www.google.co.in
storeLocation i

echo ${i}

In this example, My software web application's URL will be stored into variable "i" and now i can use that variable value anywhere in my script.

"pause" Command

"pause" command is simple wait command and useful for stop execution of selenium IDE software automation testing tool for given time. In bellow given example, it will wait for 5 second and then it will execute next "refresh" command.

New Test
Command Target Value
open https://www.google.co.in/
pause 5000
refresh

waitForPageToLoad 10000
open https://www.google.co.in/imghp?hl=en&tab=wi


"refresh" Command

 "refresh" command is useful for refreshing page in selenium IDE software automation testing tool. It will just refresh page and then will start execution of next command. It will not wait for page to reload. So that you need to use "waitForPageToLoad" or any other

"assertTextPresent" command

"assertTextPresent" command is useful for verifying and asserting selenium if given text is not present on page. It will return false as error if specified text is not present on page and will stop execution.

New Test
Command Target Value
open https://www.google.co.in/
assertTextPresent Maps
verifyTextPresent Maps

In above example, selenium IDE software testing tool will stop execution if text "Maps" not present on page.

VIEW WEBDRIVER EXAMPLES FOR ALL ASSERTION

"assertTextNotPresent" command

"assertTextNotPresent" is assertion for if specified text present on software web page. You can use this command when

"type" command

"type" command is useful for typing keyboard key values into text box of software web application. you can also use it for selecting values of combo box.

New Test
Command Target Value
open http://www.software-testing-tutorials-automation.com/
type name=email youremailid@mail.com
click css=input[type="submit"]

In this example, First it will type text "youremailid@mail.com" into text field "name=email" of software web page and then it will click on button element "css=input[type="submit"]".

Here let me describe you main difference between assert and verify in selenium IDE software testing tool and selenium RC software testing tool. assert and verify commands are useful for verifying condition match or not.

Verify command will verify the condition and if its not match, it will give error message in Log area and will start executing next commands. while in assert command, if condition does not match then it will stop remaining script execution in selenium IDE software testing tool.

Note : Do you wants to learn more examples of selenium IDE software testing tool's commands? View this full tutorial guide.

In bellow example, you can understand difference better.

New Test
Command Target Value
open https://www.google.co.in/
verifyText css=#gb_2 > span.gbts xyz
assertText css=#gb_2 > span.gbts xyz
verifyText css=#gb_2 > span.gbts Images

Here element "css=#gb_2 > span.gbts" contains text "Images"

In this example, first "verifyText" command will go for checking that element "css=#gb_2 > span.gbts" contains text "xyz"? it

"storeText" command

"storeText" command in selenium IDE software testing tool is useful to store text value of page element of software web application in to variable for future use.

See bellow given example. In this example, When "storeText" command will be executed in selenium IDE software testing tool, value of page element "css=#gb_2 > span.gbts" will be stored into variable "k". If specified target element ("css=b" in this case) will be not found on software web application's page then it will show error message like "[error] Element css=b not found" in log area of selenium IDE window.

Note : Need Examples of all selenium IDE softwarecommand tutorials? Click Here to view them.

New Test
Command Target Value
open https://www.google.co.in/
storeText css=#gb_2 > span.gbts k
echo ${k}

"storeTextPresent" command

"storeTextPresent" command is not for storing value of any target element, but it is useful to verify that

 "store" command

"store" command is useful to store value or string into variable in selenium IDE software testing tool. When you want to use some value at some other command, you can store that value.

Bellow is the example of "store" command in selenium IDE software testing tool. It will store string "Hello" into variable "i". I can use that string in any next commands.

New Test
Command Target Value
open https://www.google.co.in/
store Hello i

"echo" command

 "echo" command is useful to know stored value of any variable. We can use it for debugging purpose.

 "clickAt" selenium IDE command

"clickAt" command is useful when you need to click on specific x,y position of any element of software web application. Sometime this types of conditions occurs at that time you can use clickAt command. You need to fill x,y position value in value field of command.

In bellow example of selenium IDE software automation tool, It will click at 10,10 position on element "css=#gb_2 > span.gbts".

New Test
Command Target Value
open https://www.google.co.in/
clickAt css=#gb_2 > span.gbts 10,10

You can use "clickAt" command when "click" command not working. I have seen many times where "click"