I am using Testcafe and it does not have direct support to access Chrome Dev Tools. My Aim is to cut the network so that I can see the error dialog in the website. This is the code that I have written. TestCafe opens at a different url Here is the URL: http://192.168.0.123:52678/someRandomStringHere/https://abcdefgh.com/abcdefgh/
I am unable to configure the parameters for this url. FYI, the port number changes, it is not fixed. Can someone please help me with this.
//Performing some actions using Testcafe here
let config = {
offline: true,
latency: 100,
downloadThroughput: 750 * 1024 / 8,
uploadThroughput: 250 * 1024 / 8
};
const CDP = require('chrome-remote-interface');
const client = await CDP();
const {Network} = client;
await Promise.all([
Network.enable()
]);
Network.emulateNetworkConditions(config);
//Checking if the error is present or not in website after cutting the network