一般获取元素方法取消ChromiumFrame提示

This commit is contained in:
g1879 2023-03-23 23:57:35 +08:00
parent eea09117fc
commit 00db0af61a
6 changed files with 25 additions and 25 deletions

View File

@ -69,7 +69,7 @@ class ChromiumBase(BasePage):
def _set_runtime_settings(self) -> None: ...
def __call__(self, loc_or_str: Union[Tuple[str, str], str, ChromiumElement],
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
timeout: float = None) -> ChromiumElement: ...
@property
def title(self) -> str: ...
@ -146,11 +146,11 @@ class ChromiumBase(BasePage):
def ele(self,
loc_or_ele: Union[Tuple[str, str], str, ChromiumElement, ChromiumFrame],
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
timeout: float = None) -> ChromiumElement: ...
def eles(self,
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) \
-> Union[SessionElement, str, NoneElement]: ...

View File

@ -40,7 +40,7 @@ class ChromiumElement(DrissionElement):
def __call__(self,
loc_or_str: Union[Tuple[str, str], str],
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, str, None]: ...
timeout: float = None) -> Union[ChromiumElement, str, None]: ...
@property
def tag(self) -> str: ...
@ -159,11 +159,11 @@ class ChromiumElement(DrissionElement):
def ele(self,
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,
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]: ...
@ -247,7 +247,7 @@ class ChromiumShadowRoot(BaseElement):
def __call__(self,
loc_or_str: Union[Tuple[str, str], str],
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, None]: ...
timeout: float = None) -> ChromiumElement: ...
@property
def ids(self) -> Ids: ...
@ -292,11 +292,11 @@ class ChromiumShadowRoot(BaseElement):
def ele(self,
loc_or_str: Union[Tuple[str, str], str],
timeout: float = None) -> Union[ChromiumElement, ChromiumFrame, NoneElement]: ...
timeout: float = None) -> Union[ChromiumElement]: ...
def eles(self,
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]: ...

View File

@ -27,7 +27,7 @@ class ChromiumFrame(ChromiumBase):
def __call__(self,
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: ...
@ -118,38 +118,38 @@ class ChromiumFrame(ChromiumBase):
def prev(self, filter_loc: Union[tuple, str] = '',
index: int = 1,
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] = '',
index: int = 1,
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] = '',
index: int = 1,
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] = '',
index: int = 1,
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] = '',
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] = '',
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] = '',
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] = '',
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,
as_bytes: [bool, str] = None,

View File

@ -36,7 +36,7 @@ class WebPageTab(SessionPage, ChromiumTab):
def __call__(self,
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
def url(self) -> Union[str, None]: ...
@ -96,11 +96,11 @@ class WebPageTab(SessionPage, ChromiumTab):
def ele(self,
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,
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) \
-> Union[SessionElement, str, None]: ...

View File

@ -108,7 +108,7 @@ def str_to_loc(loc):
elif loc.startswith(('css:', 'css=')) and loc not in ('css:', 'css='):
loc_by = 'css selector'
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_str = loc[2:]

View File

@ -40,7 +40,7 @@ class WebPage(SessionPage, ChromiumPage, BasePage):
def __call__(self,
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
@ -107,11 +107,11 @@ class WebPage(SessionPage, ChromiumPage, BasePage):
def ele(self,
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,
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) \
-> Union[SessionElement, str, None]: ...