Skip to content

Instantly share code, notes, and snippets.

@Antoinebr
Last active May 7, 2021 14:12
Show Gist options
  • Save Antoinebr/d9ba811c4d371a21b75b5c1273dcb375 to your computer and use it in GitHub Desktop.
Save Antoinebr/d9ba811c4d371a21b75b5c1273dcb375 to your computer and use it in GitHub Desktop.
wpt-script.md

An example of a webPageTest script

setEventName    Go to HomePage

navigate    https://monbraceletnato.fr

setEventName    Display category page

execAndWait document.querySelectorAll('.home-cta a')[1].click();

setEventName    Display product page

execAndWait document.querySelectorAll('.products a')[5].click();

setEventName Add to Cart 

execAndWait document.querySelector('.cart button').click();


WebPageTest result

https://www.webpagetest.org/result/191121_9D_98bc9f4e13a0831fbf7d9c3f59b7d506/

wpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment