| | |
| | | """ |
| | | loading_count = 0 |
| | | |
| | | def answer_MAQ(self): |
| | | def answer(self): |
| | | # 暂停3秒 |
| | | time.sleep(3) |
| | | while True: |
| | |
| | | |
| | | # 提交按钮存在则点击 |
| | | if self.submit_btn_is_display(): |
| | | self.click(Answer.submit_btn) |
| | | self.click_js(Answer.submit_btn) |
| | | # 数据是否上传完成 |
| | | time.sleep(15) |
| | | if self.upload_is_success(): |
| | | return True |
| | | return False |
| | |
| | | 判断数据是否上传完成 |
| | | :return: |
| | | """ |
| | | try: |
| | | self.get_element_wait(Answer.upload_success_title) |
| | | return True |
| | | except TimeoutException: |
| | | return False |
| | | i = 0 |
| | | while i < 60: |
| | | try: |
| | | self.get_element_wait(Answer.upload_success_title) |
| | | return True |
| | | except TimeoutException: |
| | | i += 1 |
| | | time.sleep(1) |
| | | return False |
| | | |
| | | def submit_btn_is_display(self): |
| | | """ |