标签:xpath als while path sel from odi false time
s_flag = True time_start = time.time() while s_flag: doc = etree.HTML(unicode.encode(driver.page_source, encoding=‘utf-8‘)) from_list = doc.xpath("""//*[@id="ext-gen267"]/div""") if len(from_list) == 0: time_end = time.time() if int(time_end - time_start) > 15: # 超过 n 秒 没有 下拉框 ,不再等待 s_flag = False else: # 有下拉框 ,退出 循环 break
python selenuim如何判断下拉框是否加载出来,超过时间不再等待
标签:xpath als while path sel from odi false time
原文地址:https://www.cnblogs.com/angdh/p/10673309.html