March 31, 2010

QA Wizard Pro: Clicking vs. Navigating

Helix ALM
To automate the testing of a web application, QA Wizard Pro can either click on an HTML link or navigate to a web page. These actions may appear to be identical, but they have important, subtle differences. Window("Seapine").HTMLLink("The Seapine View").Click() Window("Seapine").HTMLLink("The Seapine View").Navigate() The Click action will scroll the link into view. It will also attempt to move the mouse over the link, and then it will finally click on the link as commanded. Using Click ensures that the underlying JavaScript events are fired. However, if the link is hidden, QA Wizard Pro may not be able to click on it. In summary, Click will attempt to simulate—as closely as possible—exactly what users would be doing if they were using your web application. By contrast, the Navigate action simply moves the browser to the target URL. Navigate only cares about where it needs to go. Therefore if a link exists but is hidden, QA Wizard Pro can still successfully Navigate to the target URL. However, navigating does not scroll the link into view, nor does it fire any underlying JavaScript events. QA Wizard Pro generates Click actions when the user clicks on links in record mode. It makes this choice so that the generated scripts closely simulate user activity. However, if you’re writing scripts and your goal is simply to move to another web page, then Navigate might be a better choice.