SikuliXRobotLibrary
Library version: | 1.0.0 |
---|---|
Library scope: | global |
Named arguments: | supported |
Introduction
SikuliXRobotLibrary is a gui recognition
testing library for Robot Framework that leverages the SikuliX version 1.1.0
methods to control matching PSMRL
(pattern, string, match, region or location). See http://sikulix-2014.readthedocs.org/en/latest/index.html for more information on SikuliX. It should work in most modern OS.
Before running tests
The following must be installed:
Java | # Version 6, 7 or 8 (preferably 7, version 6 is deprecated) |
Jython | # Version 2.7.0 |
robotframework | # Installed via jython setup.py install (jybot must be setup in the environment variable) |
SikuliX v1.1.0 | # The sikuli script (sikulixapi.jar) must be installed together with the Tesseract based OCR features in order to read texts on screen. The Settings.OcrTextSearch and Settings.OcrTextRead must be set to True. see http://sikulix-2014.readthedocs.org/en/latest/) |
Set the Environment Variables The following must be included in the environment variables:
CLASSPATH = <sikulixapi.jar’s directory> | # Must be setup in the environment variable in the test PC or Node |
JYTHONPATH = <sikulixapi.jar’s directory>/Lib | # Must be setup in the environment variable in the test PC or Node |
Installing the SikuliXRobotLibrary
1. Copy the SikuliXRobotLibrary to a local directory. |
2. cd to the SikuliXRobotLibrary where setup.py is located |
3. Open a terminal or command prompt then install via jython setup.py install . |
Verify Installation
Once you have installed SikuliXRobotLibrary it is a good idea to verify the installation. To verify installation start jython and then at the Jython prompt type:
>>> import SikuliXRobotLibrary >>>
If the jython command line interpreter returns with another prompt (‘>>>’ as shown above) then your installation was successful.
Locating or specifying elements
All keywords in SikuliXRobotLibrary that need to find a pattern
or any of the PSMRL on the screen take an argument that serves as the locator (for more information about PSMRL
, see http://sikulix-2014.readthedocs.org/en/latest/) . locator is a string that describes how to locate an element using a syntax specifying a pattern to search for in a screen, which is a representation of the element.
PNG format must be used for reference patterns for better image resolution and better image detection.
Using locators By default, when a locator
value is provided, it is checked if a png with image sensitivity otherwise, it is treated as a string. When a locator is a string, the OCR
(Optical Character Recognition) setting must be set to True.
For example:
Keywords | Locators or PSMRL | Description |
Click Pattern | pattern.png = 0.90 | # Locator is a PNG image format with image sensitivity set to 0.90 |
Click Pattern | pattern.png | # Locator is a PNG image format with image sensitivity set to the default value 0.70. |
Click Pattern | Password | # Locator as a string or non-PNG images are matched against any string or image on screen. |
Importing
Arguments | Documentation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
sikulix_timeout=10.0, sikulix_scanrate=3.0,screenshot_directory=None, target_screen=Screen 0,run_on_failure=Capture Screenshot Of Active App | SikuliXRobotLibrary can be imported with optional arguments.
sikulix_timeout is the default timeout used to wait for all waiting actions. Default sikulix_timeout value is 3 seconds. It can be later set with Set SikuliX Timeout. sikulix_scanrate is the default search rate for the given Visual rate times per second until pattern is found or the timeout is reached. Default sikulix_scanrate value is 3. It can be later set with Set SikuliX Scanrate. target_screen is the default screen for multi-monitor environments. For more information on multi-monitor environments, see https://sikulix-2014.readthedocs.org/en/latest/screen.html run_on_failure specifies the name of a keyword (from any available libraries) to execute when a SikuliXRobotLibrary keyword fails. By default Capture Screenshot Of Active App will be used to take a screenshot of the Active application in focus. Using the value “Nothing” will disable this feature altogether. See Register Keyword To Run On Failure keyword for more information about this functionality. screenshot_root_directory specifies the default root directory that screenshots should be stored in. If not provided the default directory will be where robotframework places its logfile. Examples:
|
Shortcuts
Keywords
Keyword | Arguments | Documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
App Get Name | app_name | Returns the application’s short name as show in the process list.
See also App Has Window, App Get Process ID and App Get Window. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
App Get Process ID | app_name | Returns the application’s process ID as number if app is running, -1 otherwise.
See also App Has Window, App Get Name and App Get Window. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
App Get Window | app_name | Returns the title of the frontmost window of the application as specified in app_name, might be an empty string
See also App Has Window, App Get Process ID and App Get Name. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
App Has Window | app_name | Returns True if application’s window or dialog as specified in app_name is open, else, returns False.
See also App Get Process ID, App Get Name and App Get Window. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Application Is Running | app_name | Returns True if application as specified in app_name is running, else, returns False.
See also Check And Open Application, Close Application, and Open Application. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assert Pattern Is Not Visible In Active App | pattern | Assert that pattern is not visible in active app. See introduction for details about locating elements.
Note this keyword automatically searches on region of the app in focus and may be paired with the keyword Set Application Focus. See also Assert Pattern Is Not Visible In Active App, Assert Pattern Is Not Visible In Region, and Assert Pattern Is Visible In Region. Example:
# Asserts that pattern is visible in the new search region in active app as defined by offset values. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assert Pattern Is Not Visible In Region | pattern | Assert that pattern is not visible in search region. See introduction for details about locating elements.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Assert Pattern Is Not Visible In Active App, Assert Pattern Is Visible In Active App and Assert Pattern Is Visible In Region. Example 1:
# Asserts that pattern is visible in the new search region in active app as defined by offset values. Example 2:
# Asserts that pattern is visible in the new search region in active screen as defined by offset values. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assert Pattern Is Visible In Active App | pattern | Assert that pattern is visible in search region See introduction for details about locating elements.
Note this keyword automatically searches on region of the app in focus and may be paired with the keyword Set Application Focus. See also Assert Pattern Is Not Visible In Active App, Assert Pattern Is Not Visible In Region, and Assert Pattern Is Visible In Region. Example:
# Asserts that pattern is visible in the new search region in active app as defined by offset values. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assert Pattern Is Visible In Region | pattern | Assert that pattern is visible in search region See introduction for details about locating elements.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Assert Pattern Is Not Visible In Active App, Assert Pattern Is Not Visible In Region, and Assert Pattern Is Visible In Active App. Example 1:
# Asserts that pattern is visible in the new search region in active app as defined by offset values. Example 2:
# Asserts that pattern is visible in the new search region in active screen as defined by offset values. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Capture Screenshot | target,filename=sikuli-screenshot-{index}.png | Takes a screenshot of the target application, screen or pattern and embeds it into the log.
If The {index} is replaced with the actual index by using Python’s str.format method, and it can be formatted using the standard format string syntax. The example 3 shows this by setting the width and the fill character. If there is a need to write literal {index} or if Example 1:
Example 2:
Example 3:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Capture Screenshot Of Active App | Takes a screenshot of the application in focus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check And Open Application | path, app_name | Checks if application is running and sets the focus to the application, otherwise, opens application matching the given app_name and path .
Example:
See also Close Application, Open Application, and Application Is Running |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click Nth Pattern In Active App | pattern,pattern_index | Perform a mouse click on the click point using the left button.
Click point is at the center of the nth element identified by Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click Pattern | pattern | Perform a mouse click on the click point using the left button. Click point is at the center of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click Pattern At Coordinates | pattern, xoffset,yoffset | Perform a mouse click on the click point using the left button. Click point is at x/y coordinates of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click Region | Left-clicks the center x,y coordinate of a specified ROI or search region.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Double Click Region, Right Click Region, Get Text In Search Region and Highlight Region. Example:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Close Application | app_name | Checks if the application matching the given app_name is running then closes it.
See also Check And Open Application, Open Application and Application Is Running |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Confirm Env OS | env_OS | Returns True or False based on the env_OS version where the script is executed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Double Click Nth Pattern In Active App | pattern,pattern_index | Perform a mouse double-click on the click point using the left button.
Click point is at the center of the nth element identified by Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Double Click Pattern | pattern | Perform a mouse double-click on the click point using the left button. Click point is at the center of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Double Click Pattern At Coordinates | pattern, xoffset,yoffset | Perform a mouse double-click on the click point using the left button. Click point is at x/y coordinates of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Double Click Region | Double-clicks the center x,y coordinate of a specified ROI or search region.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Click Region, Right Click Region, Get Text In Search Region and Highlight Region. Example:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag And Drop Element | pattern1, pattern2 | Drag and drop an element identified by pattern1 to another element identified by pattern2 .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag And Drop From Nth Pattern | pattern1,pattern1_index,pattern2,pattern2_index | Drag and drop an nth element identified by pattern1 to another nth element identified by pattern2 .
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag Nth Pattern In Active App | pattern,pattern_index | Drag the nth element identified by pattern . Drag Nth Pattern In Active App and Drop At Nth Pattern In Active App keywords must be used in pairs to complete a drag and drop action.
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag Pattern | pattern | Drag Pattern and Drop At Pattern keywords must be used in pairs to complete a drag and drop action.
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag Pattern In Coordinates | pattern, xoffset,yoffset | Drag element at x/y coordinates of the element identified by pattern . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drop At Nth Pattern In Active App | pattern,pattern_index | Drop at the nth element identified by pattern . Drag Nth Pattern In Active App and Drop At Nth Pattern In Active App keywords must be used in pairs to complete a drag and drop action.
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drop At Pattern | pattern | Drag Pattern and Drop At Pattern keywords must be used in pairs to complete a drag and drop action.
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drop Pattern At Coordinates | pattern, xoffset,yoffset | Drop or release mouse button element at x/y coordinates of the element identified by pattern . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Active App Coordinates | Returns the coordinates of the application in focus. Keyword must be combined with Set Application Focus.
Examples:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Active App Region | Returns the region of the application in focus. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Active Screen Coordinates | target_screen | Returns the coordinates of the screen as specified in target_screen. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Active Screen Region | Returns the region of the active screen. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Application Coordinates | app_name | Returns the coordinates of the application in focus. Keyword must be combined with Set Application Focus.
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Application Region | app_name | Returns the region of the application as specified in app_name. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Env OS | Returns the Operating System type of test pc. Example of Operating System types: WINDOWS, MAC, LINUX |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Env OS Type And Version | Returns the Operating System type and version of test pc. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Env OS Version | Returns the Operating System version of test pc. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Pattern Count In Active App | pattern | Returns the count of elements identified by pattern in the region of an active application.
Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Reference Pattern Coordinates | pattern | Returns the coordinates of the element identified by pattern .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Reference Pattern Region | pattern | Returns the region of the element identified by pattern. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Text In Nth Pattern | pattern,pattern_index,search_location | Return the text in nth element identified by pattern .
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Text In Pattern | pattern,search_location | Returns the text in an area at a spatial location in reference to an element identified by pattern
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Text In Search Region | search_location | Returns the text from a specified search location .
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Click Region, Double Click Region, Right Click Region, and Highlight Region. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Highlight Nth Pattern In Active App | pattern,pattern_index,highlight_duration | Highlights the nth element identified by pattern for a specified highlight_duration in seconds.
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Example:
# Highlights the sixth instance of an element identified by pattern.png for 2 seconds. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Highlight Pattern | pattern,highlight_duration | Highlight element identified by pattern for a specified highlight_duration in seconds.
Key attributes for arbitrary Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Highlight Region | highlight_duration | Highlights the specified ROI or search region for a specified highlight_duration in seconds.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Click Region, Double Click Region, Right Click Region and Get Text In Search Region. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hover At Nth Pattern In Active App | pattern,pattern_index | Hovers mouse pointer at the center the nth element identified by pattern .
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hover At Pattern | pattern | Hover mouse pointer at center of element identified by pattern .
Key attributes for arbitrary |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hover At Pattern At Coordinates | pattern, xoffset,yoffset | Hover mouse pointer at x/y coordinates of the element identified by pattern .
Key attributes for arbitrary |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mouse Button Down | mouse_button | Press the left mouse button down. Must be paired with Mouse Button Up keyword. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mouse Button Up | mouse_button | Release the mouse button previously pressed. Must be paired with Mouse Button Down keyword. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Move Mouse At Coordinates | xoffset, yoffset | Move mouse cursor coordinates at x/y coordinates of the screen. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Open Application | application_path | opens the application matching the given application_path .
See also Check And Open Application, Close Application and Application Is Running |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paste String | string_param | Pastes a string as specified by srtring_param
See also Type String. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paste Text In Nth Pattern In Active App | pattern,pattern_index, text | Paste a text at x/y coordinates of the element identified by pattern .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paste Text In Pattern | pattern, text | Paste a text in element identified by pattern .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paste Text In Pattern At Coordinates | pattern, text,xoffset, yoffset | Paste a text at x/y coordinates of the element identified by pattern . Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Press Key N Times | keyboard_key, count | Simulates pressing a key multiple times as specified by count value
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Press Keyboard Key | keyboard_keys | Simulates pressing keyboard keys. Single key; 2-key combination example: Ctrl + Shift; 3-key combination example: Ctrl + Shift + Delete
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Register Keyword To Run On Failure | keyword | Sets the keyword to execute when a Selenium2Library keyword fails.
keyword is the name of a keyword (from any available libraries) that will be executed if a Selenium2Library keyword fails. It is not possible to use a keyword that requires arguments. Using the value “Nothing” will disable this feature altogether. The initial keyword to use is set in importing, and the keyword that is used by default is Capture Page Screenshot. Taking a screenshot when something failed is a very useful feature, but notice that it can slow down the execution. This keyword returns the name of the previously registered failure keyword. It can be used to restore the original value later. Example:
This run-on-failure functionality only works when running tests on Python/Jython 2.4 or newer and it does not work on IronPython at all. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Right Click Nth Pattern In Active App | pattern,pattern_index | Perform a mouse click on the click point using the right button.
Click point is at the center of the nth element identified by Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Right Click Pattern | pattern | Perform a mouse click on the click point using the right button. Click point is at the center of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Right Click Pattern At Coordinates | pattern, xoffset,yoffset | Perform a mouse click on the click point using the right button. Click point is at x/y coordinates of the element identified by pattern .
Key attributes for arbitrary patterns are images which is advisably in PNG format or strings. See introduction for details about locating elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Right Click Region | Right-clicks the center x,y coordinate of a specified ROI or search region.
This keyword must be paired with any of the following keywords: Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen or Set New Search Region In Application. See also Click Region, Double Click Region, Get Text In Search Region and Highlight Region. Example:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Run Command | command | Runs a command, script or application path as specified in command.
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Scroll From Pattern | pattern, scroll | Scroll up or down as specified by the scroll step at center of the element identified by pattern . Key attributes for arbitrary patterns are images which is advisably in PNG format orstrings. See introduction for details about locating elements.
Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Scroll From Pattern At Coordinates | pattern, scroll,xoffset, yoffset | Scroll up or down as specified by the scroll step at x/y coordinates of the element identified by pattern .
Key attributes for arbitrary Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Scroll X Steps | scroll | Scroll up or down as specified by the scroll step.
This keyword must be paired with Hover At Pattern in order to execute scrolling action within the region. Examples:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Application Focus | app_name | Sets focus to the open application matching the given app_name .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Image Library | path | Set the default image library path where all image references will be accessed. This must be used during setup in order to set the image library before the test cases are executed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set New Search Region In Active App | offsets | Sets new ROI or the search area to a specified offsets based on original coordinate values of active application in focus.
See also Set Search Region To Target Screen, Set Search Region To Active App, Set Search Region To Application, Set New Search Region In Target Screen. Example:
# Offsets x, y, height, width to 10, 60, -20, -270 pixels respectively. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set New Search Region In Application | app_name, offsets | Sets new ROI or the search area to a specified offsets based on original coordinate values of application as specified in app_name.
See also Set Search Region To Target Screen, Set Search Region To Active App, Set Search Region To Application, and Set New Search Region In Target Screen. Example:
# Offsets x, y, height, width to 10, 60, -20, -270 pixels respectively. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set New Search Region In Target Screen | offsets,target_screen | Sets new ROI or new search area to a specified offsets based on original coordinate values of target screen.
See also Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set Search Region To Active App and Set New Search Region In Application. Example:
# Offsets x, y, height, width of the Primary Monitor to 10, 60, -20, -270 pixels respectively. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Screenshot Directory | path, persist=False | Sets the root output directory for captured screenshots.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Search Region To Active App | Sets the ROI or the search area to the application in focus. Searching for pattern match is faster if the search region is smaller.
Example:
See also Set Search Region To Target Screen, Set New Search Region In Active App, Set Search Region To Application, Set New Search Region In Target Screen and Set New Search Region In Application. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Search Region To Application | app_name | Sets the ROI or the search area to the application as specified in app_name. Searching for pattern match is faster if the search region is smaller.
Example:
See also Set Search Region To Target Screen, Set New Search Region In Active App, Set New Search Region In Target Screen and Set New Search Region In Application. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Search Region To Target Screen | target_screen | Sets the ROI or the search area to a specified target_screen . Searching for pattern match is faster if the search region is smaller.
For more information on multi-monitor environment, see https://sikulix-2014.readthedocs.org/en/latest/screen.html See also Set Search Region To Active App, Set New Search Region In Active App, Set Search Region To Application Set New Search Region In Target Screen, and Set New Search Region In Application. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Sikulix Scanrate | scanrate | Sets the sikulix scanrate value.
See introduction for details about sikulix_scanrate. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set Sikulix Timeout | timeout | Sets the sikulix timeout value.
See introduction for details about sikulix_timeout. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Switch Application Focus | app_name | Switches focus to the open application matching the given app_name .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type String | string_param | Types a string as specified by srtring_param
See also Paste String. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type Text In Nth Pattern In Active App | pattern,pattern_index, text | Type a text in nth element identified by pattern .
This Keyword is useful when multiple patterns on screen is present. Search region or setROI() value is set to the application in focus as default. Pattern sensitivity must be set at max level (0.99) in order to avoid false positives during image detections. Search for matching patterns is set to top > down > left > right. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type Text In Pattern | pattern, text | Type a text in element identified by pattern .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type Text In Pattern At Coordinates | pattern, text,xoffset, yoffset | Paste a text at x/y coordinates of the element identified by pattern .
Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wait For Pattern To Be Visible | pattern | Waits until pattern appears on application in focus. Fails if pattern is not immediately visible on application in focus. SikuliX’s default timeout is 3 seconds.
See also Wait In Seconds, Wait Until Pattern Is Visible, Wait For Pattern To Vanish and Wait Until Pattern Vanish. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wait For Pattern To Vanish | pattern | Waits until pattern disappears on application in focus. Fails if pattern is not immediately hidden on application in focus. SikuliX’s default timeout is 3 seconds.
See also Wait In Seconds, Wait For Pattern To Be Visible, Wait Until Pattern Is Visible, and Wait Until Pattern Vanish. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wait In Seconds | timeout | Waits until timeout expires.
See also Wait For Pattern To Be Visible, Wait Until Pattern Is Visible, Wait For Pattern To Vanish and Wait Until Pattern Vanish. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wait Until Pattern Is Visible | pattern, timeout | Waits until pattern appears on application in focus at specified timeout .
Using Otherwise, Fails if See also Wait In Seconds, Wait For Pattern To Be Visible, Wait For Pattern To Vanish and Wait Until Pattern Vanish. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wait Until Pattern Vanish | pattern, timeout | Waits until pattern disappears on application in focus at specified timeout .
Using Otherwise, Fails if See also Wait In Seconds, Wait For Pattern To Be Visible Wait For Pattern To Be Visible, Wait For Pattern To Vanish. |