def select_random_option_to_vote(self): driver = self.driver wait_for_element(driver, (By.CSS_SELECTOR, vote_list_on_vote_now_page_by_css), timeout=60) click_element(driver, (By.CSS_SELECTOR, vote_list_on_vote_now_page_by_css))
def click_take_me_to_gmail(self): click_element(self.driver, (By.XPATH, take_me_to_gmail_by_xpath)) try: click_element(self.driver, (By.XPATH, ok_button_by_xpath), 10) # hard code 8 seconds for flake issue - have to wait the added email account appear time.sleep(8) click_element(self.driver, (By.XPATH, take_me_to_gmail_by_xpath), 10) # hard code for flake issue - have to wait for 1 second time.sleep(1) except TimeoutException as e: print(e)
def click_vote_button(self): driver = self.driver click_element(driver, (By.XPATH, vote_button_by_xpath))
def open_main_menu(self): click_element(self.driver, (By.XPATH, main_menu_xpath))
def click_ok_in_inbox_page(self): click_element(self.driver, (By.XPATH, ok_button_xpath))
def click_accept_button(self): click_element(self.driver, (By.XPATH, accept_button_by_xpath))
def click_more_button(self): click_element(self.driver, (By.XPATH, more_button_by_xpath))
def click_i_agree_button(self): click_element(self.driver, (By.XPATH, i_agree_button_by_xpath))
def fill_in_password(self, passwd): wait_for_element(self.driver, (By.ID, passwd_field_by_id)) self.driver.find_element_by_id(passwd_field_by_id).send_keys(passwd) click_element(self.driver, (By.ID, passwd_next_button_by_id))
def fill_in_email(self, account): wait_for_element(self.driver, (By.ID, email_field_by_id)) self.driver.find_element_by_id(email_field_by_id).send_keys(account) click_element(self.driver, (By.ID, email_next_button_by_id))