Closed costag1982 closed 2 years ago
It's supposed to be the node version that causes this error. Did you happen to try other node version? From my case, I'm using node 12 and that error eliminated.
Ah @PeterNgTr I will try that, im currently using node 16, thanks for the tip. Is this something that will be fixed on later node versions?
Yes it works on node 14, thanks for this.
its still not perfect on node 14 and 12
(node:25336) UnhandledPromiseRejectionWarning: frame.frameElement: Frame has been detached. at /Users/costagiannakopoulos/Workspace/TechTests/Costa-Giannakopoulos/node_modules/codeceptjs/lib/helper/Playwright.js:2756:46 (node:25336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:25336) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:25336) UnhandledPromiseRejectionWarning: frame.frameElement: Frame has been detached. at /Users/costagiannakopoulos/Workspace/TechTests/Costa-Giannakopoulos/node_modules/codeceptjs/lib/helper/Playwright.js:2756:46 (node:25336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) I click "Sign in" ✖ FAILED in 3741ms
I guess that's another story cause you don't encounter done() called multiple times with node14 right 😁
@PeterNgTr yes thats true haha. The error in node 14 and 12 is intermittent where as the node 16 is every time.
looks like there are 2 issues on this ticket now :)
looks like the latter issue is already logged - https://github.com/codeceptjs/CodeceptJS/issues/3313
How come this issue is closed @PeterNgTr? Does it not need fixing for node 16 users?
@costag1982 try this work around
this.usePlaywrightTo(“within frame”,async({page}) => { const frame = await page.frameLocator("#gdpr-consent-notice"); frame.locator("css=#save").click(); }) // continue on main page
What are you trying to achieve?
I am trying to get into the iFrame to click on the accept cookie button
What do you get instead?
I get an error stating done called multiple times
Details