Member-only story
Use ModHeader Extension to Pass Single-Sign-On Page in Selenium Tests
Use Selenium WebDriver to modify HTTP headers using ModHeader to pass SSO, or a better and simpler way …
I was doing a showcase for a potential customer a few weeks ago. When possible, I usually try to write one or two tests live against the customer’s website.
This customer’s test site uses Sigle-Sign-On (SSO).
Click the ‘Sign in with Google’ button will lead to the Google Account Sign-in page.
However, Chrome disables logging in to Google Account by automation.
Solution: Use Chrome Extension to pass SSO
The customer showed me how they got around the problem manually: using ModHeader Chrome extension to set a cookie to pass SSO.
I asked them to send me the cookie string and quickly implemented a user login automation test (in raw Selenium WebDriver + RSpec). Here was the execution: