### Press Key usage example Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Shows how to use the Press Key keyword with shortcut and text formats, including optional identifier, delay, and press_only/release_only parameters. The example defines a variable for a shortcut and sends keys to a combo box input, with and without a delay. ```robotframework ******* Variables ******* --- ${KEYBOARD_INPUT_CUT} s'CTRL+X' ******* Test Cases ******* ...Keyboard usage in Test Case... Press Key s'CTRL' ${XPATH_COMBO_BOX_INPUT} Press Key t'A' ${XPATH_COMBO_BOX_INPUT} Press Key s'CTRL+A' ${XPATH_COMBO_BOX_INPUT} Press Key ${KEYBOARD_INPUT_CUT} ${XPATH_COMBO_BOX_INPUT} Press Key ${KEYBOARD_INPUT_CUT} ${XPATH_COMBO_BOX_INPUT} 500 Press Key t'Text' Press Key t'Text' delay_in_ms=200 ``` -------------------------------- ### Focus usage example Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Robot Framework example for the Focus keyword. It focuses the element identified by the given XPath. ```robotframework Focus ``` -------------------------------- ### Find One Element usage example Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Robot Framework example for the Find One Element keyword. It stores the returned AutomationElement in ${element}, clicks it, retries the keyword with a custom timeout, and clicks another element by XPath. ```robotframework ${element} Find One Element --- Click ${element} Wait Until Keyword Succeeds 10s 1ms Find One Element /xpath/text/update/successful Click /xpath/button/continue ``` -------------------------------- ### Press Keys keyword usage with variable and optional arguments Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Robot Framework example for the Press Keys keyword. Defines a variable with a sequence of key combinations (CTRL+A, CTRL+X) and then calls Press Keys with an optional XPath identifier, an optional delay in milliseconds, and an optional delay_in_ms argument. The variable definition and the four keyword calls are shown together as one example. ```robotframework @{KEYBOARD_INPUT_SELECT_CUT_TEXT} s'CTRL+A' s'CTRL+X' ``` ```robotframework Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} ${XPATH_COMBO_BOX_INPUT} ``` ```robotframework Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} ${XPATH_COMBO_BOX_INPUT} 500 ``` ```robotframework Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} ``` ```robotframework Press Keys ${KEYBOARD_INPUT_SELECT_CUT_TEXT} delay_in_ms=500 ``` -------------------------------- ### Scroll Down with XPath or Position Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Scrolls the mouse wheel down to an element identified by XPath or at an absolute screen position. The first example scrolls down by 1 unit to the element at the given XPath. The second example scrolls down by 1 unit at the absolute screen coordinates (100, 200). ```robotframework Scroll Down 1 ``` ```robotframework Scroll Down amount=1 x=100 y=200 ``` -------------------------------- ### Scroll Up with XPath or Position Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Scrolls the mouse wheel up to an element identified by XPath or at an absolute screen position. The first example scrolls up by 10 units to the element at the given XPath. The second example scrolls up by 10 units at the absolute screen coordinates (100, 200). ```robotframework Scroll Up 10 ``` ```robotframework Scroll Up amount=10 x=100 y=200 ``` -------------------------------- ### Find All Elements and Retrieve Properties Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Finds all elements matching an XPath and returns an AutomationElement list. The example shows retrieving properties (Xpath, AutomationId, Name, ClassName) from the first element. If a property is not set, an empty string is returned. ```robotframework ${elements} Find All Elements ``` ```robotframework ${Xpath} Set Variable ${element[0].Xpath} ``` ```robotframework ${Id} Set Variable ${element[0].AutomationId} ``` ```robotframework ${Name} Set Variable ${element[0].Name} ``` ```robotframework ${ClassName} Set Variable ${element[0].ClassName} ``` -------------------------------- ### Launch Application With Args Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Launches an application with given arguments and returns the process id. Throws an error if the application cannot be found. ```APIDOC ## Launch Application With Args ### Description Launches an application with given arguments. If application could not be found an error message will be thrown. ### Arguments - **application** (string) - Required - Relative or absolute path to executable to launch - **arguments** (string) - Required - Arguments for application to start - **msg** (string) - Optional - Custom error message ### Example ${pid} Launch Application With Args ### Returns Process id from started process if successfully ``` -------------------------------- ### Launch Application Source: https://gdatasoftwareag.github.io/robotframework-flaui/keywords/5.2.1.html Launches an application and returns the process id. Throws an error if the application cannot be found. ```APIDOC ## Launch Application ### Description Launches an application. If application could not be found an error message will be thrown. ### Arguments - **application** (string) - Required - Relative or absolute path to executable to launch - **msg** (string) - Optional - Custom error message ### Example ${pid} Launch Application ### Returns Process id from started process if successfully ```