Can I give exact error that I am expecting (e.g. Timeout Error) and catch it in EXCEPT block instead of Fatal Error?
I tried it but I cannot figure out the syntax.
e.g.
I am expecting following error if there is no button displayed
TimeoutError: locator.myLocator: Timout 1000ms exceded.
Where do I write and what exactly? The whole error message?
TRY
Click ${myLocator}
EXCEPT
Log Button not displayed (as expected), continuing the test
END
I’ve tried with this, but it does not work:
TRY
Click ${Alert.Success}
EXCEPT TimeoutError: locator.click: Timeout 10000ms exceeded.
Log The element is not displayed
END