Current time: 12-13-2019, 03:46 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Click event not triggered on checkbox
06-02-2017, 11:15 AM (This post was last modified: 06-02-2017 11:16 AM by anilpothala.)
Post: #1
Click event not triggered on checkbox
Hi Guys,


Can some one provide inputs on below script, i was not able to select the checkbox through script.

logData 0
navigate http://www.walmart.com/search/?query=tod...s&cat_id=0
logData 1
setEventName scrollDown
execAndWait window.scrollBy(0,1000)
clickAndWait document.querySelector('input[type=checkbox]')[0].click()

script was working only till scroll.

Below is the test run

https://www.webpagetest.org/result/170602_PF_37B/
Find all posts by this user
Quote this message in a reply
11-12-2019, 08:12 PM
Post: #2
RE: Click event not triggered on checkbox
could you try dispatching a custom event from the checkbox, like
document.querySelector('input[type=checkbox]')[0].dispatchEvent(new InputEvent("input"))
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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