I already have the Rich Cursor checked off from the preference, but when I capture the screen, the cursor seem to disappear. Is this because the cursor moves to lower right corner? If so, is there a way to know where the cursor was before it reposition itself?
What VNC server are you running against? When capturing, the cursor should not move, but you will need to position the cursor while in Live Mode and then use the keyboard shortcut (Command Key on the Mac, Control Key on Linux and Windows) to put the Remote Screen Window into Capture Mode. . You should then be able to capture the image with the cursor. It would actually be better if you scripted a MoveTo while in Capture Mode to put the cursor over the target object and then captured the image – this will ensure that when you run your script, the mouse will always be moved to same position relative to the UI element
When running the script, you will want to turn off the setting for “Should reposition mouse during image search”, which you can do either in Preferences > Run Options, or on-the-fly in code:
setOption shouldRepositionMouse, NO // do your search setOption shouldRepositionMouse, YES