Many web applications contain page elements that are hidden until a user mouses over some part of the page that causes other page elements to become visible. One common example is a menu in a menu bar at the top of a web application. Assume that you move your mouse over a menu bar, which exposes menu items, then you click on one of the previously-hidden menu items. During recording, SOAtest will not record the mouse movements, but it will record the click that occurred on the previously-hidden menu item. During playback, since the mouse movements were not recorded and thus will not be played back, the interactions with the hidden menu element will occur while the element is still hidden.
Depending on how the page was constructed, you will get an error message that the menu element is not present or is not visible. (Note that the Parasoft native playback engine will play back actions on hidden elements if they are present on the page, while the Selenium WebDriver playback engine cannot play back actions on hidden elements. Neither engine can play back actions on elements that are not present).
When you get an error message like this, there are two ways to handle it.
- During recording, rather than simply moving your mouse over the menu bar that exposes the menu item, click the menu bar itself before clicking the menu item. This will cause a click action to get recorded on the menu bar, which will cause the hidden menu item to get exposed during playback.
- Add a click action to the already-recorded scenario that will click on the menu bar that exposes the hidden menu item.