我想知道是否有任何方法记录运行时我的页面在命令提示符下刷新的次数。你知道吗
希望它告诉我它刷新的次数。刷新位于while true:和continue之间。谢谢
driver = webdriver.Chrome(chrome_path)
driver.get(link)
while True:
size = driver.find_elements_by_xpath(".//*[@id='atg_store_picker']/div/div[2]/div[1]/div[1]/span[2]/a[4]")
if len(size) <= 0:
time.sleep(0.5)
print "PAGE NOT LIVE"
driver.refresh()
continue
else:`enter code here`
print 'LIVE!!!!'
break
我的问题答案很简单。。。你知道吗
相关问题 更多 >
编程相关推荐