This repository has been archived by the owner on Nov 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
Unable to handle errors with try/catch #279
Comments
I'm experiencing the same with wait('.no-such-selector') |
Same issue here |
Same issue here. Would love to be able to make a screenshot when a step fails. I think this is related:
|
I'm running into this issue & finding that the error is actually thrown from the second invocation of .screenshot() in other words it seems like the click (or wait) action is still queued and trying to run a second time. |
Having the same issue. Doing Full example: const { Chromeless } = require('chromeless')
const chromeless = new Chromeless({ waitTimeout: 5000 });
const twitterUsername = "xxx"
const twitterPassword = "xxx"
async function run() {
const screenshot = await chromeless
.goto('https://twitter.com/login/')
.type(twitterUsername, '.js-username-field')
.type(twitterPassword, '.js-password-field')
.click('button[type="submit"]')
.wait('.status')
.screenshot()
await chromeless.end()
}
run().catch(async (error) => {
console.log(error);
await chromeless.queue.end()
}) Without that the node process continues forever on an error... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have the following code (same in playground)
When element is not found on the page, I expect an Exception to be thrown, that I can handle in
catch
and make a screenshot. But instead I am seeing an globally thrown errorError: wait(".no-such-selector") timed out after 10000ms
that I cannot catch.How should I handle such case and dump screenshot of the page, if anything goes wrong?
The text was updated successfully, but these errors were encountered: