-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Fix relativeby annotations new #15877
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
Fix relativeby annotations new #15877
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Thank you, @ShauryaDusht for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
|
@ShauryaDusht please stop submitting duplicate PR's. I'm leaving them all closed because I have no idea what you are actually trying to submit. |
User description
🔗 Related Issues
Closes #14881
💥 What does this PR do?
Adds missing
RelativeBytype annotation support to:find_elementandfind_elementsexpected_conditions.py(conditions now supportRelativeBylocators)Also adds unit tests to validate these changes.
🔧 Implementation Notes
Tuple[str, str]toUnion[Tuple[ByType, str], Tuple[RelativeBy, None]]where needed.💡 Additional Considerations
N/A
🔄 Types of changes
Files Changed/Added
selenium/webdriver/remote/shadowroot.pyselenium/webdriver/remote/webdriver.pyselenium/webdriver/remote/webelement.pyselenium/webdriver/support/expected_conditions.pytest/unit/selenium/webdriver/support/test_expected_conditions_relative_by.pytest/unit/selenium/webdriver/remote/test_relative_by_annotations.pyPR Type
Bug fix, Enhancement, Tests
Description
Add
RelativeBytype annotation support tofind_element/find_elementsUpdate expected conditions to accept
RelativeBylocatorsexpected_conditions.pyAdd unit tests for
RelativeBytype annotation supportChanges walkthrough 📝
4 files
Add RelativeBy type annotation to find_element(s)Add RelativeBy type annotation to WebDriver find_element(s)Add RelativeBy type annotation to WebElement find_element(s)Support RelativeBy in expected_conditions locator arguments3 files
Add unit tests for RelativeBy annotation support (remote)Add tests for expected_conditions with RelativeBy locatorsAdd unit tests for RelativeBy annotation support (core)