提交 c58d5974 编写于 作者: 泰斯特Test's avatar 泰斯特Test

fix bug

上级 73e9d163
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="violent-webdriver",
version="1.0.8",
version="1.0.9",
author="Yuyi Shao",
author_email="523314409@qq.com",
description="violent webdriver based on selenium",
......
......@@ -453,6 +453,17 @@ class violent_chromedriver(webdriver.Chrome):
except WebDriverException:
time.sleep(attempt_interval)
continue
if 'class' in key:
for i in range(0, attempt_num):
try:
text = self.find_element_by_class_name(value).text
if not text.strip() == '':
return text
else:
continue
except WebDriverException:
time.sleep(attempt_interval)
continue
if locate_rule.items().__len__() == 2:
key_list = []
for key in locate_rule.keys():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册