- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
Open
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
Despite the code will handle that properly, annotations are unadjusted to RelativeBy. First of all: find_element() and find_elements():

None of them has annotation for by. In both cases, it should be: Union[ByType, RelativeBy]:

Another case are conditions in expected_conditions.py:

Here annotations for locator are: Tuple[str, str], whereas it should be: Union[Tuple[ByType, str], Tuple[RelativeBy, None]]. Same applies for other conditions.
How can we reproduce the issue?
n/aRelevant log output
n/aOperating System
n/a
Selenium version
4.24.0 for Python
What are the browser(s) and version(s) where you see this issue?
n/a
What are the browser driver(s) and version(s) where you see this issue?
n/a
Are you using Selenium Grid?
n/a
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intended