I am wondering if I can get some help here.
I have a test whereby the webpage test results do not correspond with the lighthouse results
Here is the scenario
I am setting a cookie in a webpage test script in order to test a new version of a page. However, the results from webpage test seem to correspond to the new version of the page, whereas the Lighthouse scores correspond to the old version of the page
Webpage script steps
- Turn off logging (logData 0)
- Set cookie to inform the browser that the new version of the page should be used
- Navigate to page url (the cookie should be stored now, so next time we navigate to the page the new version should be loaded.
- Clear contents of page to start test with clean slate
- Turn back on logging (logData 1)
- Navigate a second time to page url
Expected Results: Webpage test results and Lighthouse scores are run against the new version of the page
Actual Results: Webpage test results correspond to new version of page. Lighthouse scores correspond to old version of page (i.e the first navigation rather than the second navigation)
I can verify this is happening by looking at the Lighthouse report and seeing that the resources for the old page are being loaded rather than the resources for the new page.
This to me looks like a bug. Am happy to share more info if that helps.