How to click on specific coordinates of an element

I need to click on specific element coordinates using watir-webdriver . With selemium-webdriver it will look like this:

@driver.action.move_to(element, 30, 0).click.perform

But how to do it with watir ?

+5
source share
1 answer

I think you will have to directly access the selenium-webdriver driver (if browseryour watir-webdriver is your browser):

browser.driver

To get the selenium-webdriver underline element for the watir-webdriver element, use wd(assuming that elementis your watir-webdriver element that you want to click):

element.wd

Combining all this, you would do:

browser.driver.action.move_to(element.wd, 30, 0).click.perform
+7

All Articles