Error with clicking element in navigation user flow #15697
Unanswered
aadisarma7
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Seems to be working for me, using this code: import puppeteer from 'puppeteer';
import {startFlow} from 'lighthouse';
import fs from 'fs';
import open from 'open';
const config = {
extends: 'lighthouse:default',
settings: {
formFactor: 'desktop',
screenEmulation: {
disabled: true,
},
},
};
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
const flow = await startFlow(page, {config});
await flow.navigate("https://www.svb.com");
await flow.navigate(async() => {await page.click('body > div.main-wrapper > nav.svbn5a.v2 > div > div.butter-links.flex > div:nth-child(3) > a');});
const report = await flow.generateReport();
fs.writeFileSync('flow.report.html', report);
open('flow.report.html');
await browser.close();What Puppeteer version are you using? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to test the behavior of interactions on a page that take you to a new url. My code is as follows:
When I run this code I get the error: Error: Node is either not clickable or not an Element
However, when I try to click the element outside of navigation mode, it executes just fine. What am I doing wrong? What mode should be used for interactions with a page that take you to a new url? I am fairly sure it is navigate, but would it be possible to use timespan instead to get the INP of these interactions?
Beta Was this translation helpful? Give feedback.
All reactions