WebPagetest Forums
Chrome Template Profile - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Chrome Template Profile (/showthread.php?tid=14738)

Chrome Template Profile - marty90 - 02-08-2017 05:18 AM

I want to use Chrome with a custom profile (a snapshot of specific profile).
I created a directory "Chrome" in the "templates" directory.
Unfortunately, the profile is not copied for the test.
Has anybody encountered this issue?
Thank You

RE: Chrome Template Profile - pmeenan - 02-08-2017 05:39 AM

Did you also update the wptdriver.ini with template=Chrome? That tells it what directory to copy.

RE: Chrome Template Profile - marty90 - 02-08-2017 05:50 AM

That was the problem thank you.
Now I'm trying to get rid of the "Disable Developer Mode Extensions" popup!

RE: Chrome Template Profile - pmeenan - 02-08-2017 05:55 AM

Are you using a recent wptdriver.exe release? As long as the chome executable is in the standard directory the agent should hack around it.

RE: Chrome Template Profile - marty90 - 02-08-2017 06:37 AM

Thank you pmeenan.
I'm using the last version. It works fine without the template profile.
When I enable it, it shows the popup.
My custom profile is just is an empty one except that I clicked on the "Cookie Policy Agreement" on a web site.

Another point:
it would be interesting to allow in WPT to have custom profiles to test the pages in different conditions.
In particular, the agreements in the "Cookie Policy" banners often trigger many events and many objects. Moreover the behavior of a page with popular plugins such as "AdBlock Plus" can be quite different.
It is possible to create different profiles, such as "templates/chrome_clean" and "templates/chrome_adblock" to allow this.
My question is: how can I specify the profile to use at runtime (from the web interface or the web APIs)?

RE: Chrome Template Profile - marty90 - 02-08-2017 07:45 PM

For the popup problem, I found the problem:
your workaround works only at the "first run" of Chrome. Thus, if you are using a pre-existing, it doesn't work.
To solve it you should:
1. start Chrome to create a NEW profile in the "templates/chrome" folder. IMPORTANT: start Chrome from the directory: ...\Google\Chrome SxS\Application\chrome.exe
2. Apply your changes to the profile
3. Delete the files "First Run" and "Local State" from "templates/chrome" folder.

To automate this, it would be possible to avoid copying those files from the template directory.