Problem Clicking on the Mac

I have a script that works fine with a Java app under Windows but is giving me problems on the Mac. Here is the problem line:
Click "Release Notes"
Yeah, just that. It finds the image just fine and even seems to click it but nothing happens...most of the time. Clicking this image should bring up a browser window. Sometimes it works, sometimes it doesn't.

In playing around with things, trying to get a repeatable case to show, I found this always works:
Click "Release Notes"
Click

as does:
Click "Release Notes"
Click FoundImageLocation()

but this behaves as before:
Click "Release Notes"
Click "Release Notes"

Note that if I go into live mode and click on the image, it brings up the browser window every time. Not a double click but a single click. I don't know why two clicks are needed above.

The other funny thing is that this is occurring with all the images in one stripe of this app. The rest of the app is clicking along just fine.

Oh, and this is not being caused by a key mistakenly left held down. I can bring up the app by hand and do a "Run Selection" on just these lines and the same thing happens. FWIW, the SUT is the same Mac I am using to run Eggplant.

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    Your last example leads me to believe that maybe your application is not happy with the way Eggplant moves the mouse around. By default, Eggplant simply jumps the mouse cursor from one point to the next -- the cursor never hits any of the pixels in between. Some UI elements need a mouseEntered kind of event to enable them, and if the app doesn't see the mouse move into that zone, it won't recognize the click event. You might try going to Preferences > Run Options > Mouse Move Speed and set it to a value other than zero. A non-zero value tells EggPlant to divide the distance between the starting location and the destination location by that number of pixels and then to move the cursor in smaller leaps across the screen. You may need to experiment with some different values to find one that works reliably. A value of 1 will almost certainly work, but will really slow down the execution of your scripts; a value of 10 or 50 might also work. Note also that if this is the only place in your script where you see a problem, you can set the MouseMoveSpeed programatically for just this event:
    put the mouseMoveSpeed into mms
    set the mouseMoveSpeed to 10
    -- do stuff here
    -- now reset the move speed
    set the mouseMoveSpeed to mms
    
    Please let us know whether this resolves the problem for you.
  • mtsmts Member
    That looks like it was exactly the problem. Things are working great now. Thanks!
Sign In or Register to comment.