I’m trying to get Ui.Vision to enter text in a comment box and then click the post button. However, click and clickAt don’t trigger the comment box to expand and reveal the post button. So even it inputs the desired text, the post button doesn’t pop up and the macro fails.
Any suggestions?
Heres an image of it unclicked then physically clicked:
Use XClick instead of Click. XClick simulates real (native) mouse clicks instead of the Javascript events that are triggered by Click/Clickat. Javascript events sometimes do not work.
Thanks Ulrich,
Unfortunately I’m now running into the unsolved issue of Xclick failing to hit the red selector box upon clicks. It seem that the selector box finds the chosen image just fine but the physical click seems to register about 2 inches above the box. I’ve scoured the forums and the problem occurs for many other users but there doesn’t seem to be a solution.
Do you have examples of such posts? Is this on the Mac? A screenshot would be helpful.
In any case, if such shift happens, 3 workarounds:
Sometimes a shift happens because the page is not finished scrolling, so the button still moves after UI.Vision found it! => Wait for page to finish scrolling, then click.
If this is not the case, and we have a real shift (bug!?), then this helps:
Use desktop automation mode
OR: Shift the y coordinates for click manually:
visualAssert | buttonimage.png (= find the image and get its x,y)
Any chance you could write this in the source view (JSON) format?
I’m having zero luck trying to reverse engineer these commands.
Right now I have Xclick set up targeting an image but I’m not sure where to write the coordinates and both target and value result in errors saying the variables are not defined.