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 console log reporting in AbstractWebElement #17

Closed
kgress opened this issue Apr 15, 2019 · 0 comments
Closed

Add console log reporting in AbstractWebElement #17

kgress opened this issue Apr 15, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@kgress
Copy link
Contributor

kgress commented Apr 15, 2019

h1. Summary
Whenever a user interacts with Scaffold's strongly typed elements, e.g. a click() or getText(), it uses the AbstractWebElement's protected getWebElement(boolean throwExceptionIfNotFound) method.

While this method does provide some error handling from other methods that use it, it doesn't provide any additional clues for cases where an element wasn't found due to some potential issue with javascript or an unforeseen error that is provided by the browser console.

This ticket is to add console log reporting. As noted in issue #8 , here is a stack overflow article that goes into detail on how we can pull logs: https://stackoverflow.com/questions/25431380/capturing-browser-logs-with-selenium-webdriver-using-java.

We don't need to do anything too fancy right now. My thought behind this is that we can just let lombok report these errors as log.error when and if they exist during the protected getWebElement(boolean throwExceptionIfNotFound) catch block of a NoSuchElementException. Just this alone will enhance our error reporting for failed tests.

h1. A/C

  • Scaffold should report console errors when an element is interacted with in such a way that produces an exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant