Using the XPath search method

When new HTML controls in web applications are added to the application repository, the XPath search method is selected in the control properties by default. This search method uses an XPath query to search for an HTML control. Each control in the repository has a unique XPath, which is captured when the repository is populated. If the application changes, you can modify the XPath query for a control to make sure it is located. During playback, the XPath query is performed and QA Wizard Pro interacts with the first HTML element that matches the query. See About XPath queries.

For example, a web site with a shopping cart has a Buy button for every item available for purchase. During playback, QA Wizard Pro can distinguish between the Buy buttons because each one has a unique XPath query that specifies its exact location.

Keep the following in mind when using the XPath search method:

1. Select a control in the Application Repository pane and choose File > Properties.

The Properties dialog box opens with the Search Method tab selected.

2. Select XPath as the Search method.

3. Select the XPath query to use to find the control during playback.

Note: Do not modify the XPath unless you are familiar with XPath and understand how changing QA Wizard Pro search options can impact scripts.

4. Click OK to save the changes.

Tip: To switch between relative and full XPath for multiple HTML controls at the same time, Ctrl+click them in the repository, right-click a selected control, and choose Search Method. See Changing the search method for multiple controls.