Search:     Advanced search

QA Wizard Pro Cannot Find htmlLink Controls

Article ID: 804  |  Last updated: 07 Jun, 2017

If a web site includes multiple HTML links and QA Wizard Pro finds the wrong link during playback, try one of the following solutions:

Solution #1 

If each link includes unique text, modify the property of the htmlLink control to only search for the Inner Text, not the Href. 

Solution #2 

If the links do not have unique text, modify the properties of each htmlLink control to use a regular expression based on the Href attribute.

For example, a web site includes three 'Buy This' links next to three different products on the same page. The InnerText, 'Buy This', is the same for all three links. The URLs are unique, but they contain a session ID, which changes each time the page is visited. Following are the URLs for each 'Buy This' link:


The product identifiers are the unique aspect of the link. Use the following regular expressions to ignore the changing session ID, but still uniquely identify each 'Buy This' link.

  1. http://www\.store\.com/products.php\?sessionid=[A-Za-z0-9]+&productid=45
  2. http://www\.store\.com/products.php\?sessionid=[A-Za-z0-9]+&productid=89
  3. http://www\.store\.com/products.php\?sessionid=[A-Za-z0-9]+&productid=17

The [A-Za-z0-9]+ section of the regular expression means one or more alphanumeric characters.

Solution #3 

If the beginning or end of the link remains constant, edit the Expected Value column for link so it contains the common data. Set the Action column to Starts with or Ends with. During playback, QA Wizard Pro only looks the static text you specified and ignores the dynamic portion. Following are the links to the same page with different session IDs:

  1. Frame_8585
  2. Frame_8586
  3. Frame_8587

The session IDs are the unique aspects of the link. Use the following action in the repository to ignore the session ID: Starts with Frame_.

Article ID: 804  |   Last updated: 07 Jun, 2017
playback HTML link

Prev   Next
Running QA Wizard 4 Scripts in QA Wizard Pro     Text Data Not Imported from Excel Files to QA Wizard Pro...