In the past I have used scripted tests to check page performance in cookie message mode and cookie acceptance mode. A frustration has always been that Lighthouse use via WebPageTest ignores the script - so I only ever got Lighthouse results for pages running in cookie message mode. The default page mode. Is it possible to overcome this issue using the API.
No, scripts don’t work with lighthouse. If lighthouse provides a way to supply the cookies or headers you want then it may be possible to do through the API which lets you specify lighthouse params but the lighthouse test from WPT hands all test running off to lighthouse itself.