Need help clicking innerHTML
|
07-13-2019, 08:08 AM
Post: #1
|
|||
|
|||
Need help clicking innerHTML
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! |
|||
07-16-2019, 07:01 PM
Post: #2
|
|||
|
|||
RE: Need help clicking innerHTML
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 Andy Using WebPageTest - http://usingwpt.com/ |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)