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 …

Zhimin Zhan
4 min readDec 13, 2021

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:

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

No responses yet