Skip to content

Selenium methods that return multiple elements have incorrect return types #6644

@colons

Description

@colons

The return types introduced in #6565 are incorrect. The methods named find_elements... do not return single WebElement instances, they return List[WebElement]. This will lead to mypy making complaints like the following in any Selenium test suite that uses these methods:

error: "WebElement" has no attribute "__iter__" (not iterable)
error: Value of type "WebElement" is not indexable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions