July 13, 2010

Hidden HTML Elements in QA Wizard Pro

Helix ALM
Web pages often include HTML elements that are not visible to the user. The web browser doesn't render the elements on the screen, but it often includes their data in the GET and POST requests to the web server. The classic example is an INPUT element of type "hidden" used to embed name/value pairs. But any HTML element might have important attributes that you need to verify. You can still verify data about these HTML elements in QA Wizard Pro, even though you cannot click on them.
  • While recording against your web application, click the Checkpoint button on the Recording dialog.
  • Right-click on an HTML element to view all of the HTML elements at that point and all of their parent ancestor elements.
  • Choose the desired HTML element from the context menu.
QA Wizard Pro will add the HTML element to the application repository, if it's not already there, and will then allow you to add a Checkpoint to your script. Picking HTML elements to checkpoint Don't forget that you can also use XPath to access hidden HTML elements. Suppose your web page contains the following HTML:
<span id="myspan" style="display:none;" myattr="42"/>
An XPath query can retrieve the important attribute value from your hidden HTML element:
myattr = Window("page").PerformXPathQuery("//span[@id='myspan']/@myattr")