Friday, October 14, 2016

Testing Apex 5 menus with Selenium IDE

Recently I started testing other web applications using Selenium IDE. Of course, the techniques can be used for Apex web applications too.

There are so many different aspects on web pages to take into account. What works in one application doesn't work in another. My first serious challenge in using Selenium IDE for testing Apex 5 applications was to get the drop down menu's to work. You don't need to have an application to run this test scenario. You can use Apex Builder.




The test to perform is:
1- Click on the Application Builder expand menu icon.
2- Open the Workspace Utilities sub-menu
3- Click on All Workspace Utilities

As always, you need a developer tool like Firebug to get the ID or xpath of an element.
Using the ID's of the elements, the end is simply:





Important to get this to work is the use of clickAt instead of click. 
I tried mouseDown, mouseUp, mouseOver, click. Nothing worked to activate the sub-menu. In the end it was clickAt that did open the sub-menu.