-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
takeElementScreenshot takes screenshot of the element correctly but throw uncaught object "[object object]" error right after #3189
Comments
I get similar Managed to get the object returned as an error
@sophiecdd you can try wrapping your line with |
@sophiecdd |
@andrzej-kodify Thanks for your help! I have tried what you recommended got the error printed out, similar as what you got there, with the try/catch, my test can successfully run through, the screenshot was actually successfully taken in my case, but I do think it is a testcafe issue that at least the error message is supposed to be clear and meaningful right? @LavrovArtem |
@LavrovArtem for me it happened with
that's the only hint I have, not sure if it'll help to trace the issue |
@sophiecdd @andrzej-kodify I've tried to run simple test code: import { ClientFunction } from 'testcafe';
fixture `Fixture`
.page('https://example.com');
test('test', async t => {
const getLocation = ClientFunction(() => window.location);
console.log(await getLocation());
}); and found a problem in our code - DevExpress/testcafe-hammerhead#1866. But, it's not related to the issue you described. The problem is likely related to your website and I need an example showing this issue to find its cause. |
I've reproduced the problem with |
This problem is fixed in Please reopen the issue if you still can reproduce the problem. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow. |
In my test I do the following to take a screenshot of an element:
.takeElementScreenshot(Selector('.element'), testScreenshotPath + imgName, '');
my test failed with the following error:
Uncaught object "[object Object]" was thrown. Throw Error instead.
Browser: Chrome 70.0.3538 / Windows 10.0.0
Screenshot: C:\dev\Testcafe-POC\screenshots\2018-12-04_16-32-32\test-3\Chrome_70.0.3538_Windows_10.0.0\errors\1.png
In the screenshot tests folder I can see the screenshot of that element was successfully taken and the content is correct. Can anybody help me with this? Thanks in advance!
The text was updated successfully, but these errors were encountered: