Skip to content

Run JavaScript before change detection

dgtlmoon edited this page Jul 10, 2022 · 31 revisions

You can run JavaScript before performing change detection, this is handy for filling in fields, clicking buttons and other actions

Under Watch Settings > Request > Execute JavaScript before change detection

Available in 0.39.17

This is best used with the Chrome Playwright driver.

Examples:

Fill in the search box and click submit

At http://www.quotationspage.com/random.php ( or add this shared watch https://changedetection.io/share/qvQ8NFFxQsMa )

document.querySelector("input[name=homesearch]").value="cause and effect";
document.querySelector("input[name=startsearch]").click();