Browse Source

Readme Update

鄭中嘉 4 năm trước cách đây
mục cha
commit
f37e3ad162
2 tập tin đã thay đổi với 10 bổ sung11 xóa
  1. 3 5
      Readme.md
  2. 7 6
      tests/test_sign_yourself.py

+ 3 - 5
Readme.md

@@ -1,9 +1,7 @@
 # 概述:
-這是用 Python 配合上 Unittest 的專案
+Design Pattern 為 PageObjects
 
-Design Pattern 一樣也是 PageObjects,是個方便 maintain 程式碼的好工具!
-
-在 lambda 上預計會微調,結果不會用到 unittest 不過 PageObjects 會繼續使用
+Tests/test_sign_yourself 裡面,每一個try包含在特定頁面會執行的動作,若有誤發生則會在 except觸發mattermost的通知。
 
 # 相關命名規則:
 ## 檔案名稱
@@ -39,4 +37,4 @@ Design Pattern 一樣也是 PageObjects,是個方便 maintain 程式碼的好
 
      B 其描述,和 locator的描述一致,假設我們要點選 button_circle_id,那就會是 click_circle_button
      
-     C 操作對象(locator)的屬性,會和 locator的 A 一樣
+     C 操作對象(locator)的屬性,會和 locator 的 A 一樣

+ 7 - 6
tests/test_sign_yourself.py

@@ -9,15 +9,16 @@ import os, time
 from selenium import webdriver
 from selenium.webdriver.support.ui import WebDriverWait
 
-pdf_path = os.getcwd() + "/test.pdf"
-baseURL = "https://www.dottedsign.com/"
-email = "eric.cheng@kdanmobile.com"
-password = "ratherwoman5796"
+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)
-flag_report = True
-mattermost = mattermost.mattermost(driver, flag_report)
 
 try:
     official = page_official.page_official(driver, wait)