Current time: 03-07-2021, 04:06 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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:

clickandWait innerHTML=Sign In

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

Find all posts by this user
Quote this message in a reply
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


Using WebPageTest -
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)