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

@beat decoration logging and resolutions #149

Open
MarcelWilson opened this issue Feb 7, 2025 · 2 comments
Open

@beat decoration logging and resolutions #149

MarcelWilson opened this issue Feb 7, 2025 · 2 comments

Comments

@MarcelWilson
Copy link
Contributor

MarcelWilson commented Feb 7, 2025

I've been noticing resolutions will log their beat message but then redundantly also log the retval from the resolution.resolve.

Marcel sees if the username field is visible.
    Marcel inspects the username field.
        => <None>
    ... hoping it's visible.
        => the element is visible

The ... hoping it's visible. and the => the element is visible are communicating the same thing. I believe the resolve methods dont really need to log the return value.

The current behavior also can lead to confusion. We note that the question returned <None> but the resolution logging can make it seem as if the element not only was present, but was also matched; when in fact, it was not.

@MarcelWilson
Copy link
Contributor Author

This might tie closely with #113 in that beat may need to accept parameters that dictate behavior. Or perhaps we need to create a couple of new variations of pacing decorators for different situations.

@MarcelWilson
Copy link
Contributor Author

The problem with the logging being confusing is because the __str__ method on BaseMatchers always uses the describe_to.

I think the most likely option is we simply dont log the return value on resolve methods. Or we should consider updating represent_prop use the __repr__ for matchers instead.

Marcel sees if the username field is visible.
    Marcel inspects the username field.
        => <None>
    ... hoping it's visible.
        => <IsVisibleElement(the element is visible)>

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

No branches or pull requests

1 participant