s.click(img) is not working consistently

Asked by Chenna

s.click(img) is not working consistently

It was working earlier, Infact i have executed the same scripts which work well before, but now click is not working at some places.

To provide more information, i am highlighting the element before clicking, which is showing correct. but the actual click is not working at some places.

Tried by putting wait times as well.

Any solution for this is appreciated.

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

I think that clicking behavior has occurred before a mouse move to specified image.
Try to use mouseMove(img) and mouseDown(Button.LEFT) instead of click().

Revision history for this message
Chenna (bkckrao) said :
#2

This way is also not working consistently. am seeing the same behavior with this approach as well.

Any other valuable suggestions please

Revision history for this message
masuo (masuo-ohara) said :
#3
Revision history for this message
Chenna (bkckrao) said :
#4

On Debug, I found the following error:

To inform, am using TestNG with this.

error] RobotDesktop: checkMousePosition: should be L(353,324)@S(0)[0,0 1600x900]
but after move is L(353,320)@S(0)[0,0 1600x900]
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.

Revision history for this message
Chenna (bkckrao) said :
#5

Sometimes, no error is showing up in log file, How ever mouse is moving to the intended location, But not clicking on it.

Revision history for this message
masuo (masuo-ohara) said :
#6

Since the setting of the display may be related, I show an example on my environment.

Also on my environment,when I changed magnification of display at size display setting, similar phenomenon occurred.
  magnification :150%, similar phenomenon occurred.
  magnification :125%, similar phenomenon did not occurred.

Revision history for this message
Chenna (bkckrao) said :
#7

Infact image is being identified and cursor point moves to the exact image, but not clicking the image (sometimes).

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.