Exceptions

There are quite a lot of exceptions that can be thrown during the execution of a test. This chapter lists the exceptions in hierarchical order, shows the typical error messages and gives a short explanation.

If you want to work with those exceptions in scripts, please take a look into section 49.10.

TestException

This is the base class of all exceptions that can be thrown during a test run. The actual exception thrown should almost always be of a derived class. A 'Catch' with the 'Exception class' set to TestException will catch all possible exceptions. Just like in Java you should normally not use such a 'Catch' since it may hide unexpected Exceptions.

ComponentNotFoundException

This exception is thrown whenever the target component for an event or a check cannot be determined. Failure of a 'Wait for component to appear' will also cause a ComponentNotFoundException unless the node's 'Wait for absence' attribute is set.

Base class: TestException

Message: The target component could not be determined.

ScopeNotFoundException

This exception is thrown whenever the target component of an explicit scope for an event or a check cannot be determined. Failure of a 'Wait for component to appear' with an explicit scope will also cause a ComponentNotFoundException unless the node's 'Wait for absence' attribute is set.

Base class: ComponentNotFoundException

Message: The target component for an explicit scope could not be determined. This can be caused by a number of quite different reasons. Please see chapter 5 of the manual for background information and how to proceed.

DocumentNotLoadedException

This exception is a variant of ComponentNotFoundException and thrown specifically if a 'Wait for document to load' node fails.

Base class: ComponentNotFoundException

Message: The target document was not loaded (anew).

PageNotFoundException

This exception is a variant of a ComponentNotFoundException and thrown specifically if a 'Selection' node fails to select a desired page in a PDF-Document.

Base class: ComponentNotFoundException

Message: The target page "pagename" could not be determined.

ComponentFoundException

This is the opposite of a ComponentNotFoundException, thrown by a 'Wait for component to appear' with the 'Wait for absence' attribute set.

Base class: TestException

Message: The target component does exist.

ModalDialogException

This exception is thrown when an event is blocked by a modal dialog. See the option Check for modal dialogs for details.

Base class: TestException

Message: A modal dialog blocked this event. (plus information about the dialog)

ComponentCannotGetFocusException

Note This exception is obsolete and should not occur anymore.

This exception is thrown when the target component for a 'Key event' or 'Text input' is a text component that cannot get the keyboard focus for some reason. With JDK 1.4 the event cannot be delivered to the component in that case.

Base class: TestException

Message: The target component cannot get the keyboard focus.

DisabledComponentException

This exception is thrown when the target component for a 'Mouse event', 'Key event' or 'Text input' is not enabled. In that case the event would be silently ignored, very likely leading to unexpected results during further execution of the test.

For backwards compatibility this kind of exception can be suppressed by deactivating the option Throw DisabledComponentException.

Base class: TestException

Message: The target component is disabled and cannot receive events.

DisabledComponentStepException

This exception is thrown when the target component for a 'Mouse event', 'Key event' or 'Text input' is disabled under 'Windows and components'.

Base class: TestException

Message: The target component is disabled under 'Windows and components', so it cannot receive events.

BadItemException

This exception is thrown by ItemResolvers if element and item types do not match.

Base class: TestException

ExecutionTimeoutExpiredException

This exception is thrown when the execution timeout of a node has been exceeded.

Base class: TestException

Message: Execution timeout of ... ms expired.

BusyPaneException

This exception is thrown when the target component for a 'Mouse event', 'Key event' or 'Text input' is covered by a GlassPane with a "busy" mouse cursor. The option Wait for 'busy' GlassPane (ms) determines how long QF-Test will wait for the GlassPane to disappear before the exception is actually triggered.

Base class: TestException

Message: The target component is covered by a 'busy' GlassPane.

InvisibleDnDTargetException

This exception is thrown when the location in the target component for a 'Mouse event' of type DRAG_FROM, DRAG_OVER or DROP_TO for a Drag&Drop operation is invisible and cannot be made visible by scrolling the target component.

Base class: TestException

Message: The target location for the Drag&Drop operation could not be made visible.

InvisibleTargetComponentException

This exception is thrown when the target component is invisible.

Base class: ComponentNotFoundException

Message: The target component is invisible.

InvisibleTargetItemException

This exception is thrown if the surrounding target component is visible, but the target element in it is invisible.

Base class: IndexNotFoundException

Message: The target item for index '...' is invisible.

DeadlockTimeoutException

This exception is thrown when the SUT does not react for a given amount of time which is defined in the option Deadlock detection (s).

Base class: TestException

Message: The previous operation timed out. It is very likely that the client '...' went into a deadlock.

DownloadNotCompleteException

This exception is thrown, when waiting for a download that is not complete.

Base class: ComponentNotFoundException

Message: The download of the file '...' has not completed yet.

DownloadStillActiveException

This exception is thrown, when trying to download to a file that is still blocked by another download.

Base class: ComponentNotFoundException

Message: The download of the file '...' is still active and you cannot start another download for the same file.

NoSuchDownloadException

This exception is thrown, when waiting for a download that was never started.

Base class: ComponentNotFoundException

Message: There was attempt to download the file '...'.

VariableException

This exception is never thrown itself but is the base class for exceptions thrown in the context of variable expansion.

Base class: TestException

BadVariableSyntaxException

This exception is thrown when a value that is to be expanded doesn't follow a proper variable syntax (e.g. no closing brace).

Base class: VariableException

Message: Invalid variable syntax: '...'

MissingPropertiesException

This exception is thrown when no properties or ResourceBundle are available for the group name of a property or resource looked up with ${group:prop} (see 'Load resources' and 'Load properties').

Base class: VariableException

Message: No properties or resources are available under the name '...'.

MissingPropertyException

This exception is thrown when a property looked up with ${id:property} is not available (see 'Load resources' and 'Load properties').

Base class: VariableException

Message: There is no property or resource named '...'.

RecursiveVariableException

This exception is thrown when the expansion of a variable expression leads to recursive variable lookup, e.g. if you set the variable named x to $(y) and the variable named y to $(x) and then try to expand the value $(x).

Base class: VariableException

Message: The variable '...' could not be expanded since it lead to recursive lookup.

UnboundVariableException

This exception is thrown when a variable for a value that is to be expanded doesn't exist.

Base class: VariableException

Message: The variable '...' is not bound.

VariableNumberException

This exception is thrown when a variable expansion for a numeric attributes results in something other than a number.

Base class: VariableException

Message: The value '...' is not a valid number.

BadExpressionException

This exception is thrown when evaluating a $[...] expression fails (see section 6.7).

Base class: ScriptException

Message: The expression '...' is invalid.

BadTestException

This exception is thrown when evaluating the 'Condition' of an 'If' or 'Elseif' node fails.

Base class: ScriptException

Message: The expression '...' is not a valid test.

BadRegexpException

This exception is thrown whenever converting a String to a regular expression (see section 48.3) fails, e.g. for 'Item' or 'Check text' nodes.

Base class: TestException

Message: The value '...' is not a valid regular expression.

BadRangeException

This exception is thrown when the syntax of the 'Iteration ranges' for a 'Data binder' node has invalid syntax or specifies an index outside the valid data range.

Base class: TestException

Message: Invalid iteration range syntax: '...'.
Invalid iteration range index: '...'.

CannotExecuteException

This exception is thrown when execution of a process from a 'Start SUT client', 'Start Java SUT client' or 'Start process' node fails.

Base class: TestException

Message: An error occurred while starting process '...'. Please check the process and PATH settings.

InvalidDirectoryException

This exception is thrown when the 'Directory' attribute of a 'Start SUT client' node refers to a non-existent directory.

Base class: TestException

Message: The directory '...' doesn't exist.

CheckFailedException

This exception is thrown when a check node with activated 'Throw exception on failure' attribute fails.

Base class: TestException

Message: The check for client '...' failed. Expected: '...'. Got: '...'.

CheckNotSupportedException

As explained in the section about checks, each check can handle only a limited set of target components. This exception is thrown when the target component is not suitable for a check.

Base class: TestException

Message: This kind of check is not possible for a component of class '...'.

OperationNotSupportedException

This exception is thrown when an operation like 'Fetch text' is not supported for the designated target component.

Base class: TestException

Message: This operation is not possible for a component of class '...'.

BadComponentException

This exception is thrown, when a component for an event is not suitable, i.e. a non-window for a 'Window event'.

Base class: TestException

Message: The component of class '...' is not a window.

IndexFormatException

This exception is thrown when an invalid index format for a sub-item is encountered (see subsection 5.9.1).

Base class: TestException

Message: The value '...' is not a valid string index/number/regexp.

IndexFoundException

This exception is thrown when a sub-item is found during execution of a 'Wait for component to appear' node that looks for the absence of the item.

Base class: ComponentFoundException

Message: The item for index '...' was found.

IndexNotFoundException

This exception is thrown when no sub-item can be located for a given index.

Base class: ComponentNotFoundException

Message: No item was found for index '...'.

IndexRequiredException

This exception is thrown when no sub-item index is provided for an operation that requires one, e.g. a 'Check text' on a JTree.

Base class: TestException

Message: This operation requires an index.

UnexpectedIndexException

This exception is thrown when a sub-item index is provided for an operation that does not require one, e.g. a 'Check items' on a JTree.

Base class: TestException

Message: This operation doesn't support an index for a component of class '...'.

ClientNotConnectedException

This exception is thrown when the target client for an operation is not connected. It differs from a NoSuchClientException in that there is an active process for that name but no RMI connection.

Base class: TestException

Message: Client '...' is not connected.

CannotAttachException

This exception is thrown when attaching to a Windows application failed.

Base class: TestException

Message: An error occurred while attaching to application '... title: ...'.

ConnectionFailureException

This exception is thrown when the connection to a client failed.

Base class: TestException

Message: The connection to client '...' failed.

NoSuchClientException

This exception is thrown when the target client for an operation does not exist.

Base class: TestException

Message: Client '...' doesn't exist.

NoSuchEngineException

This exception is thrown when an engine is referenced that does not exist or when an attempt is made to use an engine that has not (yet) been connected to QF-Test.

Base class: TestException

Message: There is no engine named '...' in client '...'.

DuplicateClientException

This exception is thrown if an attempt is made to run more than one client simultaneously under the same name.

Base class: TestException

Message: A client named '...' has already been started.

UnexpectedClientException

This exception is thrown when an unexpected exception is thrown in the SUT during the replay of an event. Unless it is due to a bug in QF-Test, it indicates a problem in the SUT.

Base class: TestException

Message: Unexpected exception in client '...'.

ExtensionException

This exception is thrown when a client throws an unexpected exception.

Base class: TestException

Message: Exception in external code: ...

ClientNotTerminatedException

This exception is thrown when a 'Wait for process to terminate' node is executed and the process doesn't terminate.

Base class: TestException

Message: The process '...' did not terminate.

UnexpectedExitCodeException

This exception is thrown when the exit code of a terminated client doesn't match the expected value in a 'Wait for process to terminate' node's 'Expected exit code' attribute.

Base class: TestException

Message: Exit code mismatch.

BadExitCodeException

This exception is thrown when the 'Expected exit code' attribute of a 'Wait for process to terminate' node doesn't match the specification and cannot be parsed.

Base class: TestException

Message: Illegal exit code '...'. Please use '==', '!=', '<' or '>' followed by a number.

ComponentIdMismatchException

This exception is thrown when the 'QF-Test component ID' attribute of a node points to a node that is not a 'Window', 'Component' or 'Item'.

Base class: TestException

Message: The node '...' with the QF-Test ID '...' is not a component.

UnresolvedComponentIdException

This exception is thrown when the target of the 'QF-Test component ID' attribute of a node cannot be determined.

Base class: TestException

Message: There is no node with the QF-Test ID '...'.

TestNotFoundException

This exception is thrown when the 'Test case' or 'Test set' for a 'Test call' cannot be determined.

Base class: TestException

Message: The test '...' does not exist.

DependencyNotFoundException

This exception is thrown when the 'Dependency' for a 'Dependency reference' cannot be determined.

Base class: TestException

Message: The dependency '...' does not exist.

InconsistentDependenciesException

This exception is thrown when the 'Dependency' cannot be linearized due to inconsistent references.

Base class: TestException

Message: The 'Dependency' cannot be linearized due to inconsistent references.

RecursiveDependencyReferenceException

This exception is thrown when the 'Dependency' cannot be linearized due to recursive references.

Base class: TestException

Message: The 'Dependency' cannot be linearized due to recursive references.

ProcedureNotFoundException

This exception is thrown when the 'Procedure' for a 'Procedure call' cannot be determined.

Base class: TestException

Message: The procedure '...' does not exist.

StackOverflowException

This exception is thrown when the nesting of 'Procedure calls' gets too deep, hinting to a problem with endless recursion. See also the option Call stack size.

Base class: TestException

Message: Too many nested procedure calls.

UserException

This exception is thrown explicitly by a 'Throw' node.

Base class: TestException

Message: The 'Exception message' of the 'Throw' node.

CannotRethrowException

This exception is thrown when an attempt is made to rethrow an exception with a 'Rethrow' node but no exception was caught by a 'Catch' node.

Base class: TestException

Message: Rethrowing a caught exception can be done only from inside a Catch node.

ScriptException

This exception is thrown when the execution of a script from a 'Server script' or 'SUT script' fails.

Base class: TestException

Message: The script failed with the following message:...

AndroidSdkException

This is a base class. In order to test Android Applications, a valid Android SDK needs to be installed. In case QF-Test detects any problem with the Android SDK, an exception derived from this base class will be thrown.

Base class: TestException

InvalidAndroidSdkPathException

This exception will be thrown if the specified path does not point to a valid Android SDK installation.

Base class: AndroidSdkException

AndroidSdkNotFoundException

This exception will be thrown in case when QF-Test is unable to determine the Android SDK location.

Base class: AndroidSdkException

InvalidAndroidAdbPathException

This exception will be thrown in case a given ADB class path is invalid.

Base class: AndroidSdkException

Message: ... is not a valid ADB path. (Source: ..., Reason: ...)

AndroidAdbNotFoundException

This exception will be thrown when no Android Adb was found on the computer.

Base class: AndroidSdkException

Message: No Android ADB was found.

InvalidAndroidEmulatorPathException

This exception will be thrown in case a given Android emulator path is invalid.

Base class: AndroidSdkException

Message: ... is not a valid emulator path. (Source: ..., Reason: ...)

AndroidEmulatorNotFoundException

This exception will be thrown when no Android emulator was found on the computer.

Base class: AndroidSdkException

Message: No Android emulator was found.

AndroidVirtualDeviceException

This is a base class. In order to test Android Applications, a valid android emulator needs to be installed. The emulator can then run an android virtual device (AVD). If QF-Test is not able to find the android virtual device or if testing this device is not supported, an exception derived from this base class will be thrown.

Base class: TestException

NoAndroidVirtualDeviceException

An exception of this type will be thrown if no avd was found on which the tests may get executed.

Base class: AndroidVirtualDeviceException

NoSupportedAndroidVirtualDeviceException

An exception of this type will be thrown if no supported avd was found on which the tests may get executed.

Base class: AndroidVirtualDeviceException

AndroidVirtualDeviceNotFoundException

An exception of this type will be thrown if QF-Test was unable to find the specified avd.

Base class: AndroidVirtualDeviceException

AndroidVirtualDeviceNotSupportedException

An exception of this type will be thrown if QF-Test is not able to test the specified avd.

Base class: AndroidVirtualDeviceException

AndroidVirtualDeviceParsingException

An exception of this type will be thrown if QF-Test fails to parse the string specifying the android emulator to use.

Base class: AndroidVirtualDeviceException

BreakException

This is not a standard TestException and cannot be caught by a 'Catch' node. It is thrown by a 'Break' node in order to break out of a loop. From a script, raising a BreakException will have the same effect. If thrown outside of a loop, a BreakException will cause the error below.

Base class: TestException

Message: A Break was triggered outside a loop.

ReturnException

This is not a standard TestException and cannot be caught by a 'Catch' node. It is thrown by a 'Return' node in order to return from a 'Procedure'. From a script, raising a ReturnException will have the same effect. If thrown outside of a 'Procedure', a ReturnException will cause the error below.

Base class: TestException

Message: A Return was triggered outside a procedure.

TestOutOfMemoryException

This is a special exception that is thrown when QF-Test determines that it is running out of memory during test execution. The exception causes the test to abort immediately and cannot be caught because once QF-Test has run out of memory there is little it can do to handle it. QF-Test tries to keep a little reserve memory so it will at least try to save the run log.