I am using the recorder to create the tests and I am having a problem with login tests. We log in to our app via Google. When the recorder is used, I am presented with the new UI login page. I can target the elements and tests work perfectly with Chrome, Firefox, and headless Firefox. However, they do not work with headless Chrome, because it is using the old login UI. And tests must run in headless Chrome.
I found xpaths to target the old UI page elements, but then CAPTCHA is activated because it recognizes the automation tool.
The solution I’ve found when code is used is to override the user-agent.
I wanted to download my login test as a file, override the user-agent, and then re-upload it so it can run with the rest of my tests but was not able to (python - cant be uploaded, C# - no instructions for visual studio code, java - not familiar with it)
What are my options?