Using URL format rules

If you are testing a web application with dynamic URLs, you may have to modify the application repository so QA Wizard Pro can locate controls during playback. If a control property, such as Href, URL, or Src, is selected as search criteria and the expected value contains a URL, QA Wizard Pro cannot locate the control when the URL changes because the expected and actual URLs are different. Dynamic URLs may also cause QA Wizard Pro to add the same web page and controls to the application repository multiple times, which makes the repository unmanageable over time.

To handle this scenario, you can create URL format rules to compare, ignore, or perform regular expression searches on individual parts of URLs, such as the domain and parameters. For example, if a URL has a session ID parameter, you can create a URL format rule to ignore the parameter. During playback, QA Wizard Pro ignores the session ID parameter and searches for controls based on the rest of the URL. If you are testing a web application hosted on different web servers, you can create a URL format rule that compares the domain name in URLs to multiple domain names specified in a regular expression. QA Wizard Pro successfully locates a control if the domain matches a value returned by the regular expression. See Running web scripts against different servers.

URL format rules can also be automatically applied to window and control properties captured when you record scripts or populate the repository. For example, if a URL format rule ignores the session ID parameter and formats are automatically applied during recording, URLs for control properties added to the repository do not include the session ID.

You can create rules and apply them globally to all URLs in control properties for an application version, including existing controls in the repository. See Creating URL format rules.

You can also modify control properties individually to specify URL format rules to apply during playback. See Editing URL format rules in control properties.

Related Topics Link IconSee also