123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- import page_official
- import page_login
- import page_main
- import page_sign_and_send_prepare
- import page_sign_and_send_assign
- import page_task
- import mattermost
- import os, time
- from selenium import webdriver
- from selenium.webdriver.support.ui import WebDriverWait
- mattermost = mattermost.mattermost(driver, flag_report)
- flag_report = Truepdf_path = os.getcwd() + "/test.pdf"
- email = SECRET_EMAIL
- password = SECRET_PASSWORD
- driver = webdriver.Chrome()
- wait = WebDriverWait(driver, 60)
- baseURL = "https://www.dottedsign.com/"
- driver.get(baseURL)
- try:
- official = page_official.page_official(driver, wait)
- official.wait_sign_in_button()
- official.click_sign_in_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 1: Official Page", error_message)
- try:
- login = page_login.page_login(driver, wait)
- login.wait_email_textbox()
- login.input_email_textbox(email)
- login.wait_1st_next_step_button()
- login.click_1st_next_step_button()
- login.wait_password_textbox()
- login.input_password_textbox(password)
- login.wait_2nd_next_step_button()
- login.click_2nd_next_step_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 2: Login Page", error_message)
- try:
- main = page_main.page_main(driver,wait)
- main.wait_purple_circle()
- main.click_purple_circle()
- main.wait_sign_yourself_button()
- main.click_sign_yourself_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 3: Main Page", error_message)
- try:
- sign_and_send_prepare = page_sign_and_send_prepare.page_sign_and_send_prepare(driver,wait)
- sign_and_send_prepare.wait_pdf_button(3)
- sign_and_send_prepare.upload_pdf_button(pdf_path)
- sign_and_send_prepare.wait_next_step_button()
- sign_and_send_prepare.click_next_step_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 4: Sign and Send Prepare Page", error_message)
- try:
- sign_and_send_assign = page_sign_and_send_assign.page_sign_and_send_assign(driver,wait)
- sign_and_send_assign.check_the_introdcution_of_new_function()
- sign_and_send_assign.wait_radio_button_item()
- sign_and_send_assign.click_radio_button_item()
-
- sign_and_send_assign.wait_document()
- sign_and_send_assign.click_document()
- sign_and_send_assign.wait_next_step_button()
- sign_and_send_assign.click_next_step_button()
- sign_and_send_assign.wait_finish_button()
- sign_and_send_assign.click_finish_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 5: Sign and Send Assign Page", error_message)
- try:
- task = page_task.page_task(driver, wait)
- task.wait_back_to_main_button()
- task.click_back_to_main_button()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 6: Task Page", error_message)
- try:
- main.wait_completed_tab()
- main.click_completed_tab()
-
- main.wait_latest_task_option()
- main.click_latest_task_option()
- mattermost.reprort_success()
- except Exception as error_message:
- flag_report = mattermost.reporter_error("Step 7: Main Page: (Final Step)", error_message)
|