robotframework-browser
robotframework-browser copied to clipboard
Add Custom Exception Classes to BrowserLibrary for User Code to Catch
Currently, browser library throws an AssertionError for every keyword that fails due to timeout or assertion issues. IMO this is too broad and BrowserLibrary should raise custom exceptions for user code to catch so we can be certain that BrowserLibrary is raising an error and not other parts of the testing suite.
This practice is common with other python libraries: https://requests.readthedocs.io/en/latest/_modules/requests/exceptions/
We need to discuss this with the team. I understand your needs but I am not sure how we can do this with Assertion Engine
@allcontributors please add @TWijesundera for ideas
I think you don't need to worry about assertion engine. You could probably transform the AssertionError raised by assertion engine into some other exception class
I do agree that this would be useful, but most likely this is not implemented foreseen future. It is just too backwards incompatible for my mind and bang for the bug is not there. Therefore closing this issue.