Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom Exception Classes to BrowserLibrary for User Code to Catch #3318

Open
TWijesundera opened this issue Dec 11, 2023 · 3 comments
Open

Comments

@TWijesundera
Copy link

TWijesundera commented Dec 11, 2023

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/

@aaltat
Copy link
Member

aaltat commented Dec 11, 2023

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

Copy link
Contributor

@aaltat

I've put up a pull request to add @TWijesundera! 🎉

@TWijesundera
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants