Skip to content

Commit 273644a

Browse files
committed
[py] add typing options to get_property(); fixes #10624
1 parent dca58d5 commit 273644a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

py/selenium/webdriver/remote/webelement.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
from __future__ import annotations
1718

1819
import os
1920
from base64 import b64decode, encodebytes
@@ -23,6 +24,7 @@
2324
import zipfile
2425
from abc import ABCMeta
2526
from io import BytesIO
27+
from typing import Union
2628

2729
from selenium.common.exceptions import WebDriverException
2830
from selenium.webdriver.common.by import By
@@ -99,7 +101,7 @@ def clear(self) -> None:
99101
"""Clears the text if it's a text entry element."""
100102
self._execute(Command.CLEAR_ELEMENT)
101103

102-
def get_property(self, name) -> str:
104+
def get_property(self, name) -> Union[str, bool, WebElement, dict]:
103105
"""
104106
Gets the given property of the element.
105107

0 commit comments

Comments
 (0)