Created
March 26, 2023 14:47
-
-
Save mikeplavsky/53d9131023ce82e9dc5a54d7be913caf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rom playwright.sync_api import Playwright, sync_playwright, expect | |
import time | |
import json | |
import os | |
def run(playwright: Playwright) -> None: | |
browser = playwright.chromium.launch(headless=False) | |
context = browser.new_context() | |
page = context.new_page() | |
page.goto("https://ais.usvisa-info.com/en-ca/niv/users/sign_in") | |
page.get_by_label("Email *").fill("") | |
page.get_by_label("Password").fill("") | |
page.locator("label:has-text(\"I have read and understood the Privacy Policy and the Terms of Use\") div").click() | |
page.get_by_role("button", name="Sign In").click() | |
page.wait_for_url("https://ais.usvisa-info.com/en-ca/niv/groups/32338602") | |
page.get_by_role("link", name="Continue").click() | |
page.wait_for_url("https://ais.usvisa-info.com/en-ca/niv/schedule/44351853/continue_actions") | |
page.get_by_role("tab", name=" Reschedule Appointment").click() | |
page.get_by_role("link", name="Reschedule Appointment").click() | |
page.wait_for_url("https://ais.usvisa-info.com/en-ca/niv/schedule/44351853/appointment") | |
page.get_by_label("Date of Appointment\n*").click() | |
with sync_playwright() as playwright: | |
run(playwright) | |
import time | |
time.sleep(60 * 60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To get quickly to appointments page, good for periodical check