TRY CATCH
TRY CATCH
open
https://sideex.github.io/example/webpage_under_test/button-to-change-color.html
COMMENT
Set the button to be hidden
setCSS
id=Button
//button[1]
//button[@id='Button']
css=#Button
visibility:hidden
COMMENT
TRY the following commands
TRY
COMMENT
Assert the visibility of the button, the test case will terminate if the command fails
assertVisibility
id=Button
//button[1]
//button[@id='locatorButton']
css=#locatorButton
CATCH
The execution will CATCH the TRY event if it fails
COMMENT
set the button to be shown
setCSS
id=Button
//button[1]
//button[@id='Button']
css=#Button
visibility:inline
COMMENT
Assert the visibility of the button, the test case will terminate if the command fails
assertVisibility
id=Button
//button[1]
//button[@id='locatorButton']
css=#locatorButton
COMMENT
END commands should be placed at the end of IF-ELSE/WHILE/TRY-CATCH blocks.
END