browsertime icon indicating copy to clipboard operation
browsertime copied to clipboard

visualmetrics with "carousel" element

Open matti opened this issue 6 years ago • 12 comments

Visualmetrics last visual change for https://www.kaalimato.com/ is ~25s because the carousel keeps changing the page - is there any way to mitigate this?

matti avatar Nov 07 '19 12:11 matti

You can choose when to end your test with https://www.sitespeed.io/documentation/sitespeed.io/browsers/#choose-when-to-end-your-test

soulgalore avatar Nov 07 '19 13:11 soulgalore

hmm, but wouldn't a better solution be some sort of --visuallyCompleteIfNoChangesDuring 2.0 ?

matti avatar Nov 07 '19 14:11 matti

Like that would handle it for every page/domain?

matti avatar Nov 07 '19 14:11 matti

The video doesn't decide when to end, it just record the screen. My guess in your case that the loadEventEnd hasn't fired (not all request/responses are done). What happens on screen isn't the same as which requests being handled by the browser.

soulgalore avatar Nov 07 '19 14:11 soulgalore

Yeah, the page keeps loading with every single carousel page. I still think it should be possible to not write custom handler every page. I'll think about this.

matti avatar Nov 07 '19 16:11 matti

It works like this: You can run your own JS that decides when to end. But by default WebDriver gives back control after loadEventEnd happens, so you need to change the --pageLoadStrategy so you get into control direct after the navigation.

soulgalore avatar Nov 07 '19 16:11 soulgalore

Page_timing_metrics_-_Grafana

But loadEventEnd happens at 1.54s, "fullyLoaded" happens at 30s (timeout?) - So I don't think it's about pageLoadStrategy -- the control is returned with normal strategy?

matti avatar Nov 07 '19 17:11 matti

Then I would guess that we stop the video after we collected all the JS metrics, instead of do it before. Need to check the implementation.

soulgalore avatar Nov 07 '19 18:11 soulgalore

I think we could change it but it needs some changing/splitting the code. Today we need to know the URL from the page when we stop the video, that need to be fixed. Then we could close the video right before we stop collect metrics using JS. But it will need some testing to make sure we don't introduce new things. Moving this to Browsertime since its there it needs to be implemented.

soulgalore avatar Nov 17 '19 15:11 soulgalore

I looked into it now, since we have the same problem at work. Well, it would need quite many changes and I don't see this happening any time soon.

soulgalore avatar Nov 17 '19 23:11 soulgalore

what kind of changes? if you help me out a bit, maybe I could try to do a PR?

matti avatar Nov 18 '19 06:11 matti

Ooops I looked at the wrong place, fixed now at least the best we can do, lets see what kind of impact it will have.

soulgalore avatar Nov 18 '19 11:11 soulgalore

The way I would fix this is to add a custom --injectJs to that page that actually blacks out the carousel element. Seem more and more people using this approach to "black out" ads so you do not measure them in the visual metrics.

soulgalore avatar Dec 17 '23 05:12 soulgalore