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 50.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
-
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
-
DocumentNotLoadedException
-
This exception is a variant of
ComponentNotFoundException
and thrown specifically if a Wait for document to load node fails.Base class:
ComponentNotFoundException
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
InvisibleDnDTargetException
-
This exception is thrown when the location in the target component for a Mouse event of type
DRAG_FROM
,DRAG_OVER
orDROP_TO
for a Drag&Drop operation is invisible and cannot be made visible by scrolling the target component.Base class:
TestException
-
InvisibleTargetComponentException
-
This exception is thrown when the target component is invisible.
Base class:
ComponentNotFoundException
-
InvisibleTargetItemException
-
This exception is thrown if the surrounding target component is visible, but the target element in it is invisible.
Base class:
IndexNotFoundException
-
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
-
DownloadNotCompleteException
-
This exception is thrown, when waiting for a download that is not complete.
Base class:
ComponentNotFoundException
-
DownloadStillActiveException
-
This exception is thrown, when trying to download to a file that is still blocked by another download.
Base class:
ComponentNotFoundException
-
NoSuchDownloadException
-
This exception is thrown, when waiting for a download that was never started.
Base class:
ComponentNotFoundException
-
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
-
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
-
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
-
ReadOnlyPropertyException
-
9.0+ This exception is thrown when a script tried to set a value in a special group, which does not support changing the value (cf. Special groups).
Base class:
VariableException
-
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 namedy
to$(x)
and then try to expand the value$(x)
.Base class:
VariableException
-
UnboundVariableException
-
This exception is thrown when a variable for a value that is to be expanded doesn't exist.
Base class:
VariableException
-
VariableNumberException
-
This exception is thrown when a variable expansion for a numeric attributes results in something other than a number.
Base class:
VariableException
-
BadExpressionException
-
This exception is thrown when evaluating a $[...] expression fails (see section 11.2).
Base class:
ScriptException
-
BadTestException
-
This exception is thrown when evaluating the Condition of an If or Elseif node fails.
Base class:
ScriptException
-
BadRegexpException
-
This exception is thrown whenever converting a String to a regular expression (see section 49.3) fails, e.g. for Item or Check text nodes.
Base class:
TestException
-
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
-
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
-
InvalidDirectoryException
-
This exception is thrown when the Directory attribute of a Start SUT client node refers to a non-existent directory.
Base class:
TestException
-
CheckFailedException
-
This exception is thrown when a check node with activated Throw exception on failure attribute fails.
Base class:
TestException
-
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
-
OperationNotSupportedException
-
This exception is thrown when an operation like Fetch text is not supported for the designated target component.
Base class:
TestException
-
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
-
IndexFormatException
-
This exception is thrown when an invalid index format for a sub-item is encountered (see subsection 5.9.1).
Base class:
TestException
-
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
-
IndexNotFoundException
-
This exception is thrown when no sub-item can be located for a given index.
Base class:
ComponentNotFoundException
-
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
-
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
-
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
-
CannotAttachException
-
This exception is thrown when attaching to a Windows application failed.
Base class:
TestException
-
ConnectionFailureException
-
This exception is thrown when the connection to a client failed.
Base class:
TestException
-
NoSuchClientException
-
This exception is thrown when the target client for an operation does not exist.
Base class:
TestException
-
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
-
DuplicateClientException
-
This exception is thrown if an attempt is made to run more than one client simultaneously under the same name.
Base class:
TestException
-
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
-
ExtensionException
-
This exception is thrown when a client throws an unexpected exception.
Base class:
TestException
-
ClientNotTerminatedException
-
This exception is thrown when a Wait for process to terminate node is executed and the process doesn't terminate.
Base class:
TestException
-
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
-
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
-
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
-
UnresolvedComponentIdException
-
This exception is thrown when the target of the QF-Test component ID attribute of a node cannot be determined.
Base class:
TestException
-
TestNotFoundException
-
This exception is thrown when the Test case or Test set for a Test call cannot be determined.
Base class:
TestException
-
DependencyNotFoundException
-
This exception is thrown when the Dependency for a Dependency reference cannot be determined.
Base class:
TestException
-
InconsistentDependenciesException
-
This exception is thrown when the Dependency cannot be linearized due to inconsistent references.
Base class:
TestException
-
RecursiveDependencyReferenceException
-
This exception is thrown when the Dependency cannot be linearized due to recursive references.
Base class:
TestException
-
ProcedureNotFoundException
-
This exception is thrown when the Procedure for a Procedure call cannot be determined.
Base class:
TestException
-
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
-
ValueCastException
-
This exception is thrown when the value in a Set variable oder Return step cannot be converted into the specified object type-
Base class:
TestException
-
UserException
-
This exception is thrown explicitly by a Throw node.
Base class:
TestException
-
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
-
ScriptException
-
This exception is thrown when the execution of a script from a Server script or SUT script fails.
Base class:
TestException
-
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
-
AndroidAdbNotFoundException
-
This exception will be thrown when no Android Adb was found on the computer.
Base class:
AndroidSdkException
-
InvalidAndroidEmulatorPathException
-
This exception will be thrown in case a given Android emulator path is invalid.
Base class:
AndroidSdkException
-
AndroidEmulatorNotFoundException
-
This exception will be thrown when no Android emulator was found on the computer.
Base class:
AndroidSdkException
-
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, aBreakException
will cause the error below.Base class:
TestException
-
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, aReturnException
will cause the error below.Base class:
TestException
-
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.