Created
October 28, 2021 10:07
-
-
Save akvadrako/2732bfe1421933a92621b2b053091af3 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 { chromium, firefox } = require('playwright'); | |
async function demo() { | |
const type = chromium | |
const browser = await type.launch({ headless: false }) | |
const ctx = await browser.newContext() | |
const page = await ctx.newPage() | |
ctx.tracing.start({ screenshots: true, snapshots: true }) | |
await page.goto('https://dev0.caaas.ca/public/plaid.html?token=link-sandbox-ae58abe2-a2e8-48ec-a365-bc04ca87f5d8') | |
//await page.waitForEvent('framenavigated') | |
let frame | |
while(! frame) { | |
await page.waitForTimeout(0.1) | |
frame = await page.frame({ url: /.*link.html.*/ }) | |
} | |
await frame.waitForTimeout(0.1) | |
await frame.click('button:has-text("Continue")', { noWaitAfter: true }) | |
await frame.waitForTimeout(0.1) | |
await frame.click('button:has-text("Royal Bank")') | |
await frame.waitForTimeout(0.1) | |
ctx.tracing.stop({ path: "trace.zip" }) | |
} | |
demo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment