Open topic with navigation
Simulates an action on a Web page.
true on success, otherwise false.
A test object method should report on the completion status of the operation. There are number of symbolic constants you can use to report execution status in your operations functions. They are:
micPass (0) - Causes the status of this step to be passed and sends the specified message to the run results. Use this code only if your method actually checks that the action succeeded at the application level. Normally, this code is used only by UFT.
micFail (1) - Causes the status of this step to be failed and sends the specified message to the run results. When this step runs, the test or component fails. Use this code to indicate that the method failed to run as expected.
micDone (2) - Sends a message to the run results without affecting the pass/fail status of the test or component. Use this code to indicate that the method ran to completion. This is the most common code to use in a test object function.
micWarning(3) - Sends a warning message to the run results, but does not cause the test or component to stop running, and does not affect the pass/fail status of the test or component.
_util.Report(micDone, "Set", toSafeArray(new Array(state));
This example sets the text in a text field.
// When clearing the text in the text area we get NULL or empty string.
// Converting both to empty string.
_elem.innerHTML = text != null? text: "";