Chrome profile information

58 views
Skip to first unread message

Niranjan Rao

unread,
Mar 2, 2021, 1:38:06 PM3/2/21
to chrome-debugging-protocol
Greetings,


For our tests, we use "--user-data-dir" flag to set the profile
directory and back it up /restore as needed. Goal is to keep each test
independent as we don't want to mix cookies/application storage/local
storage etc.


Can this be done using existing protocol methods?

Alternatively is there any way where we can maintain a "clean profile",
something similar to profile created after first run and  just restore
these minimal files. If so which files/directories need to be backed up.


Regards,


Niranjan

boris.o...@ub.io

unread,
Mar 2, 2021, 1:47:11 PM3/2/21
to chrome-debugging-protocol
Hi,

Depending on your exact requirements https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-createBrowserContext might be what you're looking for.

Best regards,
Boris Okunskiy
ubio. We automate the web.

https://automation.cloud
b...@ub.io

Niranjan Rao

unread,
Mar 2, 2021, 2:27:35 PM3/2/21
to chrome-debug...@googlegroups.com
Hi,

I had looked at that method, but it does not allow me to set cookies and other storage items. Essentially I want to recreate current profile in a minimal way. We don't care about plugin or cached data, but do care about cookies and storage items.

Regards,

Niranjan
A UBIO product - https://ub.io - @ubio --
You received this message because you are subscribed to the Google Groups "chrome-debugging-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-debugging-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chrome-debugging-protocol/df79d2c1-3023-4db4-be0d-d7e3d6a84d3en%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages