How to Script for the cursor display???

Hi All,

How to code against the display of cursors over the hyperlinks or buttons :|

The cursor over the buttons or links should appear to be 'hand' image.
I followed the below scenario to script:
1. find the link/button
2. move the cursor over the link/button, when found.
3. when cursor is over the link/button, find the image with hand cursor. For this we took the image with the hand cursor at the location of Hot Spot.

But we observed that, after executing the 2nd stmt, the cursor moves away from the image while the 3rd stmt starts.
How can we make the cursor stay over the same location of image :roll:

Or is there any other method to script for this scenario :?:

Comments

  • ToddTodd Member
    To keep the mouse where it is currently located during an image search, try:

    Set the ShouldRepositionMouse to FALSE
  • ToddTodd Member
    However, if you have a series of images that have been captured accidentally with the cursor included in the image...

    As a best practice is it important to not include the cursor as part of the captured image. If however you have a large pool of images captured with the cursor included as part of the image to find, you may want to set the standard tolerance level

    Eggplant -> Preferences -> Run Options -> Screen -> Standard Tolerance

    to a higher value (try 60-75?) and experiment until images can be found reliably with cursors included. Factors helping determine success rates include, the percentage of the image captured as a cursor, as well as the difference of pixel colors in the image will all determine your success rate. As a best practice in both my own work and training others is to make sure the Eggplant scripter understands the importance of moving the cursor out of the way of the image element region when entering capture mode. As another best practice is to encourage a user to always inspect visually the captured image element in the save panel image summary sheet which is presented during every single save image operation.

    Also, and this can be very useful when connected to a remote user account (non FUS account) on a remote Mac OS X system running Vine Server. Turn off Eggplant's Rich Cursor support (some other VNC Servers are now offering rich cursors) and you will get no resulting cursor on the capture screen and thus have nothing in the way of your grabbed images where the Eggplant scripter was pointing. This makes for a quick process of using the SUT/App in question, toggling in and out of capture mode with cmd-key and not have cursors in the way of your image element capturing.

    These best practices, and many others are taught as part of the Eggplant Educational Series offered by Redstone Software's Trainings. Please contact the Redstone Software Sales Group [email protected] for details about availability, price schedules, and logistics.
Sign In or Register to comment.