Undefined error message while using it with testcafe's chrome browser.
See original GitHub issueComponent | Version |
---|---|
Operating system | Mac Os |
Node.js | v14.15.5 |
chrome-remote-interface | 0.30.0 |
Is Chrome running in a container? (I am using chrome with the help of TestCafe)
My main Aim: My Aim is to cut the network so that I can see the error dialog in the website while automation testing.
[Important]: Testcafe is opening with this url: //http://192.168.0.123:1234/someRandomString/https://theWebsiteThatIAmTesting.com/
const CDP = require('chrome-remote-interface');
let config = {
offline: true,
latency: 100,
downloadThroughput: 750 * 1024 / 8,
uploadThroughput: 250 * 1024 / 8
};
let client = await CDP({
port:1234,
host:"192.168.0.123"
});
const {Network} = client;
await Network.enable();
Network.emulateNetworkConditions(config);
I am getting error at this line 34:
29 | });
30 | response.on('end', () => {
31 | if (response.statusCode === 200) {
32 | callback(null, data);
33 | } else {
> 34 | callback(new Error(data));
35 | }
36 | });
37 | });
38 | request.setTimeout(REQUEST_TIMEOUT, () => {
39 | request.abort();
at IncomingMessage.<anonymous> (/.../node_modules/chrome-remote-interface/lib/external-request.js:34:26)
The error message is not visible and this is the main reason why I am putting this question over here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cannot read property 'match' of undefined in version 1.8.1 ...
The problem is that TestCafe can't process incorrect empty registry keys, that can be left in the registry by some browsers after the ......
Read more >TestCafe get "Cannot read property 'pageX' of undefined ...
Try running it with --skip-uncaught-errors flag.
Read more >FAQ - TestCafe
The most common reason for this is a JavaScript error on the tested page. Load this page in the browser, open the console...
Read more >Browsers | Concepts | Guides | Docs - TestCafe
This topic lists browsers supported by TestCafe and describes how to use various browser features. Browser Support. Officially Supported Browsers; Locally ...
Read more >Client Functions and Script Injection for Page Interaction
The test code has no direct access to the browser context. TestCafe interacts with the browser asynchronously (which is why missing await issues ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it. Trying this. Thanks for the explanation and help 😃
Most likely
http://192.168.0.123:1234/json/list
returns an empty body, try withcurl
as I shown you above if you want to see the status code. In any case, that endpoint is not returning the list of targets as chrome-remote-interface expects to.