Created
July 7, 2022 19:01
-
-
Save abdeljalil09/63aa8b86e9055ff119995899cddb6986 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
// @ts-check | |
import { firefox } from "playwright"; | |
const link = "https://sso.godaddy.com/"; | |
(async () => { | |
const browser = await firefox.launch({ | |
headless: false, | |
}); | |
const page = await browser.newPage(); | |
await page.setViewportSize({ | |
width: 1920, | |
height: 1080 , | |
}); | |
await page.goto(link, { waitUntil: "networkidle" }); | |
await page.fill("input[type='text']", "email"); | |
await page.waitForTimeout(1000); | |
await page.fill("input[type='password']", "pass"); | |
await page.waitForTimeout(1000); | |
await page.click("#submitBtn"); | |
await page.waitForTimeout(1000); | |
await page.screenshot({ | |
path: "./image.png", | |
fullPage: true, | |
}); | |
// Create pages, interact with UI elements, assert values | |
await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment