DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.82k stars 671 forks source link

"callsite" exception in Testcafe 3.5.0 #8138

Closed bhassane73 closed 7 months ago

bhassane73 commented 8 months ago

What is your Scenario?

I get the same error in https://github.com/DevExpress/testcafe/issues/7674 when I upgrade Testcafe 2.5.0 to 3.5.0

It's not clear to me how to mitigate the same. Can you please provide more details about the solution? Where to change the configuration and an example?

What is the Current behavior?

"callsite" exception raised

What is the Expected behavior?

Test success

What is the public URL of the test page? (attach your complete example)

NA

What is your TestCafe test code?

Not available

Your complete configuration file

NA.

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

testcafe -e chrome -- disable-native-automation

TestCafe version

3.5.0

Node.js version

9.3.0

Command-line arguments

testcafe -e chrome -- disable-native-automation

Browser name(s) and version(s)

Latest Chrome

Platform(s) and version(s)

Windows 11

Other

No response

Bayheck commented 8 months ago

Hello,

The issue was related to lite-server, which utilizes browser-sync. Browser-sync embeds itself into the page, similarly to what TestCafe does, resulting in incorrect behavior. When you run tests using TestCafe, run the lite server with a configuration that includes a snippet: false option. In the example from this issue, the configuration file named 'config.json' initially looked liked this:

{

"port": 8080,

"files": ["./*/.{html,htm,css,js}"],

"server": { "baseDir": "./" }

}

After the snippet: false option is added, it should look similar to this:

{

"port": 8080,

"files": ["./*/.{html,htm,css,js}"],

"server": { "baseDir": "./" },

"snippet": false

}

This way, the tests passes, and no exception is thrown.

Please try this solution and let us know your results.

github-actions[bot] commented 7 months ago

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.