Reputation: 39
I am trying to pass a string as a part of userAgent from the testcaferc config file. I cant see it working somehow:
I have the following line of code in my testcaferc.json file:
"browsers": [
"Chrome:emulation:userAgent=TEST"
]
And in the test file, I have the following test:
test.page(`https://www.whatismybrowser.com/detect/what-is-my-user-agent/`)(`testing the user agent`, async t => {
await t.debug()
});
I cant see the userAgent getting set up by doing the above.
Upvotes: 0
Views: 199
Reputation: 6318
It looks like you just have a typo in the browser name. You need to write Chrome
in lowercase. Take a look at my config that works as expected:
{
"browsers": [
"chrome:emulation:userAgent=TEST"
]
}
Upvotes: 1