Right click and hold

58 views
Skip to first unread message

Mathieu Gingras

unread,
May 7, 2015, 4:55:55 AM5/7/15
to seleniu...@googlegroups.com
Hi,

For some test, I need to select a group of element but with a right click. But there doesn't seems to be a way to do it.

For left click, I do something like this :

        Actions builder = new Actions(BrowserDriver.getCurrentDriver());
        builder.moveToElement(start.getElement());
        builder.clickAndHold();
        builder.moveToElement(end.getElement());
        builder.release();
        builder.perform();

But for a right click, there's only contextClick that is available and it's doing a complete click (mouseDown followed by mouseUp), I can't do a drag.

Any idea of a different way I could do this ? Some way do a "rightClickAndHold".

murali seleniumtrainer

unread,
May 9, 2015, 9:05:48 AM5/9/15
to seleniu...@googlegroups.com
Hi,

Shift, F10 will do the right click/context click right... so try with key events..

let me know, if not figure it out..

Thank You,

Jessica

unread,
May 8, 2018, 10:26:35 PM5/8/18
to Selenium Users
I am also looking for a way to do a right_click_and_hold. Shift+F10 did not work for what I am trying to do. 
Reply all
Reply to author
Forward
0 new messages