narzero narzero - 23 days ago 12
Ruby Question

Selenium::WebDriver::Error::UnknownError: Permission denied to access property "handleEvent"

When trying to click on a link I get the following:

Selenium::WebDriver::Error::UnknownError: Permission denied to access property "handleEvent"
from [remote server] https://cdn.shopify.com/s/assets/admin-1281904798962f996c66cecd685ab47c.js:11:in `unknown'


Here's the code:

$browser.elements(css: "a.btn:nth-child(3)")[0].click


The funny thing is that when I try to do this manually with Pry, it works.

# Works
add_new_link_button = $browser.elements(css: "a.btn:nth-child(3)")[0]
add_new_link_button.click


I'm using
ruby (2.2.2p95)
,
watir (5.0.0)
,
watir-webdriver (0.8.0)
,
selenium (0.2.11)
,
selenium-webdriver (2.47.1)
and
Firefox (40.0.3)
. I've also tried it with
Firefox (36.0)
.

Any ideas on what to try next?

Update:

I've just tried with
Firefox 35.0
and it works. So this seems to be a Firefox/selenium compatibility issue.

Answer

This seems to be a compatibility issue with Firefox and Selenium. I've tried it with Firefox 35.0 and that did work.