BUY-HW
BUY-HW copied to clipboard
请教几个问题
是不是不能用了,伪元素哪里怎么改?
遇到网不好用的时候会一直跑不下去,可以通过设置超时来解决:
# 设置页面最大加载时间
driver.set_page_load_timeout(10)
try:
driver.get(self.base_url)
except TimeoutException:
print '!!!!!!time out after 10 seconds when loading page!!!!!!'
# 当页面加载时间超过设定时间,通过js来stop,即可执行后续动作
driver.execute_script("window.stop()")