Knowledgebase

Search:     Advanced search

Scripts Fail on CheckExists Statements Set to Generate Warnings and Continue Playback

Article ID: 812  |  Last updated: 23 Dec, 2014

Problem

Scripts fail on CheckExists statements even if the statement failure behavior is set to generate a warning and continue playback.

Cause

The CheckExists statement has other points of failure besides the checkpoint. This commonly occurs if a nested function is used to retrieve window and control information and the function fails.

For example, the following statement has multiple points of failure:

Window("WysiCorp Feedback").HTMLLink("WysiCorp Feedback").GetControlFromXPathQuery("html[1]/
body[1]/table[2]/tbody[1]/tr[2]/td[1]/table[1]/tbody[1]/tr[1]/
td[1]/table[1]/")).CheckExists(False, "XPath not correct")

The script could fail if:

  • The XPath in the nested GetControlFromXPathQuery function is not the correct XPath for an HTMLLink
  • The WysiCorp Feedback Acknowledgement window is not found

Solution

Use the hints displayed in the Errors window after playback to correct the problem. In Text View, a red line indicates the portion of the statement that failed.

Article ID: 812  |   Last updated: 23 Dec, 2014
Tags
CheckExists

Prev   Next
Binding to Target Application Error After Upgrading     Scripts Run Against Qt 4.x Applications Fail After Upgrading