mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
微调
This commit is contained in:
parent
54ee00f4b0
commit
d2bf4f8f13
@ -359,7 +359,8 @@ class ChromiumElement(DrissionElement):
|
|||||||
:param timeout: 超时时间(秒),为None使用所在页面设置
|
:param timeout: 超时时间(秒),为None使用所在页面设置
|
||||||
:return: 元素对象
|
:return: 元素对象
|
||||||
"""
|
"""
|
||||||
if locator and not locator.startswith(('x:', 'xpath:', 'x=', 'xpath=', 'c:', 'css:', 'c=', 'css=')):
|
if locator and not (isinstance(locator, str) and not locator.startswith(
|
||||||
|
('x:', 'xpath:', 'x=', 'xpath=', 'c:', 'css:', 'c=', 'css='))):
|
||||||
raise ValueError('locator参数只能是str格式且不支持xpath和css形式。')
|
raise ValueError('locator参数只能是str格式且不支持xpath和css形式。')
|
||||||
|
|
||||||
if x == y is None:
|
if x == y is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user