-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
Copy pathwebelement.pyi
53 lines (46 loc) · 1.47 KB
/
webelement.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from __future__ import annotations
# Standard librarary imports
from typing import Any, TypedDict
from ..common.by import _ByType
from ..common.keys import _KeySeq
from ..remote.webdriver import WebDriver
class _Point(TypedDict):
x: int
y: int
class _Size(TypedDict):
width: int
height: int
class _Rect(_Point, _Size):
...
class WebElement:
@property
def tag_name(self) -> str: ...
@property
def text(self) -> str: ...
def click(self) -> None: ...
def submit(self) -> None: ...
def clear(self) -> None: ...
def get_property(self, name: str) -> Any: ...
def get_attribute(self, name: str) -> Any: ...
def is_selected(self) -> bool: ...
def is_enabled(self) -> bool: ...
def find_element(self, by: _ByType, selector: str) -> WebElement: ...
def find_elements(self, by: _ByType, selector: str) -> list[WebElement]: ...
def send_keys(self, *value: _KeySeq) -> None: ...
def is_displayed(self) -> bool: ...
@property
def location_once_scrolled_into_view(self) -> _Point: ...
@property
def size(self) -> _Size: ...
def value_of_css_property(self, property_name: str) -> str: ...
@property
def location(self) -> _Point: ...
@property
def rect(self) -> _Rect: ...
@property
def screenshot_as_base64(self) -> bytes: ...
@property
def screenshot_as_png(self) -> bytes: ...
def screenshot(self, filename: str) -> bool: ...
@property
def parent(self) -> WebDriver: ...