-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Add type hints for WebElement.find_element(s) #16772
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
Conversation
…ts value argument
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cgoldberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
User description
🔗 Related Issues
#15697
💥 What does this PR do?
It just adds type hints for WebElement.find_element(s) value argument
🔧 Implementation Notes
Because WebDriver.find_element(s) is typed the same way, and adding type hints here makes type checkers happy
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add type hints for
valueparameter infind_elementandfind_elementsSpecify
valueargument asstr | Nonefor consistency withWebDriverImprove type checker compatibility for WebElement locator methods
Diagram Walkthrough
File Walkthrough
webelement.py
Add type hints to find_element(s) value parameterpy/selenium/webdriver/remote/webelement.py
str | Nonetovalueparameter infind_elementmethodstr | Nonetovalueparameter infind_elementsmethodWebDriver.find_element(s)implementation