Is there a way to simulate a right/left mouse click at a specific location on screen?
Not element#click
, but simply specify a location on screen ( 500 , 500 ) ?
Thanks.
Join Stack Overflow to learn, share knowledge, and build your career.
Is there a way to simulate a right/left mouse click at a specific location on screen?
Not element#click
, but simply specify a location on screen ( 500 , 500 ) ?
Thanks.
@browser.execute_script("$(document.elementFromPoint(x, y)).click();")
UPDATE
The trouble is it may not do what you expect from right click
@browser.execute_script("$(document.elementFromPoint(2, 2)).trigger({type: 'mousedown', which: 3});")
it might be not so much about watir webdriver solution but should work
browser.send_keys :space
. The only way i figured to set focus is by clicking one of the rows , but each row is a link so im transfered to another page . ive tried browser.table.focus
but it didnt work as well. So far the only way i thought of is right mouse click and then left mouse click.
– MichaelR
Jan 2 '13 at 12:54