修改README

This commit is contained in:
g1879 2020-07-27 17:11:32 +08:00
parent d8bc4ebe1f
commit 296d6adb1d
2 changed files with 34 additions and 4 deletions

View File

@ -1245,15 +1245,30 @@ Parameter Description:
- attr - parameter name
- value - Parameter value
### drag
drag(x: int, y: int, speed: int = 40, shake: bool = True) -> bool
Drag the current element a certain distance, and return whether the drag is successful.
Parameter Description:
- x - Drag distance in x direction
- y - Drag distance in y direction
- speed - Drag speed
- shake - Random jitter
### drag_to
drag_to( ele_or_loc: Union[tuple, WebElement, DrissionElement]) -> bool
drag_to(ele_or_loc: Union[tuple, WebElement, DrissionElement], speed: int = 40, shake: bool = True) -> bool:
Drag the current element, the target is another element or coordinate tuple, and return whether the drag is successful.
Parameter Description:
- ele_or_loc - Another element or relative current position
- ele_or_loc - Another element or relative current position. The coordinates are the coordinates of the midpoint of the element.
- speed - Drag speed
- shake - Random jitter
### hover

View File

@ -1244,15 +1244,30 @@ driver模式的元素对象包装了一个WebElement对象并封装了常
- attr - 参数名
- value - 参数值
### drag
drag(x: int, y: int, speed: int = 40, shake: bool = True) -> bool
拖拽当前元素一段距离,返回是否拖拽成功。
参数说明:
- x - 拖拽x方向距离
- y - 拖拽y方向距离
- speed - 拖拽速度
- shake - 是否随机抖动
### drag_to
drag_to( ele_or_loc: Union[tuple, WebElement, DrissionElement]) -> bool
drag_to(ele_or_loc: Union[tuple, WebElement, DrissionElement], speed: int = 40, shake: bool = True) -> bool:
拖拽当前元素,目标为另一个元素或坐标元组,返回是否拖拽成功。
参数说明:
- ele_or_loc - 另一个元素或相对当前位置
- ele_or_loc - 另一个元素或相对当前位置,坐标为元素中点坐标。
- speed - 拖拽速度
- shake - 是否随机抖动
### hover