RPA - Desktop - UI Locator - Conditional Statements

Hi all,
I am new to robot framework, and I am interested to learn how to use it for automated testing on desktop applications. I want to take a screenshot when a particular UI locator image for a warning appears inside a simulator running in Windows.

How would you use the Wait for element and alias for a UI image in a conditional statement? Thanks!

*** Settings ***
Documentation Automate testing
Library RPA.Desktop

*** Keywords ***
Warning test
@{elements} Wait for element ${1:locator} timeout=5

IF Wait for element ${1:locator} == True
Take Screenshot
Click ${1:locator}

My conda.yaml :


rpaframework==11.6.3 # Release notes — RPA Framework documentation

There are keywords what you can use for conditional execution. Some options.

1 Like