Search: Advanced search
Please enter a keyword or ID
Adding HTML Elements to the QA Wizard Pro Application Repository
When testing web pages, QA Wizard Pro captures controls, such as hyperlinks and buttons, but it does not capture the actual page text. In most cases, this is not an issue. If you want to verify specific text, such a confirmation number, you must first capture the HTML element that contains the text by using a checkpoint. Use the following steps to capture an HTML element.
The following example retrieves a ticket number from a confirmation web page.
1 ' Window("WysiCorp Thank You").HTMLElement("Ticket").Checkpoint("Inner Text","W98038", True, "")
Line 1 contains the checkpoint used to capture the HTML element that stores the confirmation number. After using the checkpoint to capture the element in the application repository, you can comment the checkpoint out or delete it. (Because the web site generates a new ticket number for each item submitted, the checkpoint will fail after the initial recording.) Line 2 saves the confirmation number in a variable named TicketNum. Lines 3 through 7 evaluate the TicketNum and print the confirmation number if it exists. If the site does not generate a confirmation number the script fails.
Note: If you want to verify information stored in running HTML text (not in a specific element) see Capturing Web Page Text with QA Wizard Pro Functions.