g1879 c07d90195d 4.0.4(+)
prop()改成property(),参数改为name;
get_src()改为src();
get_cookies()方法改成cookies();
删除cookies属性;
get_session_storage()、get_local_storage()改成session_storage()、local_storage();
pageLoad改成page_load;
set_a_header()、remove_a_header()、set.header()、set.attr()的参数改为name;
元素增加value属性和set.value()方法;
loc_or_ele、loc_or_str等改为locator;
提高截图jpg格式画质;
修复s模式timeout参数失效问题;
修复wait.has_rect()等出现的问题;
修复找不到浏览器路径时报ini错误问题
增加一些提示
2024-01-27 14:40:11 +08:00

74 lines
2.6 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, Tuple, List
from .._elements.chromium_element import ChromiumElement
class SelectElement(object):
def __init__(self, ele: ChromiumElement):
self._ele: ChromiumElement = ...
def __call__(self, text_or_index: Union[str, int, list, tuple], timeout: float = None) -> bool: ...
@property
def is_multi(self) -> bool: ...
@property
def options(self) -> List[ChromiumElement]: ...
@property
def selected_option(self) -> Union[ChromiumElement, None]: ...
@property
def selected_options(self) -> List[ChromiumElement]: ...
def clear(self) -> None: ...
def all(self) -> None: ...
def by_text(self, text: Union[str, list, tuple], timeout: float = None) -> bool: ...
def by_value(self, value: Union[str, list, tuple], timeout: float = None) -> bool: ...
def by_index(self, index: Union[int, list, tuple], timeout: float = None) -> bool: ...
def by_locator(self, locator: Union[Tuple[str, str], str], timeout: float = None) -> bool: ...
def by_option(self, option: Union[ChromiumElement, List[ChromiumElement], Tuple[ChromiumElement]]) -> None: ...
def cancel_by_text(self, text: Union[str, list, tuple], timeout: float = None) -> bool: ...
def cancel_by_value(self, value: Union[str, list, tuple], timeout: float = None) -> bool: ...
def cancel_by_index(self, index: Union[int, list, tuple], timeout: float = None) -> bool: ...
def cancel_by_locator(self, locator: Union[Tuple[str, str], str], timeout: float = None) -> bool: ...
def cancel_by_option(self,
option: Union[ChromiumElement, List[ChromiumElement], Tuple[ChromiumElement]]) -> None: ...
def invert(self) -> None: ...
def _by_loc(self, loc: Union[str, Tuple[str, str]], timeout: float = None, cancel: bool = False) -> bool: ...
def _select(self,
condition: Union[str, int, list, tuple] = None,
para_type: str = 'text',
cancel: bool = False,
timeout: float = None) -> bool: ...
def _text_value(self, condition: Union[list, set], para_type: str, mode: str, timeout: float) -> bool: ...
def _index(self, condition: set, mode: str, timeout: float) -> bool: ...
def _select_options(self, option: Union[ChromiumElement, List[ChromiumElement], Tuple[ChromiumElement]],
mode: str) -> None: ...
def _dispatch_change(self) -> None: ...