How to change the default user agent used by the Chromium Embedded Framework (CEF)?
In versions of RPA 11.0 and later the Browse step used to start CEF contains an option for the user agent.
For all previous versions follow the steps below :
- go to the Kapow installation folder (e.g. C:\Program Files\Kapow 10.3.0.5 266 x64)
- go into \nativelib\hub\windows-x32\<id>\node_modules\cef
- open cef.cfg file in a text editor
- add this line (enter custom user agent, as needed):
chrome:user-agent = <new user agent>
E.g.chrome:user-agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
- save the file (Changes will be reflected the next time CEF runs. e.g. the next CEF robot run).
You will also have to modify this file on your RoboServer after uploading to Management Console. This will impact all CEF-based robots. If you are using RPA v11.x, you can isolate this change to a DA Browse step.
Level of Complexity
Add any references to other internal or external articles
Article # 3035194