Closed mccartyb1 closed 1 year ago
Hello,
Thank you for your input. We have reproduced the problem, please stay tuned.
Hello. Just checking in to see if there has been any update on this. Thanks!
No updates yet. Once we get any results, we will post them in this thread.
Hi @mccartyb1,
TestCafe runs tests using the URL-rewritten proxy.
This approach is good. However, there is a way to improve the stability and speed of test execution - the native browser automation API.
We have a test execution mode uses native browser automation - we call it the Proxyless
mode.
In Proxyless
mode, a few issues are already fixed.
By the way, this issue was also fixed in Proxyless
mode.
This option is available in all interfaces:
// Command-line
testcafe chrome tests --experimental-proxyless
// Programmatic
const testcafe = await createTestCafe({ experimentalProxyless: true });
// Configuration file
{
"experimentalProxyless": "true"
}
Setup the testcafe@2.1.1-alpha.3
version and try running your tests in Proxyless
mode. I look forward to your results.
Note that at present it is an experimental mode.
Also, the Proxyless
mode is implemented only in Google Chrome. It will not work correctly if you run tests in a non-Chrome browser or in a combination of other browsers.
Hi @mccartyb1,
This issue is not reproduced with combination of testcafe@3.0.1
and the Google Chrome browser. Feel free to reopen this issue if you encounter it in other browsers.
What is your Scenario?
I'd like to build some automation for twitch.tv, however there is an error when testcafe loads the page that blocks any subsequent automation.
What is the Current behavior?
When loading the page a JavaScript error occurs (more details in full report below): JavaScript error details: NetworkError: WorkerGlobalScope.importScripts: Failed to load worker script
If I try using --skip-js-errors, it does skip the error. However, most of the page does not load and is not functional.
What is the Expected behavior?
Page loads correctly and automation can act upon it.
What is your public website URL? (or attach your complete example)
https://www.twitch.tv/
What is your TestCafe test code?
import {Selector} from 'testcafe';
const loginButton = Selector("button").withAttribute("data-a-target", "login-button");
fixture("Crown Tests") .page("https://www.twitch.tv/");
test("Crown Test1", async t => { await t .expect(loginButton.exists).ok() });
Your complete configuration file
package.json
{ "dependencies": { "testcafe": "^1.17.1" } }
Your complete test report
Running tests in:
Firefox 91.0 / Windows 10
Crown Tests × Crown Test1
1) A JavaScript error occurred on "https://www.twitch.tv/". Repeat test actions in the browser and check the console for errors. To ignore client-side JavaScript errors, enable the "--skip-js-errors" CLI option, or set the "skipJsErrors" configuration file property to "true". If the website only throws this error when you test it with TestCafe, please create a new issue at: "https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details: NetworkError: WorkerGlobalScope.importScripts: Failed to load worker script at http://10.119.127.175:1228/!s/https://static.twitchcdn.net/assets/amazon-ivs-wasmworker.min-4dcf5c30e7a36a636fd2.js (nsresult
= 0x804b001d) No stack trace available
Browser: Firefox 91.0 / Windows 10
1/1 failed (4s)
Screenshots
No response
Steps to Reproduce
TestCafe version
1.17.1
Node.js version
16.0.0
Command-line arguments
testcafe firefox test/basic_twitch_open.js
Browser name(s) and version(s)
Firefox 91.2.0, chrome 95.0.4638.69, Safari 15.1
Platform(s) and version(s)
windows 10, Mac OS v11.6
Other