-
Notifications
You must be signed in to change notification settings - Fork 368
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
click function: strange meta keys in log and does not always click #54
Comments
Also tested on a fast PC with default X-server, same problem, so the speed seems not to be related to this issue.
|
What do you intend by the 100 as second parameter of the click()? So your 100 leads to the press-and-hold of META (ignored on Linux currently. Should hold CTRL I think - so a bug?) and the ALT-GRAPH key (right ALT key I think). So IMHO this should work:
BTW: your above workaround should have been
... which of course would have given you an error about the 2nd parameter |
... and I admit, that the logging in this case should be improved ;-) |
Many thanks @RaiMan for your reply and pointing out that the click function does not take a timeout as second parameter but instead modifies. Not sure where I got it from because it is documented all correctly but it seems the very same mistake was made here: https://bugs.launchpad.net/sikuli/+bug/1025991/comments/6. Probably a remainder from a former |
Hope it works now. I will revise the handling of the second click parameter a bit, so it creates an error message if the given value does not make any sense (value can max be 15 if you want to hold all 4 possible keys ). BTW: was the intention of the 100, that SikuliX should wait max 100 secs for the image to appear? |
Yes, basically setting the default timeout but just for this call.
Sadly not, the actual problem that the running app does sometimes not receive a click event still persists even now where no meta keys are held during click. Only a directly following |
There are possible reasons:
Since SikuliX currently does not have a feature to "know", wether a click really happened against the intended app/GUI, it is very hard, to debug the reason behind. So if it is really a problem for you, you should create your own click function, that divides the click into its possible steps and allows some intermediate waits and logs.
If it only happens sometimes, but sometimes works, it surely is not a SikuliX problem. But feel free, to post it on Launchpad as a question, so others have a chance, to talk about their experiences. Generally it is very hard to really help in such situations, since only you know/see what happens. If you finally think it is a SikuliX problem: feel free to report it here or on Launchpad with as much information as possible about environment, app context and script snippets. |
Many thanks @RaiMan for looking into this. I will test how far I can get with a specialized |
No, not an intended wait, only some milliseconds caused by the internal handling (Java AWT Robot). |
I can certainly confirm that this issue also exists in robotjs independent form sikulix. I can reproduce the same scenario in both applications. The test scenario involves clicking the image of a drop down list. In my case is the Selenium console "Create a New Session" modal browser drop-down. See the picture in this link: A few weeks ago using sikulix I am able to see the drop-down list. Now I cannot, because the click to display the drop-down does not register by the browser. It shows a red shadow as if the drop-down will display. The same scenario has been failing with robotjs since the beginning. As I am digging more I will file this bug to robotjs. I am not 100% sure if the change of behavior on sikulix side is due to change is sikulix jar file or due to I updated the npm and node environment. I will try to restore to the same npm/node and try out again. Will keep you updated here. |
Hey, I have confirmed that roll back java, npm and node versions doesn’t not help, so the only last resort is to get an older version of the 1.1.4 jar file. |
MP4 for passed on DISPLAY=:0 MP4 for failed on xvfb-run --server-num=99 MP4 files can be played by chrome browser directly. |
btw I have file a ticket to robotjs |
Correction: |
When using SikuliX (1.1.4) inside a docker image (https://gitlab.com/romangrothausmann/dind-sikuli) for automated fog testing in GitLab CI with Xvfb, I noticed that the click function does not always lead to a click event on the running GUI even though the mouse pointer moved to the correct click position.
I found some similar reports but only RaiMan/SikuliX-2014#260 seems related. By repeating the GL CI job a few times (3-6), some succeed all right. I observe this problem also on a slower laptop running sikuli on a default X-server (even if running the sikuli script in "slow motion").
It noticed that often (possibly always) the logs report some meta keys being held while clicking (even though that is not part of the sikuli script), e.g.:
However, I do get the very same log messages even for jobs that were executed correctly and succeeded.
Any ideas what could be causing this click effect variation?
The text was updated successfully, but these errors were encountered: