attempts=0
while attempts<2:
try:
ywbh_text = self.getElement(self.driver, '//*[@id="board_data"]/tbody/tr[1]/td[2]')
ywbh_text.click()
config.zscjhbgbz_ywbh = ywbh_text.text
print("保存业务编号:"+ywbh_text.text+"到conf中 zscjhbgbz_ywbh!")
print("选中第一条数据")
break
except StaleElementReferenceException:
attempts += 1
selenium控制控件出现StaleElementReferenceException
最新推荐文章于 2024-05-20 19:46:49 发布