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
Render correct error text for internal uncaught errors #6936
Comments
I have the same issue with "Uncaught object "[object Object]" was thrown. Throw Error instead." in Testcafe version 1.20.0-rc.1 for selectors where I try to get the innerText/textContent for a sub-element of a svg |
@Florian-HH I believe this issue is not related to the original one. Please share your project and your test code with us so that we can reproduce the issue on our side |
@AlexKamaev I am sorry, but the project and the test code is owned by a company and can't be shared. |
Hi @Florian-HH, We need an example that we can reproduce locally without any additional setup (see how to create a minimal working example). If you can create such an example please create a separate issue and attach an example to it. Also, it's not necessary to use the production code that cann't be shared. It's possible to create a simple example based on production code. Such example will not contain private information. |
…7364) <!-- Thank you for your contribution. Before making a PR, please read our contributing guidelines at https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution We recommend creating a *draft* PR, so that you can mark it as 'ready for review' when you are done. --> [closes #6936] ## Purpose Render correct error text for internal uncaught errors ## Approach _Describe how your changes address the issue or implement the desired functionality in as much detail as possible._ ## References _Provide a link to the existing issue(s), if any._ ## Pre-Merge TODO - [X] Write tests for your proposed changes - [ ] Make sure that existing tests do not fail
Release v2.1.1-alpha.1 addresses this. |
What is your Scenario?
I'd like to use browser manipulation actions (e.g.
resizeWindow
,maximizeWindow
etc.) the same way with other actions in my tests in the recording process.Test run for such tests works properly.
TestCafe Studio issue: https://github.com/DevExpress/testcafe-studio/issues/4170
What is the Current behavior?
When I add such actions in my tests (both
*.js/ts
and*.testcafe
formats) and start recording for them in TestCafe Studio I get an errorSuch a message is displayed when any exception in TestCafe internal code is thrown.
What is the Expected behavior?
Correct error message.
We should show more descriptive error message. Otherwise we spend to much time to determinate the real cause and we won't be able to diagnost user's problems if they write to us about them.
Please add TestCafe Studio squad for review PR if API is changed or provide us with Breaking change list.
What is your public website URL? (or attach your complete example)
any
What is your TestCafe test code?
The smallest example could be the following
Your complete configuration file
Your complete test report
Screenshots
Steps to Reproduce
TestCafe version
1.18.4
Node.js version
14.9.0
Command-line arguments
Browser name(s) and version(s)
any
Platform(s) and version(s)
any
Other
The research result:
The TestRun's constructor API was changed in the PR @Aleksey28
Specifically
messageBus
was added as a parameter.But in Studio we use this API .
The
[object object]
error was inroduced after the PR merging @AlexKamaev. This line raise error"TypeError: Cannot read property 'on' of undefined"
and this error is catch in the catch block. But still in Studio we get an unidentified[object object]
error.The text was updated successfully, but these errors were encountered: