samayres1992
samayres1992

Reputation: 779

Double click using Watir?

Seems to not be a supported feature unless you use firewatir?

I've browsed around for it, can't seem to find it anywhere, I came across double_click but that returned an undefined method error in console.

Anyone know how to get around this?

Upvotes: 2

Views: 3265

Answers (2)

confused1
confused1

Reputation: 253

You could also try the fire_event("ondblclick") method

browser.link(:id,”object_to_doubleclick”).fire_event(”ondblclick”)

fire_event method supports many different events including

  • onmousemove
  • onmouseover
  • onmousedown
  • onmouseup
  • onclick
  • onmouseout and many more...

Upvotes: 4

Justin Ko
Justin Ko

Reputation: 46836

There is a double_click method for elements.

Try:

browser.element.double_click

Note that element does not have to be an element type. It can be a subclass, like a link, span, etc.

Related rdocs: Watir-Classic and Watir-Webdriver

Upvotes: 7

Related Questions