Get rid of chrome restore bubble popup when automate GUI test using Selenium

Donald Le
Automation with Love
3 min readOct 9, 2019

--

Have you ever been annoyed by this restore session bubble in chrome:

This blog post I will show you how to handle that.

Usually when you automate the web app with browser, this popup appear because of driver.quit() and because you are using with user data directory. ( If you’re not, this bubble will not appear as in my experience ).

Sometimes we need to use the user data directory, for example we need some specific extensions, or some logged in data.

1.Manually:

To disable the popup manually, in windows, you need to go to user data directory default.

For me, it’s like :
C:\Users\your_name\AppData\Local\Chrome\Browser\User Data\Default
In this folder, open file Preferences

You need to modify these values to :

“exit_type”: “none”,

“exited_cleanly”:true,

After save that, the next time it won’t happen the next time.

But Chrome browser might override that value, so if you don’t want to modify that forever, make sure you set the file as read-only.

--

--

Donald Le
Automation with Love

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.