207 lines
4.7 KiB
Python

# -*- coding:utf-8 -*-
"""
@Author : g1879
@Contact : g1879@qq.com
@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved.
@License : BSD 3-Clause.
"""
from typing import Union, List, Optional, Iterable
from .._base.base import BaseParser
from .._elements.chromium_element import ChromiumElement
def get_eles(locators: Union[List[str], tuple],
owner: BaseParser,
any_one: bool = False,
first_ele: bool = True,
timeout: float = 10) -> dict: ...
class ElementsList(list):
_page = ...
_filter: Optional[Filter] = ...
_filter_one: Optional[FilterOne] = ...
_getter: Optional[Getter] = ...
@property
def filter(self) -> Filter: ...
@property
def filter_one(self) -> FilterOne: ...
@property
def get(self) -> Getter: ...
def search(self,
get_all: bool = False,
displayed: Optional[bool] = None,
checked: Optional[bool] = None,
selected: Optional[bool] = None,
enabled: Optional[bool] = None,
clickable: Optional[bool] = None,
have_rect: Optional[bool] = None,
have_text: Optional[bool] = None) -> Union[ElementsList, ChromiumElement]: ...
def __next__(self) -> ChromiumElement: ...
class BaseFilter(object):
_list: ElementsList = ...
def __init__(self, _list: ElementsList): ...
def displayed(self): ...
def hidden(self): ...
def checked(self): ...
def not_checked(self): ...
def selected(self): ...
def not_selected(self): ...
def enabled(self): ...
def disabled(self): ...
def clickable(self): ...
def not_clickable(self): ...
def have_rect(self): ...
def no_rect(self): ...
# def have_text(self): ...
def style(self, name: str, value: str): ...
def property(self,
name: str,
value: str): ...
def attr(self, name: str, value: str): ...
def _get_attr(self,
name: str,
value: str,
method: str): ...
def _any_state(self, name: str, is_not: bool = False): ...
class Filter:
_list: ElementsList = ...
def __init__(self, _list: ElementsList): ...
def __iter__(self) -> Iterable[ChromiumElement]: ...
def __next__(self) -> ChromiumElement: ...
@property
def get(self) -> Getter: ...
def displayed(self) -> Filter: ...
def hidden(self) -> Filter: ...
def checked(self) -> Filter: ...
def not_checked(self) -> Filter: ...
def selected(self) -> Filter: ...
def not_selected(self) -> Filter: ...
def enabled(self) -> Filter: ...
def disabled(self) -> Filter: ...
def clickable(self) -> Filter: ...
def not_clickable(self) -> Filter: ...
def have_rect(self) -> Filter: ...
def no_rect(self) -> Filter: ...
def have_text(self) -> Filter: ...
def style(self, name: str, value: str) -> Filter: ...
def property(self,
name: str,
value: str) -> Filter: ...
def attr(self, name: str, value: str) -> Filter: ...
def _get_attr(self,
name: str,
value: str,
method: str) -> Filter: ...
def _any_state(self, name: str, is_not: bool = False) -> Filter: ...
class FilterOne(BaseFilter):
_list: ElementsList = ...
def __init__(self, _list: ElementsList): ...
def displayed(self) -> ChromiumElement: ...
def hidden(self) -> ChromiumElement: ...
def checked(self) -> ChromiumElement: ...
def not_checked(self) -> ChromiumElement: ...
def selected(self) -> ChromiumElement: ...
def not_selected(self) -> ChromiumElement: ...
def enabled(self) -> ChromiumElement: ...
def disabled(self) -> ChromiumElement: ...
def clickable(self) -> ChromiumElement: ...
def not_clickable(self) -> ChromiumElement: ...
def have_rect(self) -> ChromiumElement: ...
def no_rect(self) -> ChromiumElement: ...
def have_text(self) -> ChromiumElement: ...
def style(self, name: str, value: str) -> ChromiumElement: ...
def property(self,
name: str,
value: str) -> ChromiumElement: ...
def attr(self, name: str, value: str) -> ChromiumElement: ...
def _get_attr(self,
name: str,
value: str,
method: str) -> ChromiumElement: ...
def _any_state(self, name: str, is_not: bool = False) -> ChromiumElement: ...
class Getter(object):
_list: ElementsList = ...
def __init__(self, _list: ElementsList): ...
def links(self) -> list: ...
def texts(self) -> list: ...
def attrs(self, name) -> list: ...