Skip to content

Comments

Standardize and document ensure_element method of Session#75

Merged
lordjabez merged 5 commits intotryolabs:masterfrom
bmos:ensure_element
Feb 4, 2024
Merged

Standardize and document ensure_element method of Session#75
lordjabez merged 5 commits intotryolabs:masterfrom
bmos:ensure_element

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
@bmos bmos mentioned this pull request Dec 3, 2025
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