in some of my script I had to add:
_WD_CapabilitiesAdd('args', 'user-agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36')
I do not know from where I get this following settings (find somwhere on the internet):
And this was my previous usage, which lead me to some other issues.
When I change to:
Everything started working fine. At least I hope so.
I hesitate and I worry because I don't know if this form:
Is correct or not ?
btw.
How do you usually construct this settings/string ?
EDIT 1:
I see I should'nt use:
But do not know the right contruction rules.
Here: https://stackoverflow.com/a/62491863/5314940
I found this:
return navigator.userAgent;
and:
I was trying to use this JavaScript in GoogleChrome console but I get:
Do you know how to check current userAgent in console ?
Also here: https://www.codegrepper.com/code-examples/javascript/get+user+agent+javascript
I found some other userAgent example settings.
EDIT 2:
Reference documentation: https://wicg.github.io/ua-client-hints/#user-agent EDIT 3:
Finally for this moment I stick with this solution:
_WD_CapabilitiesAdd('args', 'user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36')
But if somebody have better solutions, then any comments are welcome.