Skip to content
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

[py] extend typing options for get_property() #10682

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import zipfile
from abc import ABCMeta
from io import BytesIO
from typing import Optional

from selenium.common.exceptions import WebDriverException, JavascriptException
from selenium.webdriver.common.by import By
Expand Down Expand Up @@ -108,7 +109,7 @@ def clear(self) -> None:
"""Clears the text if it's a text entry element."""
self._execute(Command.CLEAR_ELEMENT)

def get_property(self, name) -> str | bool | WebElement | dict:
def get_property(self, name) -> Optional[str | int | bool | WebElement | dict | list]:
"""
Gets the given property of the element.

Expand Down