Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created September 6, 2022 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SarahElson/31261a9fb5b99ba4323b32cff375966d to your computer and use it in GitHub Desktop.
Save SarahElson/31261a9fb5b99ba4323b32cff375966d to your computer and use it in GitHub Desktop.
Playwright Python Tutorial
import sys
sys.path.append(sys.path[0] + "/..")
from testScripts.parallelSignup import Register
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
try:
playwright = Register(playwright)
playwright.launchWeb()
playwright.fillFirstName("Idowu")
playwright.fillLastName("Omisola")
playwright.fillEmail("some7gmail@gmail.com")
playwright.fillPhone("08122334433")
playwright.fillPassword("mypassword")
playwright.confirmPassword("mypassword")
playwright.subscribe()
playwright.acceptPolicy()
playwright.submit()
playwright.continueToDashboard()
playwright.getSuccessStatus()
except Exception as err:
playwright.getFailedStatus()
playwright.closeBrowser()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment