mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
一般获取元素方法取消ChromiumFrame提示
This commit is contained in:
parent
eea09117fc
commit
00db0af61a
@ -69,7 +69,7 @@ class ChromiumBase(BasePage):
|
|||||||
def _set_runtime_settings(self) -> None: ...
|
def _set_runtime_settings(self) -> None: ...
|
||||||
|
|
||||||
def __call__(self, loc_or_str: Union[Tuple[str, str], str, ChromiumElement],
|
def __call__(self, loc_or_str: Union[Tuple[str, str], str, ChromiumElement],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
|
timeout: float = None) -> ChromiumElement: ...
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def title(self) -> str: ...
|
def title(self) -> str: ...
|
||||||
@ -146,11 +146,11 @@ class ChromiumBase(BasePage):
|
|||||||
|
|
||||||
def ele(self,
|
def ele(self,
|
||||||
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, ChromiumFrame],
|
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, ChromiumFrame],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
|
timeout: float = None) -> ChromiumElement: ...
|
||||||
|
|
||||||
def eles(self,
|
def eles(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> List[Union[ChromiumElement, ChromiumFrame]]: ...
|
timeout: float = None) -> List[ChromiumElement]: ...
|
||||||
|
|
||||||
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
||||||
-> Union[SessionElement, str, NoneElement]: ...
|
-> Union[SessionElement, str, NoneElement]: ...
|
||||||
|
@ -40,7 +40,7 @@ class ChromiumElement(DrissionElement):
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, str, None]: ...
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tag(self) -> str: ...
|
def tag(self) -> str: ...
|
||||||
@ -159,11 +159,11 @@ class ChromiumElement(DrissionElement):
|
|||||||
|
|
||||||
def ele(self,
|
def ele(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, str, NoneElement]: ...
|
timeout: float = None) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def eles(self,
|
def eles(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> List[Union[ChromiumElement, ChromiumFrame, str]]: ...
|
timeout: float = None) -> List[Union[ChromiumElement, str]]: ...
|
||||||
|
|
||||||
def s_ele(self, loc_or_str: Union[Tuple[str, str], str] = None) -> Union[SessionElement, str, NoneElement]: ...
|
def s_ele(self, loc_or_str: Union[Tuple[str, str], str] = None) -> Union[SessionElement, str, NoneElement]: ...
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ class ChromiumShadowRoot(BaseElement):
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, None]: ...
|
timeout: float = None) -> ChromiumElement: ...
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ids(self) -> Ids: ...
|
def ids(self) -> Ids: ...
|
||||||
@ -292,11 +292,11 @@ class ChromiumShadowRoot(BaseElement):
|
|||||||
|
|
||||||
def ele(self,
|
def ele(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
|
timeout: float = None) -> Union[ChromiumElement]: ...
|
||||||
|
|
||||||
def eles(self,
|
def eles(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> List[Union[ChromiumElement, ChromiumFrame]]: ...
|
timeout: float = None) -> List[ChromiumElement]: ...
|
||||||
|
|
||||||
def s_ele(self, loc_or_str: Union[Tuple[str, str], str] = None) -> Union[SessionElement, str, NoneElement]: ...
|
def s_ele(self, loc_or_str: Union[Tuple[str, str], str] = None) -> Union[SessionElement, str, NoneElement]: ...
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class ChromiumFrame(ChromiumBase):
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def __repr__(self) -> str: ...
|
def __repr__(self) -> str: ...
|
||||||
|
|
||||||
@ -118,38 +118,38 @@ class ChromiumFrame(ChromiumBase):
|
|||||||
def prev(self, filter_loc: Union[tuple, str] = '',
|
def prev(self, filter_loc: Union[tuple, str] = '',
|
||||||
index: int = 1,
|
index: int = 1,
|
||||||
timeout: float = 0,
|
timeout: float = 0,
|
||||||
ele_only: bool = True) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
ele_only: bool = True) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def next(self, filter_loc: Union[tuple, str] = '',
|
def next(self, filter_loc: Union[tuple, str] = '',
|
||||||
index: int = 1,
|
index: int = 1,
|
||||||
timeout: float = 0,
|
timeout: float = 0,
|
||||||
ele_only: bool = True) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
ele_only: bool = True) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def before(self, filter_loc: Union[tuple, str] = '',
|
def before(self, filter_loc: Union[tuple, str] = '',
|
||||||
index: int = 1,
|
index: int = 1,
|
||||||
timeout: float = None,
|
timeout: float = None,
|
||||||
ele_only: bool = True) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
ele_only: bool = True) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def after(self, filter_loc: Union[tuple, str] = '',
|
def after(self, filter_loc: Union[tuple, str] = '',
|
||||||
index: int = 1,
|
index: int = 1,
|
||||||
timeout: float = None,
|
timeout: float = None,
|
||||||
ele_only: bool = True) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
|
ele_only: bool = True) -> Union[ChromiumElement, str]: ...
|
||||||
|
|
||||||
def prevs(self, filter_loc: Union[tuple, str] = '',
|
def prevs(self, filter_loc: Union[tuple, str] = '',
|
||||||
timeout: float = 0,
|
timeout: float = 0,
|
||||||
ele_only: bool = True) -> List[Union[ChromiumElement, ChromiumFrame, str]]: ...
|
ele_only: bool = True) -> List[Union[ChromiumElement, str]]: ...
|
||||||
|
|
||||||
def nexts(self, filter_loc: Union[tuple, str] = '',
|
def nexts(self, filter_loc: Union[tuple, str] = '',
|
||||||
timeout: float = 0,
|
timeout: float = 0,
|
||||||
ele_only: bool = True) -> List[Union[ChromiumElement, ChromiumFrame, str]]: ...
|
ele_only: bool = True) -> List[Union[ChromiumElement, str]]: ...
|
||||||
|
|
||||||
def befores(self, filter_loc: Union[tuple, str] = '',
|
def befores(self, filter_loc: Union[tuple, str] = '',
|
||||||
timeout: float = None,
|
timeout: float = None,
|
||||||
ele_only: bool = True) -> List[Union[ChromiumElement, ChromiumFrame, str]]: ...
|
ele_only: bool = True) -> List[Union[ChromiumElement, str]]: ...
|
||||||
|
|
||||||
def afters(self, filter_loc: Union[tuple, str] = '',
|
def afters(self, filter_loc: Union[tuple, str] = '',
|
||||||
timeout: float = None,
|
timeout: float = None,
|
||||||
ele_only: bool = True) -> List[Union[ChromiumElement, ChromiumFrame, str]]: ...
|
ele_only: bool = True) -> List[Union[ChromiumElement, str]]: ...
|
||||||
|
|
||||||
def get_screenshot(self, path: [str, Path] = None,
|
def get_screenshot(self, path: [str, Path] = None,
|
||||||
as_bytes: [bool, str] = None,
|
as_bytes: [bool, str] = None,
|
||||||
|
@ -36,7 +36,7 @@ class WebPageTab(SessionPage, ChromiumTab):
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
loc_or_str: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
||||||
timeout: float = None) -> Union[ChromiumElement, SessionElement, ChromiumFrame, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, SessionElement]: ...
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self) -> Union[str, None]: ...
|
def url(self) -> Union[str, None]: ...
|
||||||
@ -96,11 +96,11 @@ class WebPageTab(SessionPage, ChromiumTab):
|
|||||||
|
|
||||||
def ele(self,
|
def ele(self,
|
||||||
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
||||||
timeout: float = None) -> Union[ChromiumElement, SessionElement, ChromiumFrame, str, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, SessionElement, str]: ...
|
||||||
|
|
||||||
def eles(self,
|
def eles(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> List[Union[ChromiumElement, SessionElement, ChromiumFrame, str]]: ...
|
timeout: float = None) -> List[Union[ChromiumElement, SessionElement, str]]: ...
|
||||||
|
|
||||||
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
||||||
-> Union[SessionElement, str, None]: ...
|
-> Union[SessionElement, str, None]: ...
|
||||||
|
@ -108,7 +108,7 @@ def str_to_loc(loc):
|
|||||||
elif loc.startswith(('css:', 'css=')) and loc not in ('css:', 'css='):
|
elif loc.startswith(('css:', 'css=')) and loc not in ('css:', 'css='):
|
||||||
loc_by = 'css selector'
|
loc_by = 'css selector'
|
||||||
loc_str = loc[4:]
|
loc_str = loc[4:]
|
||||||
elif loc.startswith(('c:', 'c=')) and loc not in ('c:', 'cx='):
|
elif loc.startswith(('c:', 'c=')) and loc not in ('c:', 'c='):
|
||||||
loc_by = 'css selector'
|
loc_by = 'css selector'
|
||||||
loc_str = loc[2:]
|
loc_str = loc[2:]
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class WebPage(SessionPage, ChromiumPage, BasePage):
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
loc_or_str: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
||||||
timeout: float = None) -> Union[ChromiumElement, SessionElement, ChromiumFrame, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, SessionElement]: ...
|
||||||
|
|
||||||
# -----------------共有属性和方法-------------------
|
# -----------------共有属性和方法-------------------
|
||||||
@property
|
@property
|
||||||
@ -107,11 +107,11 @@ class WebPage(SessionPage, ChromiumPage, BasePage):
|
|||||||
|
|
||||||
def ele(self,
|
def ele(self,
|
||||||
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, SessionElement],
|
||||||
timeout: float = None) -> Union[ChromiumElement, SessionElement, ChromiumFrame, str, None]: ...
|
timeout: float = None) -> Union[ChromiumElement, SessionElement, str]: ...
|
||||||
|
|
||||||
def eles(self,
|
def eles(self,
|
||||||
loc_or_str: Union[Tuple[str, str], str],
|
loc_or_str: Union[Tuple[str, str], str],
|
||||||
timeout: float = None) -> List[Union[ChromiumElement, SessionElement, ChromiumFrame, str]]: ...
|
timeout: float = None) -> List[Union[ChromiumElement, SessionElement, str]]: ...
|
||||||
|
|
||||||
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
def s_ele(self, loc_or_ele: Union[Tuple[str, str], str] = None) \
|
||||||
-> Union[SessionElement, str, None]: ...
|
-> Union[SessionElement, str, None]: ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user