Skip to content

Commit

Permalink
打卡时间修改,点两次确认
Browse files Browse the repository at this point in the history
  • Loading branch information
xiong233 committed May 15, 2022
1 parent f7e9860 commit 8a9f84f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: DailyReport
on:
# Triggers the workflow on push or pull request events but only for the main branch
schedule:
- cron: "22 2 * * *"
# 10:22开始执行
- cron: "22 1 * * *"
# 9:22开始执行
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@ def main():
page.wait_for_timeout(1000)
page.locator(confirm_button).wait_for(timeout=10000)
page.click(confirm_button)
try:
page.click(confirm_button, timeout=3001)
except Exception as e:
print("Second click no need for", e)
print("Confirm OK ", time() - logtime)
page.wait_for_timeout(1000)
page.wait_for_timeout(3000)
browser.close()
print("Successfully reported")

Expand Down

0 comments on commit 8a9f84f

Please sign in to comment.