catchpoint / WebPageTest.agent

Cross-platform WebPageTest agent
Other
214 stars 138 forks source link

about:blank in scripted runs not working #106

Open ErikWitt opened 6 years ago

ErikWitt commented 6 years ago

If I execute the following script and run it on the new test agent I see the first page (www.baqend.com) in the video before the second page (www.esprit.de) is loaded.

logData    0
navigate    https://www.baqend.com
navigate    about:blank
logData    1
navigate    https://www.esprit.de

With the new agent (version 180417.190444) I get this: https://www.webpagetest.org/video/compare.php?tests=180426_04_81bf3720fed9b22a20c2f27e5329ec34-r:1-c:0

I would expect to see a blank screen before the second site loads. Instead, I get the page I loaded before navigating to about blank.

With the old agent (before the reboot) I get this: https://www.webpagetest.org/video/compare.php?tests=180426_2R_dabf9416b73cfa426f6cee0b801c23df-r:1-c:0

Everything works fine and I get a blank screen before the second site loads.

pmeenan commented 6 years ago

The navigation was changed to be consistent across browsers to use window.location and I don't believe that can access chrome:// or about: pages. Does it work if you use http://127.0.0.1:8888/blank.html or http://www.webpagetest.org/blank.html? Both of those are blank html pages.

Another common option is to use:

exec document.body.innerHTML='';

or something similar to clear out the current document (watch out that the background color might remain).