0

Getting " Request failed with status 500 due to javascript error: javascript error: Cannot read property 'dispatchEvent' of undefined"

const wheel = function (selector) {
   browser.execute(function (selector) {
    document.querySelectorAll('div[role="rowgroup"] div[role="presentation"] img')[2].dispatchEvent(new WheelEvent('wheel', {
        view: window,
        bubbles: true,
        cancelable: true,
        deltaY: 72
    }))
   }, selector)
}
  • 1
    check if this statement returns something may be you are getting undefined because below statement not returning proper elements `document.querySelectorAll('div[role="rowgroup"] div[role="presentation"] img')` – varaprasadh Aug 30 '21 at 16:03
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 01 '21 at 17:21

0 Answers0