From 480ecc101fda4b7e306082f46b502b430ac40d40 Mon Sep 17 00:00:00 2001 From: g1879 Date: Thu, 26 Nov 2020 17:26:55 +0800 Subject: [PATCH] =?UTF-8?q?ele()=E5=8E=BB=E6=8E=89=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0//=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/driver_page.py | 4 ++-- DrissionPage/session_page.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DrissionPage/driver_page.py b/DrissionPage/driver_page.py index dd3b18c..2560dd3 100644 --- a/DrissionPage/driver_page.py +++ b/DrissionPage/driver_page.py @@ -149,8 +149,8 @@ class DriverPage(object): raise ValueError("Len of loc_or_ele must be 2 when it's a tuple.") loc_or_ele = translate_loc(loc_or_ele) - if loc_or_ele[0] == 'xpath' and not loc_or_ele[1].startswith(('/', '(')): - loc_or_ele = loc_or_ele[0], f'//{loc_or_ele[1]}' + # if loc_or_ele[0] == 'xpath' and not loc_or_ele[1].startswith(('/', '(')): + # loc_or_ele = loc_or_ele[0], f'//{loc_or_ele[1]}' # 接收到DriverElement对象直接返回 elif isinstance(loc_or_ele, DriverElement): diff --git a/DrissionPage/session_page.py b/DrissionPage/session_page.py index 1779ee2..a0c3c5e 100644 --- a/DrissionPage/session_page.py +++ b/DrissionPage/session_page.py @@ -108,8 +108,8 @@ class SessionPage(object): loc_or_ele = translate_loc(loc_or_ele) - if loc_or_ele[0] == 'xpath' and not loc_or_ele[1].startswith(('/', '(')): - loc_or_ele = loc_or_ele[0], f'//{loc_or_ele[1]}' + # if loc_or_ele[0] == 'xpath' and not loc_or_ele[1].startswith(('/', '(')): + # loc_or_ele = loc_or_ele[0], f'//{loc_or_ele[1]}' elif isinstance(loc_or_ele, SessionElement): return loc_or_ele