page_sign_and_send_assign.py 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. from selenium.webdriver.support import expected_conditions as EC
  2. from selenium.webdriver.common.by import By
  3. import time
  4. class page_sign_and_send_assign():
  5. button_next_step_xpath = "//*[@id='__next']/div/div[1]/div[2]/div[4]"
  6. documemt_xpath = "//*[@id='pageContainer1']/div[2]/div"
  7. item_radio_button_xpath = "//*[@id='__next']/div/div[2]/div[1]/div/div[2]/div[5]"
  8. button_finish_id = "Edit-Field-Send-SignYourself"
  9. def __init__(self,driver,wait):
  10. self.driver = driver
  11. self.wait = wait
  12. def wait_radio_button_item(self):
  13. self.wait.until(EC.element_to_be_clickable((By.XPATH, self.item_radio_button_xpath)))
  14. def click_radio_button_item(self):
  15. self.driver.find_element_by_xpath(self.item_radio_button_xpath).click()
  16. def wait_document(self):
  17. self.wait.until(EC.element_to_be_clickable((By.XPATH, self.documemt_xpath)))
  18. def click_document(self):
  19. self.driver.find_element_by_xpath(self.documemt_xpath).click()
  20. def wait_next_step_button(self):
  21. self.wait.until(EC.element_to_be_clickable((By.XPATH, self.button_next_step_xpath)))
  22. def click_next_step_button(self):
  23. self.driver.find_element_by_xpath(self.button_next_step_xpath).click()
  24. def wait_finish_button(self):
  25. self.wait.until(EC.element_to_be_clickable((By.ID, self.button_finish_id)))
  26. def click_finish_button(self):
  27. self.driver.find_element_by_id(self.button_finish_id).click()