page_sign_and_send_prepare.py 911 B

12345678910111213141516171819202122
  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_prepare():
  5. button_upload_pdf_xpath = "//*[@id='__next']/div/div[2]/div[1]/div/div/div/div/input"
  6. button_next_step_xpath = "//*[@id='__next']/div/div[1]/div[2]/div[4]"
  7. def __init__(self,driver,wait):
  8. self.driver = driver
  9. self.wait = wait
  10. def wait_pdf_button(self,time_length):
  11. time.sleep(time_length)
  12. def upload_pdf_button(self,pdf_path):
  13. upload_element = self.driver.find_element_by_xpath(self.button_upload_pdf_xpath)
  14. upload_element.send_keys(pdf_path)
  15. def wait_next_step_button(self):
  16. self.wait.until(EC.element_to_be_clickable((By.XPATH, self.button_next_step_xpath)))
  17. def click_next_step_button(self):
  18. self.driver.find_element_by_xpath(self.button_next_step_xpath).click()