Back to all steps

Execute JS script

Step fields
return $("#myField").val() (text)
Run arbitrary JavaScript in the page context.
Examples: document.querySelector("#close").click() · window.scrollTo(0, 500)
Usage example

Run arbitrary JavaScript in the page context. No result.

Examples:

  • document.querySelector("#cookie-banner").remove() — remove an obstructing banner
  • window.scrollTo(0, document.body.scrollHeight) — scroll to the bottom
  • localStorage.setItem("debug", "1")