Use of “mouseOver”, “mouseOut”, “mouseOverAndWait” and “mouseOutAndWait” commands in selenium IDE

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
Command Target Value
open https://www.google.com
mouseOver id=gbqfba
pause 5000
mouseOut id=gbqfba
In this example “mouseOver” command will put mouse cursor on button id=gbqfba virtually. You can see its

effect on button. Button’s text will remain darker for 5 seconds because i have used “pause” 5 second command after “mouseOver” command.

“mouseOut” Command
In above example, mouseOut command will remove mouse cursor from button “Google search” after 5 seconds.

“mouseOverAndWait” and “mouseOutAndWait” Command
You need to use “mouseOverAndWait” and “mouseOutAndWait” commands when you move in or move out mouse cursor from target element and page get reloaded. Other function is same as mouseOver and mouseOut command.

9 thoughts on “Use of “mouseOver”, “mouseOut”, “mouseOverAndWait” and “mouseOutAndWait” commands in selenium IDE

Leave a Reply

Your email address will not be published. Required fields are marked *