Boot Time In Seconds From Epoch
Get machine boot time
return: | boot time in seconds from Epoch |
---|
Examples
${epoch} Boot Time In Seconds From Epoch
Calculate Rectangle Center
Calculate x and y center coordinates from rectangle.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
rectangle | Any | null | element rectangle coordinates |
param rectangle: | |
---|---|
element rectangle coordinates | |
return: | x and y coordinates of rectangle center |
Examples
Open Using Run Dialog calc Calculator
&{rect}= Get Element Rectangle CalculatorResults
${x} ${y}= Calculate Rectangle Center ${rect}
Click Type
Mouse click on coordinates x and y.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
x | int, None | None | horizontal coordinate for click, defaults to None |
y | int, None | None | vertical coordinate for click, defaults to None |
click_type | str | click | "click", "right" or "double", defaults to "click" |
Default click type is click meaning left
param x: | horizontal coordinate for click, defaults to None |
---|---|
param y: | vertical coordinate for click, defaults to None |
param click_type: | |
"click", "right" or "double", defaults to "click" | |
raises ValueError: | |
if coordinates are not valid |
Examples
Click Type x=450 y=100
Click Type x=450 y=100 click_type=right
Click Type x=450 y=100 click_type=double
Close All Applications
Close all applications
Examples
Open Application Excel
Open Application Word
Open Executable notepad.exe Untitled - Notepad
Close All Applications
Connect By Handle
Connect to application by its handle
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
handle | int | null | handle of the application |
windowtitle | str, None | None | name of the window, defaults to active window if None |
existing_app | bool | False | set True if selecting window which library has already accessed, default False |
parse_elements | bool | True | set False to not to parse elements of the window, default True |
param handle: | handle of the application |
---|---|
param windowtitle: | |
name of the window, defaults to active window if None | |
param existing_app: | |
set True if selecting window which library has already accessed, default False | |
param parse_elements: | |
set False to not to parse elements of the window, default True |
Examples
${appid} Connect By Handle 88112
Connect By Pid
Connect to application by its pid
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
app_pid | str | null | process id of the application |
windowtitle | str, None | None | name of the window, defaults to active window if None |
param app_pid: | process id of the application |
---|---|
param windowtitle: | |
name of the window, defaults to active window if None |
Examples
${appid} Connect By PID 3231
Drag And Drop
Drag elements from source and drop them on target.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
src | Any | null | application object or instance id |
target | Any | null | application object or instance id |
src_locator | str | null | elements to move |
target_locator | str, None | None | |
handle_ctrl_key | bool | False | True if keyword should press CTRL down dragging |
drop_delay | float | 2.0 | how many seconds to wait until releasing mouse drop, default 2.0 |
origin | str | middle |
Please note that if CTRL is not pressed down during drag and drop then operation is MOVE operation, on CTRL down the operation is COPY operation.
There will be also overwrite notification if dropping over existing files.
param src: | application object or instance id |
---|---|
param target: | application object or instance id |
param src_locator: | |
elements to move | |
param handle_ctrl_key: | |
True if keyword should press CTRL down dragging | |
param drop_delay: | |
how many seconds to wait until releasing mouse drop, default 2.0 | |
raises ValueError: | |
on validation errors |
Examples
${app1}= Open Using Run Dialog explorer.exe{VK_SPACE}C:\workfiles\movethese movethese
${app2}= Open Using Run Dialog wordpad.exe Document - WordPad
Drag And Drop ${app1} ${app2} regexp:testfile_\d.txt name:Rich Text Window handle_ctrl_key=${True}
Drag And Drop ${app1} ${app1} regexp:testfile_\d.txt name:subdir handle_ctrl_key=${True}
Find Element
Find element from window by locator and criteria.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | name of the locator |
search_criteria | str, None | None | criteria by which element is matched |
param locator: | name of the locator |
---|---|
param search_criteria: | |
criteria by which element is matched | |
return: | list of matching elements and locators that were found on the window |
Examples
@{elements} Find Element CalculatorResults
Log Many ${elements[0]} # list of matching elements
Log Many ${elements[1]} # list of all available locators
Get App
Get application object by id
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
app_id | int, None | None | id of the application to get, defaults to None |
By default returns active_application application object.
param app_id: | id of the application to get, defaults to None |
---|---|
return: | application object |
Examples
${app1} Open Application Excel
&{appdetails} Get App ${app1}
Get Boot Time
Get computer boot time in seconds from Epoch or in datetime string.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
as_datetime | bool | False | if True returns datetime string, otherwise seconds, defaults to False |
datetime_format | str | %Y-%m-%d %H:%M:%S | datetime string format, defaults to "%Y-%m-%d %H:%M:%S" |
param as_datetime: | |
---|---|
if True returns datetime string, otherwise seconds, defaults to False | |
param datetime_format: | |
datetime string format, defaults to "%Y-%m-%d %H:%M:%S" | |
return: | seconds from Epoch or datetime string |
Examples
${boottime} Get Boot Time
${boottime} Get Boot Time as_datetime=True
${boottime} Get Boot Time as_datetime=True datetime_format=%d.%m.%Y
Get Dialog Rectangle
Get dialog rectangle coordinates
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
ctrl | Any, None | None | name of the window control object, defaults to None |
as_dict | bool | False |
If ctrl is None then get coordinates from dialog
param ctrl: | name of the window control object, defaults to None |
---|---|
return: | coordinates: left, top, right, bottom |
Examples
${left} ${top} ${right} ${bottom}= Get Dialog Rectangle
&{coords} Get Dialog Rectangle as_dict=True
Log top=${coords.top} left=${coords.left}
Get Element
Get element by locator.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | name of the locator |
screenshot | bool | False | takes element screenshot if True, defaults to False |
open_dialog | bool | True | True if dialog should be reopened, default to True |
param locator: | name of the locator |
---|---|
param screenshot: | |
takes element screenshot if True, defaults to False | |
param open_dialog: | |
True if dialog should be reopened, default to True | |
return: | element if element was identified, else False |
Examples
${element} Get Element CalculatorResults
${element} Get Element Result screenshot=True
Get Element Center
Get element center coordinates
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
element | dict | null | dictionary of element items |
param element: | dictionary of element items |
---|---|
return: | coordinates, x and y |
Examples
@{element} Find Element CalculatorResults
${x} ${y}= Get Element Center ${elements[0][0]}
Get Element Rectangle
Get value of element rectangle attribute.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
as_dict | bool | False | return values in a dictionary, default False |
param locator: | element locator |
---|---|
param as_dict: | return values in a dictionary, default False |
return: | (left, top, right, bottom) values if found, else False |
Examples
${left} ${top} ${right} ${bottom}= Get Element Rectangle CalculatorResults
&{coords} Get Element Rectangle CalculatorResults as_dict=True
Log top=${coords.top} left=${coords.left}
Get Element Rich Text
Get value of element rich text attribute.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
param locator: | element locator |
---|---|
return: | rich_text value if found, else False |
Examples
${text} Get Element Rich Text CalculatorResults
Get Machine Name
Get machine name
return: | machine name as string |
---|
Examples
${machine} Get Machine Name
Get Memory Stats
Get computer memory stats and return those in bytes or in humanized memory format.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
humanized | bool | True | if False returns memory information in bytes, defaults to True |
param humanized: | |
---|---|
if False returns memory information in bytes, defaults to True | |
return: | memory information in dictionary format |
Examples
&{mem} Get Memory Stats
&{mem} Get Memory Stats humanized=False
Get Open Applications
Get list of all open applications
Returns a dictionary
Examples
${app1} Open Application Excel
${app2} Open Executable calc.exe Calculator
${app3} Open File /path/to/myfile.txt
&{apps} Get Open Applications
Get Spaced String
Replace spaces in a text with pywinauto.keyboard space characters {VK_SPACE}
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
text | null | replace spaces in this string |
param text: | replace spaces in this string |
---|
Examples
${txt} Get Spaced String My name is Bond
# ${txt} = My{VK_SPACE}name{VK_SPACE}is{VK_SPACE}Bond
Send Keys To Input ${txt}
Get Text
Get text from element
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
param locator: | element locator |
---|
Examples
Open Using Run Dialog calc Calculator
Type Into CalculatorResults 11
Type Into CalculatorResults 55
&{val} Get Text CalculatorResults
Get Username
Get username of logged in user
return: | username as string |
---|
Examples
${user} Get Username
Get Window Elements
Get element information about all window dialog controls and their descendants.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
screenshot | bool | False | save element screenshot if True, defaults to False |
element_json | bool | False | save element json if True, defaults to False |
outline | bool | False | highlight elements if True, defaults to False |
param screenshot: | |
---|---|
save element screenshot if True, defaults to False | |
param element_json: | |
save element json if True, defaults to False | |
param outline: | highlight elements if True, defaults to False |
return: | all controls and all elements |
Examples
@{elements} Get Window Elements
Log Many ${elements[0]} # list of all available locators
Log Many ${elements[1]} # list of matching elements
@{elements} Get Window Elements screenshot=True element_json=True outline=True
Get Window List
Get list of open windows
Window dictionaries contain:
- automation_id
- control_id
- title
- pid
- handle
- is_active
- keyboard_focus
- rectangle
return: | list of window dictionaries |
---|
Examples
@{windows} Get Window List
FOR ${window} IN @{windows}
Log Many ${window}
END
Is Element Enabled
Is element enabled.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
param locator: | element locator |
---|---|
return: | True if enabled, else False |
Examples
${res}= Is Element Enabled CalculatorResults
Is Element Matching
Is element matching. Check if locator is found in any field or criteria field in the window items.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
itemdict | dict | null | |
locator | str | null | name of the locator |
criteria | str | null | criteria on which to match element |
wildcard | bool | False | whether to do reg exp match or not, default False |
param itemDict: | dictionary of element items |
---|---|
param locator: | name of the locator |
param criteria: | criteria on which to match element |
param wildcard: | whether to do reg exp match or not, default False |
return: | True if element is matching locator and criteria, False if not |
Is Element Visible
Is element visible.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
param locator: | element locator |
---|---|
return: | True if visible, else False |
Examples
${res}= Is Element Visible CalculatorResults
Kill Process
Kill process by name
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
process_name | str | null | name of the process |
param process_name: | |
---|---|
name of the process | |
return: | True if succeeds False if not |
Examples
${process} Process Exists calc strict=False
${status} Kill Process ${process.name()}
Kill Process By Pid
Kill process by pid
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
pid | int | null | process identifier |
param pid: | process identifier |
---|
Examples
${process} Process Exists calc strict=False
${status} Kill Process By PID ${process.pid}
Lock Screen
Put windows into lock mode
Examples
Lock Screen
Log In
Log into Windows domain with username and password.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
username | str | null | name of the user |
password | str | null | password of the user |
domain | str | . | windows domain for the user, defaults to "." |
param username: | name of the user |
---|---|
param password: | password of the user |
param domain: | windows domain for the user, defaults to "." |
return: | handle |
Examples
Log In username=myname password=mypassword domain=company
Minimize Dialog
Minimize window by its title
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
windowtitle | str, None | None | name of the window, default None means that active window is going to be minimized |
param windowtitle: | |
---|---|
name of the window, default None means that active window is going to be minimized |
Examples
Open Using Run Dialog calc Calculator
Open Using Run Dialog notepad Untitled - Notepad
Minimize Dialog # Current window (Notepad)
Minimize Dialog Calculator
Mouse Click
Mouse click locator, coordinates, or image
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str, None | None | element locator on active window |
x | int | 0 | coordinate x on desktop |
y | int | 0 | coordinate y on desktop |
off_x | int | 0 | offset x (used for locator and image clicks) |
off_y | int | 0 | offset y (used for locator and image clicks) |
image | str, None | None | image to click on desktop |
method | str | locator | one of the available methods to mouse click, default "locator" |
ctype | str | click | type of mouse click |
focus | str | center | default point for element click is 'center', can be set to 'topleft' to click top left corner of the element |
tolerance | int, None | None | image matching tolerance between 0 and 1 |
When using method locator,image or ocr mouse is clicked by default at center coordinates.
Click types are:
- click normal left button mouse click
- double
- right
param locator: | element locator on active window |
---|---|
param x: | coordinate x on desktop |
param y: | coordinate y on desktop |
param off_x: | offset x (used for locator and image clicks) |
param off_y: | offset y (used for locator and image clicks) |
param image: | image to click on desktop |
param method: | one of the available methods to mouse click, default "locator" |
param ctype: | type of mouse click |
param focus: | default point for element click is 'center', can be set to 'topleft' to click top left corner of the element |
param tolerance: | |
image matching tolerance between 0 and 1 |
Examples
Mouse Click method=coordinates 100 100
Mouse Click CalculatorResults
Mouse Click method=image image=myimage.png off_x=10 off_y=10 ctype=right
Mouse Click method=image image=myimage.png tolerance=0.8
${elements} ${other}= Find Element class:Button
FOR ${element} IN @{elements}
Run Keyword If ${element}[visible] Mouse Click ${element}
END
Mouse Click id:TrickyCheckbox focus=topleft
Mouse Click Coords
Click at coordinates on desktop
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
x | int | null | horizontal coordinate on the windows to click |
y | int | null | vertical coordinate on the windows to click |
ctype | str | click | click type "click", "right" or "double", defaults to "click" |
delay_time | float, None | None |
param x: | horizontal coordinate on the windows to click |
---|---|
param y: | vertical coordinate on the windows to click |
param ctype: | click type "click", "right" or "double", defaults to "click" |
param delay: | delay in seconds after, default is no delay |
Examples
Mouse Click Coords x=450 y=100
Mouse Click Coords x=300 y=300 ctype=right
Mouse Click Coords x=450 y=100 delay=5.0
Mouse Click Image
Click at template image on desktop
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
template | str | null | |
off_x | int | 0 | horizontal offset from top left corner to click on |
off_y | int | 0 | vertical offset from top left corner to click on |
ctype | str | click | type of mouse click |
tolerance | float, None | None | matching tolerance between 0 and 1 |
param image: | image to click on desktop |
---|---|
param off_x: | horizontal offset from top left corner to click on |
param off_y: | vertical offset from top left corner to click on |
param ctype: | type of mouse click |
param tolerance: | |
matching tolerance between 0 and 1 |
Examples
Mouse Click image=myimage.png off_x=10 off_y=10 ctype=right
Mouse Click image=myimage.png tolerance=0.8
Open Application
Open application by dispatch method
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
application | str | null | name of the application as str |
This keyword is used to launch Microsoft applications like Excel, Word, Outlook and Powerpoint.
param application: | |
---|---|
name of the application as str | |
return: | application instance id |
Examples
${app1} Open Application Excel
${app2} Open Application Word
Open Dialog
Open window by its title.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
windowtitle | str, None | None | name of the window, defaults to active window if None |
highlight | bool | False | draw outline for window if True, default False |
timeout | int | 10 | time to wait for dialog to appear |
existing_app | bool | False | set True if selecting window which library has already accessed, default False |
wildcard | bool | False | set True for inclusive window title search, default False |
parse_elements | bool | True | set False to not to parse elements of the window, default True |
param windowtitle: | |
---|---|
name of the window, defaults to active window if None | |
param highlight: | |
draw outline for window if True, default False | |
param timeout: | time to wait for dialog to appear |
param existing_app: | |
set True if selecting window which library has already accessed, default False | |
param wildcard: | set True for inclusive window title search, default False |
param parse_elements: | |
set False to not to parse elements of the window, default True |
Examples
Open Dialog Untitled - Notepad
Open Dialog Untitled - Notepad highlight=True timeout=5
Open Dialog Notepad wildcard=True
Open Executable
Open Windows executable. Window title name is required to get handle on the application.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
executable | str | null | name of the executable |
windowtitle | str | null | name of the window |
backend | str, None | None | set Windows backend, default None means using library default value |
work_dir | str, None | None | path to working directory, default None |
wildcard | bool | False | set True for inclusive window title search, default False |
param executable: | |
---|---|
name of the executable | |
param windowtitle: | |
name of the window | |
param backend: | set Windows backend, default None means using library default value |
param work_dir: | path to working directory, default None |
param wildcard: | set True for inclusive window title search, default False |
return: | application instance id |
Examples
${app1} Open Executable calc.exe Calculator
${app2} Open Executable notepad.exe Notepad wildcard=True
Open File
Open associated application when opening file
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str | null | path to file |
windowtitle | str, None | None | name of the window |
wildcard | bool | False | set True for inclusive window title search, default False |
timeout | int | 10 | time to wait for dialog to appear |
Keyword Open Dialog is used if windowtitle is given.
param filename: | path to file |
---|---|
param windowtitle: | |
name of the window | |
param wildcard: | set True for inclusive window title search, default False |
param timeout: | time to wait for dialog to appear |
return: | application id or None |
Examples
${app1} Open File /path/to/myfile.txt
Open From Search
Open application using Windows search dialog. Window title name is required to get handle on the application.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
executable | str | null | name of the executable |
windowtitle | str | null | name of the window |
timeout | int | 10 | time to wait for dialog to appear |
wildcard | bool | False | set True for inclusive window title search, default False |
param executable: | |
---|---|
name of the executable | |
param windowtitle: | |
name of the window | |
param timeout: | time to wait for dialog to appear |
param wildcard: | set True for inclusive window title search, default False |
return: | application instance id |
Examples
${app1} Open From Search calculator Calculator
${app2} Open From Search notepad Notepad wildcard=True
Open Using Run Dialog
Open application using Windows run dialog. Window title name is required to get handle on the application.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
executable | str | null | name of the executable |
windowtitle | str | null | name of the window |
timeout | int | 10 | time to wait for dialog to appear |
wildcard | bool | False | set True for inclusive window title search, default False |
param executable: | |
---|---|
name of the executable | |
param windowtitle: | |
name of the window | |
param timeout: | time to wait for dialog to appear |
param wildcard: | set True for inclusive window title search, default False |
return: | application instance id |
Examples
${app1} Open Using Run Dialog notepad Untitled - Notepad
${app2} Open Using Run Dialog notepad Notepad wildcard=True
Process Exists
Check if process exists by its name
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
process_name | str | null | search for this process |
strict | bool | True | defines how match is made, default True which means that process name needs to be exact match and False does inclusive matching |
param process_name: | |
---|---|
search for this process | |
param strict: | defines how match is made, default True which means that process name needs to be exact match and False does inclusive matching |
return: | process instance or False |
Examples
${process} Process Exists calc
${process} Process Exists calc strict=False
Process Id Exists
Check if process exists by its id
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
pid | int | null | process identifier |
param pid: | process identifier |
---|---|
return: | process instance or False |
Examples
${process} Process ID Exists 4567
Run Keyword If ${process} Log Process exists
Put System To Sleep
Put Windows into sleep mode
Examples
Put System To Sleep
Quit Application
Quit an application by application id or active application if app_id is None.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
app_id | int, None | None | application_id, defaults to None |
send_keys | bool | False | if ALT+F4 should be used to quit, default False |
param app_id: | application_id, defaults to None |
---|---|
param send_keys: | |
if ALT+F4 should be used to quit, default False |
Examples
${app1} Open Application Excel
${app2} Open Application Word
Quit Application ${app1}
Refresh Window
Get controls and elements for current windows.
Should be called always when window content changes on Windows desktop.
return: | controls (list) and elements (list) |
---|
Restore Dialog
Restore window by its title
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
windowtitle | str, None | None | name of the window, default None means that active window is going to be restored |
param windowtitle: | |
---|---|
name of the window, default None means that active window is going to be restored |
Examples
Open Using Run Dialog notepad Untitled - Notepad
Minimize Dialog
Sleep 1s
Restore Dialog
Sleep 1s
Restore Dialog Untitled - Notepad
Screenshot
Save screenshot into filename.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str | null | name of the file |
element | dict, None | None | take element screenshot, defaults to None |
ctrl | Any, None | None | take control screenshot, defaults to None |
desktop | bool | False | take desktop screenshot if True, defaults to False |
overwrite | bool | True | overwrite existing image (deprecated, always True) |
param filename: | name of the file |
---|---|
param element: | take element screenshot, defaults to None |
param ctrl: | take control screenshot, defaults to None |
param desktop: | take desktop screenshot if True, defaults to False |
param overwrite: | |
overwrite existing image (deprecated, always True) |
Examples
@{element} Find Element CalculatorResults
Screenshot element.png ${elements[0][0]}
Screenshot desktop.png desktop=True
Screenshot desktop.png desktop=True overwrite=True
Send Keys
Send keys into active windows.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
keys | str | null | list of keys to send |
param keys: | list of keys to send |
---|
Examples
Open Executable calc.exe Calculator
Send Keys 2{+}3{=}
Send Keys To Input
Send keys to windows and add ENTER if with_enter is True
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
keys_to_type | str | null | keys to type into Windows |
with_enter | bool | True | send ENTER if with_enter is True |
send_delay | float | 0.5 | delay after send_keys |
enter_delay | float | 1.5 | delay after ENTER |
At the end of send_keys there is by default 0.5 second delay. At the end of ENTER there is by default 1.5 second delay.
param keys_to_type: | |
---|---|
keys to type into Windows | |
param with_enter: | |
send ENTER if with_enter is True | |
param send_delay: | |
delay after send_keys | |
param enter_delay: | |
delay after ENTER |
Examples
${txt} Get Spaced String My name is Bond, James Bond
Send Keys To Input ${txt} with_enter=False
Send Keys To Input {ENTER}THE send_delay=5.0 with_enter=False
Send Keys To Input {VK_SPACE}-{VK_SPACE}END enter_delay=5.0
Set Automation Speed
Set global automation timings
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
speed | Speed | DEFAULT | possible values 'default', 'fast' or 'slow' |
param speed: | possible values 'default', 'fast' or 'slow' |
---|
Set Windows Backend
Set Windows backend which is used to interact with Windows applications
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
backend | str | null | name of the backend to use |
Allowed values defined by SUPPORTED_BACKENDS
param backend: | name of the backend to use |
---|
Examples
Set Windows Backend uia
Open Executable calc.exe Calculator
Set Windows Backend win32
Open Executable calc.exe Calculator
Switch To Application
Switch to application by id.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
app_id | int | null | application's id |
param app_id: | application's id |
---|---|
raises ValueError: | |
if application is not found by given id |
Examples
${app1} Open Application Excel
${app2} Open Application Word
Switch To Application ${app1}
Type Into
Type keys into element matched by given locator.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | element locator |
keys | str | null | list of keys to type |
empty_field | bool | False | if field should be emptied before typing, default False |
param locator: | element locator |
---|---|
param keys: | list of keys to type |
param empty_field: | |
if field should be emptied before typing, default False |
Examples
Open Executable calc.exe Calculator
Type Into CalculatorResults 11
Type Into CalculatorResults 22 empty_field=True
Type Keys
Type keys into active window element.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
keys | str | null | list of keys to type |
param keys: | list of keys to type |
---|
Examples
Open Executable notepad.exe Untitled - Notepad
Type Keys My text
Wait For Element
Wait for element to appear into the window.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
locator | str | null | name of the locator |
use_refreshing | bool | False | wait for element(s) which are not there yet e.g. listbox item or popups, default False |
search_criteria | str, None | None | criteria by which element is matched |
timeout | float | 30.0 | defines how long to wait for element to appear, defaults to 30.0 seconds |
interval | float | 2.0 | how often to poll for element, defaults to 2.0 seconds (minimum is 0.5 seconds) |
Can return 1 or more elements matching locator, or raises ElementNotFoundError if element is not found within timeout.
param locator: | name of the locator |
---|---|
param use_refreshing: | |
wait for element(s) which are not there yet e.g. listbox item or popups, default False | |
param search_criteria: | |
criteria by which element is matched | |
param timeout: | defines how long to wait for element to appear, defaults to 30.0 seconds |
param interval: | how often to poll for element, defaults to 2.0 seconds (minimum is 0.5 seconds) |
Examples
@{elements} Wait For Element CalculatorResults
@{elements} Wait For Element Results timeout=10 interval=1.5