When you automate a test, working with various mouse actions as desktop commands are essential. Mouse actions could be as following,
- Single Click
- Double Click
- Right Click
- Mouse Hover etc.
When I talk to customers who are coming from manual testing background or working with other automated testing tools they complain about automation of mouse actions like hover etc. They say it is tough in their existing tools to automate Mouse Actions. They require them to write some amount of scripts to achieve automation of mouse actions.
In Test Studio automating mouse actions are super simple. In this post we will take a look on how to do that.
Let us consider you are recording a test and Test Studio is connected to recording browser (IE in this case) . From Test Studio control panel docked on browser select second option. It will allow to select an element on the DOM
When you move mouse on page elements would be getting selected. There would be a red rectangle around selected element. Keep mouse for some time and you will get a blue bubble.
Next you need to click on blue bubble. You will get various options. In options select Mouse Actions options.
On selecting Mouse Actions option , you will get available mouse actions to automate.
For example if you want to add Mouse Hover action in your test just double click on Mouse Hover and a step will get added in the test. Next Test Studio will ask you further options like Centre and Specific Point.
You will find mouse actions are added in test as follows
We just witnessed how easy it is to automate various desktop mouse actions command using Test Studio. We did not have to write any script and automation can be done while recording test. I hope you find this post useful. Thanks for reading.