WebPagetest Forums

Full Version: Need help clicking innerHTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I have a button like this in my html file as following:
<a class="Header signIn" data-m='{"N":"Sign":"1", "pT":"D"}'>Log In </a>

How do I click on it using webpagetest:

I tried innerHTML property like so:

navigate mywebsite.com
clickandWait innerHTML=Sign In

This doesn't seem to be working. Im getting the log in modal but the click is not happening.

Thanks!
Your text on the link in "Log In" but your innerHTML refers to "Sign In", is this the issue?

I tend to use execAndWait for clicks that involve browser activity as a response, for example

execAndWait document.querySelectorAll("a")[0].click()

You'll need to change the selector to target the correct element but that's something you can test in browser devtools making it much easier to debug
Reference URL's