from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By import time class page_sign_and_send_assign(): button_next_step_xpath = "//*[@id='__next']/div/div[1]/div[2]/div[4]" documemt_xpath = "//*[@id='pageContainer1']/div[2]/div" item_radio_button_xpath = "//*[@id='__next']/div/div[2]/div[1]/div/div[2]/div[5]" button_finish_id = "Edit-Field-Send-SignYourself" def __init__(self,driver,wait): self.driver = driver self.wait = wait def wait_radio_button_item(self): self.wait.until(EC.element_to_be_clickable((By.XPATH, self.item_radio_button_xpath))) def click_radio_button_item(self): self.driver.find_element_by_xpath(self.item_radio_button_xpath).click() def wait_document(self): self.wait.until(EC.element_to_be_clickable((By.XPATH, self.documemt_xpath))) def click_document(self): self.driver.find_element_by_xpath(self.documemt_xpath).click() def wait_next_step_button(self): self.wait.until(EC.element_to_be_clickable((By.XPATH, self.button_next_step_xpath))) def click_next_step_button(self): self.driver.find_element_by_xpath(self.button_next_step_xpath).click() def wait_finish_button(self): self.wait.until(EC.element_to_be_clickable((By.ID, self.button_finish_id))) def click_finish_button(self): self.driver.find_element_by_id(self.button_finish_id).click()