sitespeedio / browsertime

Measure and Optimize Web Performance
https://www.sitespeed.io/documentation/browsertime/
Apache License 2.0
608 stars 137 forks source link

Get the url from the `result` array in GeckoProfiler.stop #1999

Closed canova closed 1 year ago

canova commented 1 year ago

Previously for gecko profiler commands we were getting the test url by running a script that returns document.documentURI. This was working fine for most cases. But when one of our tests actually navigates to a different page from the starting page, it gets the destination url instead of the initial url. Since we need the initial url, it's better not to get the url like this, and get it directly from the result array.

Note that chrome trace command does something similar here.

cc @soulgalore and @92kns This fixes Bug 1858709

soulgalore commented 1 year ago

Cool, let me rerun the tests to see the unit tests come through. There are two other actions that will fail at the moment: Chromedriver/Chrome has some breaking changes in the upcoming 119 release (the current driver doesn't work with upcoming releases) so lets merge with those failing.

canova commented 1 year ago

@soulgalore thanks! It looks like the unit tests are failing again but they are passing locally.

soulgalore commented 1 year ago

Yeah, the tests always work on my machine too ;)

Something is flakey in that action I will have a look at it later on. Thanks for the PR @canova