mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修复一个cookies问题; 元素被覆盖时states.is_covered返回覆盖元素id; click()by_js默认改为False; 修复html带xml描述时SessionPage报错问题; get()逻辑避免浏览器自动重试; 删除set.cookie(); 增加set.cookies.clear()和set.cookies.remove(); set.cookies()可接收单个cookie; 修复select问题; ChromiumDriver改为Driver
28 lines
851 B
Python
28 lines
851 B
Python
# -*- coding:utf-8 -*-
|
|
"""
|
|
@Author : g1879
|
|
@Contact : g1879@qq.com
|
|
"""
|
|
from typing import Union, Optional
|
|
|
|
from .._elements.chromium_element import ChromiumElement
|
|
|
|
|
|
class Clicker(object):
|
|
def __init__(self, ele: ChromiumElement):
|
|
self._ele: ChromiumElement = ...
|
|
|
|
def __call__(self, by_js: Optional[bool] = False, timeout: float = 1.5, wait_stop: bool = True) -> bool: ...
|
|
|
|
def left(self, by_js: Optional[bool] = False, timeout: float = 1.5, wait_stop: bool = True) -> bool: ...
|
|
|
|
def right(self) -> None: ...
|
|
|
|
def middle(self) -> None: ...
|
|
|
|
def at(self, offset_x: float = None, offset_y: float = None, button: str = 'left', count: int = 1) -> None: ...
|
|
|
|
def multiple(self, times: int = 2) -> None: ...
|
|
|
|
def _click(self, client_x: float, client_y: float, button: str = 'left', count: int = 1) -> None: ...
|