[py] Add type hints for WebElement.find_element(s)#16772
[py] Add type hints for WebElement.find_element(s)#16772cgoldberg merged 3 commits intoSeleniumHQ:trunkfrom
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:
|
|||||||||
cgoldberg
left a comment
There was a problem hiding this comment.
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