title: Webdriver testing and google OAuth
body: <p>I have an e2e test for a rather large application. It offers multiple ways of authenticating an user, one of which is using a google account by aquiring a OAuth2 token. Today it runs naively by manipulating the logon page that pops up and enters the logon details.</p>
  
  <p>As expected, at some point google decided to throw this in my face:<br>
  <img src="https://imgur.com/Q8ksowa.jpg" alt=""></p>
  
  <p>How can I skip the manual logon procedure, grab an Oauth token and procede to my redirect url, and verify that I indeed arrive at the correct place in my application with selenium?</p>
  
  <p><a href="https://developers.google.com/identity/protocols/OAuth2WebServer#offline" rel="nofollow noreferrer">Offline authentication</a> seems to be what I am looking for, however webdriver cannot do POST requests. I am able to acquire the token manually, but there's no way to pass it on to webdriver in any meaningful way as it still can't do anything with it.</p>
  
  <p>If possible I would prefer to not touch the application codebase.</p>
  
  <p>I am using <code>webdriverio</code> as my webdriver implementation, running as a <code>nodejs</code> task. Interestingly the robot filter appears rarely on my local machine, but seems to always trigger on the <code>circleci</code> instance it's run on.</p>