mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
改进input()
This commit is contained in:
parent
6bd2f8bb28
commit
bf34208bed
@ -359,11 +359,10 @@ class DriverElement(DrissionElement):
|
|||||||
full_txt = full_txt.rstrip('\n')
|
full_txt = full_txt.rstrip('\n')
|
||||||
|
|
||||||
self.click(by_js=True)
|
self.click(by_js=True)
|
||||||
from selenium.webdriver import Keys
|
|
||||||
t1 = perf_counter()
|
t1 = perf_counter()
|
||||||
while self.is_valid() and self.attr('value') != full_txt and perf_counter() - t1 <= self.page.timeout:
|
while self.is_valid() and self.attr('value') != full_txt and perf_counter() - t1 <= self.page.timeout:
|
||||||
if clear:
|
if clear:
|
||||||
self.inner_ele.send_keys(Keys.CONTROL, 'a', Keys.DELETE) # 有些ui下clear()不生效
|
self.inner_ele.send_keys(u'\ue009', 'a', u'\ue017') # 有些ui下clear()不生效,用CTRL+a代替
|
||||||
self.inner_ele.send_keys(vals)
|
self.inner_ele.send_keys(vals)
|
||||||
|
|
||||||
if enter:
|
if enter:
|
||||||
|
2
setup.py
2
setup.py
@ -6,7 +6,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="DrissionPage",
|
name="DrissionPage",
|
||||||
version="2.0.0",
|
version="2.0.3",
|
||||||
author="g1879",
|
author="g1879",
|
||||||
author_email="g1879@qq.com",
|
author_email="g1879@qq.com",
|
||||||
description="A module that integrates selenium and requests session, encapsulates common page operations.",
|
description="A module that integrates selenium and requests session, encapsulates common page operations.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user