Skip to content

Instantly share code, notes, and snippets.

@abdeljalil09
Created July 7, 2022 19:01
Show Gist options
  • Save abdeljalil09/63aa8b86e9055ff119995899cddb6986 to your computer and use it in GitHub Desktop.
Save abdeljalil09/63aa8b86e9055ff119995899cddb6986 to your computer and use it in GitHub Desktop.
// @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