Right click and hold

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Right click and hold

Mathieu Gingras
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".

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1bc3f424-1223-4c3f-a574-884dd778228e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Right click and hold

murali seleniumtrainer
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,
seleniumtrainer.com


On Thursday, May 7, 2015 at 2:25:55 PM UTC+5:30, Mathieu Gingras wrote:
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".

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/04752aaa-dfc0-4764-ab68-63f477cffdf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Right click and hold

Jessica
In reply to this post by Mathieu Gingras
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. 


On Thursday, May 7, 2015 at 4:55:55 AM UTC-4, Mathieu Gingras wrote:
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".

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/131586c3-3fb8-4c42-8220-e08fb75d9a0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.