Current time: 07-22-2019, 02:04 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script way to submit login form doesn't work
07-10-2019, 08:12 PM
Post: #1
script way to submit login form doesn't work
I was try to using the script way to login my website, here is the script:

setEventName launch
navigate https://xxxx.example.com
sleep 5
selectValue id=environment 2: Staging
setvalue id=email xxx@example.com
setvalue id=password 123456
setEventName load
execAndWait document.querySelector('.btn-submit').click()

I am seeing the value is set properly to the email and password element, but seems the last step to submit is not executed. Don't know what's wrong. But if I executed the last script using chrome dev tools under Console tab, the login button is submited and login go through. Don't know why it is not proceed by webpagetest, any help is appreciated.
Find all posts by this user
Quote this message in a reply
07-16-2019, 07:03 PM
Post: #2
RE: script way to submit login form doesn't work
I tend to use exec and DOM selectors to target elements rather than WPTs own scripting for example

document.getElementById("email").value="xxx@example.com"

Andy

Using WebPageTest - http://usingwpt.com/
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)