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 small improvements #66

Merged
merged 4 commits into from
May 27, 2024
Merged

Add small improvements #66

merged 4 commits into from
May 27, 2024

Conversation

M1troll
Copy link
Contributor

@M1troll M1troll commented May 24, 2024

  • Add auto-scroll to element before click
  • Add page class name to PageDidNotLoadedError
  • Add contains to XPathLocator

wait_until_clickable: Wait until the element is clickable before
clicking, or not (default `True`).

"""
if wait_until_clickable:
self.wait_until_clickable()
if scroll_to:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to change order of wait and click.
Consider case when button is not visible on a screen (need to scroll) and not clickable.
If wait condition will fail, it would be nice to make a screenshot to investigate issue later. But screenshot won't show desired button because scroll not applied yet

Copy link
Member

@TheSuperiorStanislav TheSuperiorStanislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls update changelog)

There is often a situation when you need to add
`[contains(., text)]` to an already ready locator,
and for this you have to use `extend_query`.
So we decided to put it into a separate method.
@M1troll M1troll force-pushed the feature/add-small-improvements branch from 8d4f01c to 458ba3c Compare May 27, 2024 01:01
@M1troll M1troll force-pushed the feature/add-small-improvements branch from 4855d4a to e114515 Compare May 27, 2024 01:05
@M1troll M1troll merged commit 90bc73c into main May 27, 2024
1 check passed
@M1troll M1troll deleted the feature/add-small-improvements branch May 27, 2024 01:09
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

Successfully merging this pull request may close these issues.

3 participants