Even if a preceding command fails, the end command is still executed. For example:
browser.waitForElementIsVisible("non-existing-item", 500).end()
I am looking to create a custom command that always gets called in the same way as the end command. When I try using
browser.waitForElementIsVisible("non-existing-item", 500).saveVideo().end()
or browser.waitForElementIsVisible("non-existing-item", 500).saveVideoAndEnd()
, the custom command does not get called if the previous command fails.
Is there a way to achieve this functionality?
Thank you, Tomas