Skip to content

Commit

Permalink
login_screen_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubiksman78 committed Feb 3, 2023
1 parent ea87024 commit 7ae683d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ def first_start(context):
page.fill("input#username",USERNAME,timeout=5000)
page.fill("input#password",PASSWORD,timeout=5000)
page.click("button[type=submit]")
#page.wait_for_timeout(1000)
page.wait_for_load_state("networkidle")
if not page.is_visible('[class="nav-icon-text-desktop text-wrap"]'):
print("Something is wrong, captcha or wrong ids, try again with debug mode")
page.wait_for_selector('[class="nav-icon-text-desktop text-wrap"]',timeout=50000)
page.wait_for_load_state("networkidle")
context.storage_state(path="storage.json")
return page
Expand Down

0 comments on commit 7ae683d

Please sign in to comment.