Skip to content

Instantly share code, notes, and snippets.

@rahulmr
Forked from SarahElson/singleSignupRun.py
Created September 28, 2022 15:47
Show Gist options
  • Save rahulmr/43ffaaa34f0abc6555e6ceb484d778f0 to your computer and use it in GitHub Desktop.
Save rahulmr/43ffaaa34f0abc6555e6ceb484d778f0 to your computer and use it in GitHub Desktop.
Playwright Python Tutorial: Getting Started With Python End To End Testing
import sys
sys.path.append(sys.path[0] + "/..")
from testScripts.singleSignupScript 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("[email protected]")
playwright.fillPhone("08122334433")
playwright.fillPassword("mypassword")
playwright.confirmPassword("mypassword")
playwright.subscribe()
playwright.acceptPolicy()
playwright.submit()
playwright.continueToDashboard()
playwright.getSuccessStatus()
except:
playwright.getFailedStatus()
playwright.closeBrowser()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment