Hello team!
I am seeing an issue where the frontend page is failing to load due to a typeerror, hammerhead seems to have an issue rewriting window.location.
Browser console error;
hammerhead.js:14136 Uncaught TypeError: Cannot read property 'prototype' of undefined
at new Location (hammerhead.js:14136)
at Object.get (hammerhead.js:19834)
at value (hammerhead.js:19873)
at Object.location (2.594d2bf1.chunk.js:2)
at Object.o.getHostnameNoWww (2.594d2bf1.chunk.js:2)
at new h (2.594d2bf1.chunk.js:2)
at Module.<anonymous> (2.594d2bf1.chunk.js:2)
at i (2.594d2bf1.chunk.js:2)
at 2.594d2bf1.chunk.js:2
at Object.<anonymous> (2.594d2bf1.chunk.js:2)
Here is the test code;
import {Selector} from 'testcafe';
const okButton = Selector('[data-test="ok"]');
fixture("My xFixture")
.page("https://savings.secure.investec.com/login");
test("First test", async (t) => {
await t
.debug()
.click(okButton);
});
Testcafe config;
{
"browsers": ["chrome"],
"src": ["tests/firstTest.js"],
"quarantineMode": true,
"debugMode": true,
"debugOnFail": true,
"stopOnFirstFail": true,
"skipJsErrors": true,
"skipUncaughtErrors": true,
"appInitDelay": 3000,
"concurrency":1,
"selectorTimeout": 60000,
"assertionTimeout": 60000,
"pageLoadTimeout": 60000,
"speed": 1,
"disablePageCaching": false,
"developmentMode": true,
"qrCode": true,
"hostname": "127.0.0.1"
}
Any advice would be much appreciated, do let me know if you require further information.
Thank you.
Stephen
@juststeveee
Hello,
I reproduced the issue with testcafe-hammerhead, Chrome 89, and Window 10.
For the team:
We are trying to get Location from a non-window client object (the second execution of this line).

Hi,
Do you know if there is a workaround I can apply locally to bypass this issue?
There are no workarounds. Once we get any updates, we will post them in this thread.
Most helpful comment
@juststeveee
Hello,
I reproduced the issue with
testcafe-hammerhead, Chrome 89, and Window 10.For the team:

We are trying to get
Locationfrom a non-window client object (the second execution of this line).