July 13, 2010
Hidden HTML Elements in QA Wizard Pro
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.Email sign up
- 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.
<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")