Search code examples
ruby-on-railscucumbercapybaracapybara-webkit

Strange undefined method `right_click' error


I use RoR with cucumber and capybara for tests.

I get strange error whent trying to make right click with capybara:

undefined method `right_click' for #<Capybara::Node::Element:0x0000000930c628> (NoMethodError)

But that class simply should have right_click method, see http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Node/Element#right_click-instance_method

This is the source code

find('a', :text => @name).right_click

If I do some mistake, how to simulate right mouse click properly?


Solution

  • This method is in master only. Neither of released Capybara versions support it.