Created
September 2, 2019 04:47
-
-
Save samuraitruong/ad486c083e4e8ea6d8b5451aad905b20 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
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch({ | |
headless: false | |
}); | |
const page = await browser.newPage(); | |
await page.goto('http://outlook.com'); | |
// click on signin button | |
await page.goto("https://outlook.live.com/owa/?nlp=1&signup=1"); | |
await page.type(".liveDomainInput", "tr" + new Date().getTime()); | |
await page.click("#iSignupAction"); | |
await page.waitFor(2000); | |
await page.type("#PasswordInput", "{([bhu8*UHB])}"); | |
await page.click("#iSignupAction"); | |
await page.waitFor(2000); | |
await page.type("#FirstName", "Truong"); | |
await page.type("#LastName", "Nguyen") | |
await page.click("#iSignupAction"); | |
await page.waitFor(2000); | |
await page.select(".datepart0", "20") | |
await page.select(".datepart1", "4") | |
await page.select(".datepart2", "1984") | |
await page.click("#iSignupAction"); | |
await page.waitFor(5000); | |
await page.waitForNavigation(); | |
await page.screenshot({ | |
path: 'example.png' | |
}); | |
await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment