Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Click and Right Click in Karate Robot framework for windows app #2259

Closed
spd42 opened this issue Feb 17, 2023 · 4 comments
Closed

Double Click and Right Click in Karate Robot framework for windows app #2259

spd42 opened this issue Feb 17, 2023 · 4 comments
Milestone

Comments

@spd42
Copy link

spd42 commented Feb 17, 2023

Double click doesnt work in Karate Robot framework for windows app

locate('abc').doubleClick(0,0)

It clicks twice but does it slowly such that the double click does not really work. I found doubleClick() method in RobotBase.Java which has a 40ms delay between the clicks and i'm not sure if that is the reason behind the lag in clicks.

Right Click also doesnt work as there is no method in Element.java but there is a rightClick() method in RobotBase.Java which calls Click(3) internally

@ptrthomas
Copy link
Member

@spd42 I'm tagging this as help wanted. my recommendation is please see if you can contribute a fix, because I right now don't have access to a windows environment or app to test. even if you tell me which line to change, I can make a release.

@ptrthomas ptrthomas added the bug label Feb 17, 2023
@treboriwa
Copy link

@spd42 I use karate-robot primarily for test automation, but haven't had to use the double or right click for my application. While I agree that it should be properly addressed, perhaps you could try some workarounds in the meantime. I believe chaining clicks behaves the same as the double click, but I haven't tried it in a while. Give this a try:
* locate('abc').click().click()
As for the right click, you could try the keyboard shortcut like so:
* locate('abc').input(Key.SHIFT + Key.F10)

@treboriwa
Copy link

@spd42 regarding the double click again, I just remembered that I did in fact use the double click in one of scripts. here's the snippet:

    * def region = locate('abc').region
    * def scrollX = parseInt(region.width)
    * def scrollY = parseInt(region.height)
    * region.inset(scrollX, scrollY).move()
    * robot.location.doubleClick()

I hope this helps.

@ptrthomas
Copy link
Member

thanks @GeorgeLBS1 for the fix

@ptrthomas ptrthomas added this to the 1.4.1 milestone Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants