diff --git a/AI/Ylt/Upload.py b/AI/Ylt/Upload.py index 99f99eb0..c7178bd7 100644 --- a/AI/Ylt/Upload.py +++ b/AI/Ylt/Upload.py @@ -227,12 +227,18 @@ def changeJieMu(page): # 排程 -def paiCheng(page, keyword): +def paiCheng(page, keyword, stHour, stMin, stSec, endHour, endMin, endSec): pc_library = page.get_by_text("排程").nth(0) pc_library.click() # 等待 wait() + # 定位目标 元素 + today_span = page.locator("span.mat-button-toggle-label-content", has_text="日") + today_span.click() + # 等待 + wait() + # 定位目标 元素 add_icon = page.locator("mat-icon", has_text="add").nth(1) @@ -295,9 +301,9 @@ def paiCheng(page, keyword): minute_input = page.locator("input.owl-dt-timer-input").nth(1) # 第二个输入框(分钟) second_input = page.locator("input.owl-dt-timer-input").nth(2) # 第三个输入框(秒) # 输入时间 - hour_input.fill("12") # 输入小时 - minute_input.fill("00") # 输入分钟 - second_input.fill("00") # 输入秒 + hour_input.fill(stHour) # 输入小时 + minute_input.fill(stMin) # 输入分钟 + second_input.fill(stSec) # 输入秒 # 等待 wait() @@ -316,9 +322,9 @@ def paiCheng(page, keyword): minute_input = page.locator("input.owl-dt-timer-input").nth(1) # 第二个输入框(分钟) second_input = page.locator("input.owl-dt-timer-input").nth(2) # 第三个输入框(秒) # 输入时间 - hour_input.fill("13") # 输入小时 - minute_input.fill("01") # 输入分钟 - second_input.fill("00") # 输入秒 + hour_input.fill(endHour) # 输入小时 + minute_input.fill(endMin) # 输入分钟 + second_input.fill(endSec) # 输入秒 # 定位