Reputation: 1073
I have noticed, that in Robot framework, I can't have both Log Source AND Capture Page Screenshot, when I define it in settings "run_on_failure". How do you workaround this, when you want to have both of them?
Upvotes: 1
Views: 1263
Reputation: 2473
You could create your own keyword that wraps the two keywords together, and use Register Keyword To Run On Failure to register it as the run on failure keyword.
*** Keywords ***
Failure Callback
Capture Page Screenshot
Log Source
And then call this before starting your tests, probably in your test/suite setup
Register Keyword To Run On Failure Failure Callback
You could also expand Selenium2Library itself, in order to define your wrapper keyword and pass it directly when importing Selenium2Library as the run_on_failure
argument.
Upvotes: 5