Show Menu
Cheatography

Robot Framework Automation Cheat Sheet (DRAFT) by

Robot Framework Test Automation - Built In, External Library Keywords

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Built In Library

Log
message
 
Logs the given message with the given level.
Log Many
*messages
 
Logs the given messages as separate entries using the INFO level.
Log To Console
message
 
Logs the given message to the console.
Set Log Level
level
 
Sets the log threshold to the specified level and returns the old level.
Sleep
_time_
Run Keyword
name, *args
 
Executes the given keyword with the given arguments.
Run Keyword If All Critical Tests Passed
name, *args
 
Runs the given keyword with the given arguments, if all critical tests passed.
Set Variable
*values
 
Returns the given values which can then be assigned to a variables.
set variable if
condition, *values
 
Sets variable based on the given condition.
Set Global Variable
name, *values
 
Makes a variable available globally in all tests and suites.
Convert To Integer
item, base=None
 
Converts the given item to an integer number based on base value
Convert To Boolean
item
 
Converts the given item to Boolean true or false.
Convert To Bytes
input, input_­typ­e=text
 
Converts the given input to bytes according to the input_­type.
Convert To Hex
item, {base=­None, prefix­=None, length­=None, lowerc­ase­=False}
 
Converts the given item to a hexade­cimal string.
Convert To Number
item, precis­ion­=Value
 
Converts the given item to a floating point number based on precision
Convert To Octal
item, {base=­None, prefix­=None, length­=None}
 
Converts the given item to an octal string.
Convert To Binary
item, {base=­None, prefix­=None, length­=None}
 
Converts the given item to a binary string.
Evaluate
expres­sion, {modul­es=­None, namesp­ace­=None}
 
Evaluates the given expression in Python and returns the result.
Create List
*items
 
Returns a list containing given items.
EXIT FOR LOOP
   
Stops executing the enclosing for loop.
EXIT FOR LOOP IF
condition
 
Stops executing the enclosing for loop if the condition is true.

Shortcuts

Force Close Chrome Drivers
taskkill /f /im chrome­dri­ver.exe
 

Selenium Library - Browsers

Firefox
ff, firefox
Google Chrome
google­chrome, chrome, gc
Internet Explorer
intern­ete­xpl­orer, ie
Edge
edge

Selenium Library - Part 1

Open Browser
URL
Browser
Go To
URL
Capture Element Screenshot
Locator
filena­me=­Fil­e.png
Capture Page Screenshot
 
filena­me=­Fil­e.png
Checkbox Should Be Selected
Locator
Checkbox Should Not Be Selected
Locator
Choose File
Locator
FilePath (Forward Slash /)
Click Button
Locator
Click Element
Locator
Go To
URL
Mouse Over
Locator
Mouse Out
Locator
Mouse Down
Locator
Mouse Up
Locator
Mouse Down On Link
Locator
Mouse Down on Image
Locator
Input Text
Locator
Text
Page Should Contain Element
Locator
{message: NoneTy­pe=­None, loglev­el=­TRACE, limit: NoneTy­pe=­None}
Verifies that element locator is found on the current page.
GET TEXT
Locator
 
Returns the text value of the element identified by locator.
Input Text
Locator
Text, {clear: bool=True}
Types the given text into the text field identified by locator.
 

Selenium Library - Wait Functions

Set Selenium Implicit Wait
value
Sets the implicit wait value used by Selenium.

Selenium Library - Part 2

Close Browser
Closes the current browser.
Close All Browsers
Closes all open browsers and resets the browser cache.
Maximize Browser Window
Maximizes current browser window.
Reload Page
Simulates user reloading page.
Go Back
Simulates the user clicking the back button on their browser.