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

Standardize and document ensure_element method of Session #75

Merged
merged 5 commits into from
Feb 4, 2024
Merged

Standardize and document ensure_element method of Session #75

merged 5 commits into from
Feb 4, 2024

Conversation

bmos
Copy link
Contributor

@bmos bmos commented Feb 3, 2024

The ensure_element method doesn't accept the standard locator strategy names, because the names used internally to this module use underscores instead of spaces.

This PR standardizes the calls in this module to use Selenium's standard names internally, while allowing for backwards compatibility for users who may be using the un-documented method as it was. Users using the underscored names will see a DeprecationWarning to alert them to the change, eventually allowing this extra code to be removed from this module.

I have run pytest and all the tests passed 👍🏻

@bmos bmos mentioned this pull request Feb 3, 2024
@bmos bmos marked this pull request as ready for review February 3, 2024 17:44
@bmos bmos changed the title Updates for ensure_element Standardize and document ensure_element method of Session Feb 3, 2024
@bmos bmos marked this pull request as draft February 3, 2024 19:01
@bmos bmos marked this pull request as ready for review February 3, 2024 19:36
@lordjabez lordjabez merged commit 3f535ed into tryolabs:master Feb 4, 2024
@lordjabez
Copy link
Collaborator

Thanks for the contribution, @bmos ! This is a nice improvement.

@bmos bmos deleted the ensure_element branch February 4, 2024 15:25
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.

2 participants