No working workaround for : Native Automation requires https protocol #8330
Labels
STATE: Issue accepted
An issue has been reproduced.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
I cannot run my tests over http using native automation and chrome 130,
I tried using workaround from: #8133
The url seems to be loaded via http but it is not which can be seen in the browser console
What is the Current behavior?
automatic redirect to https occurs and page is not loaded
What is the Expected behavior?
page should be loaded via http
What is the public URL of the test page? (attach your complete example)
example.js:
import {Selector, t} from "testcafe";
fixture('MWE')
test('Website served only by HTTP is tried to be opened with HTTPS', async () => {
await t.navigateTo('http://www.testingmcafeesites.com/')
await t.debug()
})
What is your TestCafe test code?
example.js:
import {Selector, t} from "testcafe";
fixture('MWE')
test('Website served only by HTTP is tried to be opened with HTTPS', async () => {
await t.navigateTo('http://www.testingmcafeesites.com/')
await t.debug()
})
package.json
{
"name": "testcafeexample",
"version": "1.0.0",
"description": "",
"main": "example.js",
"scripts": {
"test": "testcafe chrome example.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"testcafe": "3.7.0-rc.2"
}
}
customRequestHook.js
const RequestHook = require('testcafe').RequestHook
class CustomRequestHook extends RequestHook {
constructor (requestFilterRules) {
super(requestFilterRules);
}
.testcaferc.cjs
let CustomRequestHook = require('./customRequestHook.js').CustomRequestHook
const hook = new CustomRequestHook(/https?://.*/);
module.exports = {
hooks: {
request: hook
},
skipJsErrors : true
}
}
module.exports = {
CustomRequestHook
}
Your complete configuration file
let CustomRequestHook = require('./customRequestHook.js').CustomRequestHook
const hook = new CustomRequestHook(/https?://.*/);
module.exports = {
hooks: {
request: hook
},
skipJsErrors : true
}
Your complete test report
No response
Screenshots
Steps to Reproduce
1.run test
2.open browser console
3.you will see that requet was sent with https not http
TestCafe version
3.7.0-rc.2
Node.js version
21.7.1
Command-line arguments
npm test
Browser name(s) and version(s)
chrome 130
Platform(s) and version(s)
Ubuntu 22.04.2 LTS
Other
No response
The text was updated successfully, but these errors were encountered: