diff --git a/commandor_page.py b/commandor_page.py index 257eaec..d0ca498 100644 --- a/commandor_page.py +++ b/commandor_page.py @@ -174,7 +174,10 @@ class CommandorPage: def clickOnValidBtn(self): # self.page.mouse.wheel(0, random.randint(400, 500)) time.sleep(get_random_wait_time()) - self.page.evaluate("""document.getElementsByClassName("btn")[0].click();""") + self.page.evaluate("""document.getElementsByClassName("btn")[0].focus();""") + time.sleep(get_random_wait_time()) + self.page.evaluate(""" + document.getElementsByClassName("btn")[0].click();""") def clear_app_data(self): pass diff --git a/wait_for_sms.py b/wait_for_sms.py index c37420c..254ab35 100644 --- a/wait_for_sms.py +++ b/wait_for_sms.py @@ -13,7 +13,7 @@ from params import MODEM_POOL_PORTS, CARD_POOL_PORT from pojo.serial_modem import SerialModem from utils.excel_reader import ExcelHelper -OTP_TIMEOUT = 40 +OTP_TIMEOUT = 60 thread_event = None current_gsm_modem = None card_pool = CardPool(CARD_POOL_PORT) @@ -108,9 +108,9 @@ def start_waiting_sms(): if len(contact) > 0: modem.phone_number = contact[0].phone modem.contact = contact[0] - start_to_handle_sms(modem) - # else: - # print("not found, skip") + start_to_handle_sms(modem) + else: + print("contact not found, skip") except Exception as error: print(error) continue