Switch To
|
Input tab
-
Window Id: Choose the
window to switch to.
If you're switching to a window that opens from
the currently selected window, you can usually
choose the new window according to its
relationship to the currently selected window.
However, if you're switching to a previously
selected window, or if you're trying to navigate
among a few windows, selecting a variable is
usually less error prone.
-
Choose the new window according to its
relationship to the currently selected window.
-
NEW: Switch to the window that opened
most recently.
If the robot is already working in
the window that opened most recently, an error
occurs when the robot runs.
-
MAIN: Switch to the window
that opened the currently selected window.
For instance, you might return to
the main application window or a window that the
main window launched.
-
CURRENT: Don't switch to another window.
Instead, remain in the current window.
-
Select the variable that defines the handle of
the window to switch to.
When you define a Window action that uses the
Switch To operation, the Output tab lets you
specify a variable that holds the window handle
for the currently selected window. For example,
when you switch from the main window to its first
popup, create a variable named
mainWindowHandle , and choose this
variable on the Output tab. Whenever you need to
return to this window, you can specify this
variable as the Window Id for the Switch To
operation.
-
Select within the
Window Id field, and select
Variables
.
The Variables panel appears.
-
If the variable to use doesn't
exist yet, create it. See Create a Variable.
-
From the Available
variables list, select a variable, and
drag it to the field.
-
Timeout (seconds): Enter
the maximum amount of time to wait for the new
window to appear. When a robot instance runs, the
action completes as soon as the window appears. If
the time elapses before the window appears, the
robot instance fails.
-
Full page screenshot after this
action: Select this option if you want
to capture a screenshot after the robot opens the
window.
Output and Post Validate tabs
-
Save to: Select the
variable in which to store the current window's
handle. You can create the variable now.
For example, when you switch from the main window
to its first popup, create a variable named
mainWindowHandle , and choose this
variable in the Save to
field. Whenever you need to return to this window,
you can select this variable as the Window Id for
the Switch To operation.
-
Select within the Save
to field, and select
Variables
.
The Variables panel appears.
-
If the string variable to use
doesn't exist yet, create it. See Create a Variable.
-
From the Available
variables list, select a string
variable, and drag it to the field.
-
Page state: Specify
whether to complete any validation before and
after the action. See Add Validation to a Robot Action.
|