def is_finished(self):
self.wait.until(EC.frame_to_be_available_and_switch_to_it(
(By.TAG_NAME, "iframe")))
self.wait.until(EC.visibility_of_element_located(
(By.TAG_NAME, "iframe")))
# self.driver.implicitly_wait(10)
time.sleep(2)
self.driver.switch_to_default_content()
vcode_path = './main.png'
vcode_out_path = './main-cut.png'
self.driver.save_screenshot(vcode_path)
cut_vcode(vcode_path, vcode_out_path, 165, 265, 182, 274)
RGB = get_color(vcode_out_path)
if RGB == (110, 162, 47):
return True
elif RGB == (248, 179, 0):
return False
else:
print(RGB)
exit()
评论列表
文章目录