-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
While updating tests for the latest changes to my current project I realized the errors appearing in the log weren't adequate enough for me to realize why the test had failed.
By all accounts the way this logs it is easy to assume that the element in question is missing.
11:53:53 INFO Admin sees if the logo is clickable.
11:53:53 INFO Admin inspects the logo.
11:53:53 INFO ... hoping it's clickable
11:53:53 INFO => False
11:53:53 INFO ***ERROR***
AssertionError:
Expected: the element is enabled/clickable
but: was not even present
Technically speaking, it couldn't be found because the target was incorrect. The TargetingError raised in Element is simply caught and the log never reflects the reason why it is not present.
It would be nice to show the selenium exception that caused the test to fail:
no such element: Unable to locate element: {"method":"xpath","selector":"//li[@data-testid=side-nav-logo-expanded]"}
Something like:
AssertionError:
Expected: the element is enabled/clickable
but: Unable to locate element: {"method":"xpath","selector":"//li[@data-testid=side-nav-logo-expanded]"}
Metadata
Metadata
Assignees
Labels
No labels