mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
动作链的type()可接收list和tuple
This commit is contained in:
parent
10b3b392cf
commit
e241649a1d
@ -252,13 +252,14 @@ class ActionChains:
|
|||||||
|
|
||||||
def type(self, text):
|
def type(self, text):
|
||||||
"""输入文本
|
"""输入文本
|
||||||
:param text: 要输入的文本
|
:param text: 要输入的文本,特殊字符和多个文本可用list或tuple传入
|
||||||
:return: self
|
:return: self
|
||||||
"""
|
"""
|
||||||
for i in text:
|
for i in text:
|
||||||
self.key_down(i)
|
for character in i:
|
||||||
sleep(.05)
|
self.key_down(character)
|
||||||
self.key_up(i)
|
sleep(.05)
|
||||||
|
self.key_up(character)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def wait(self, second):
|
def wait(self, second):
|
||||||
|
@ -65,7 +65,7 @@ class ActionChains:
|
|||||||
|
|
||||||
def key_up(self, key: str) -> ActionChains: ...
|
def key_up(self, key: str) -> ActionChains: ...
|
||||||
|
|
||||||
def type(self, text: str) -> ActionChains: ...
|
def type(self, text: Union[str, list, tuple]) -> ActionChains: ...
|
||||||
|
|
||||||
def wait(self, second: float) -> ActionChains: ...
|
def wait(self, second: float) -> ActionChains: ...
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user