Need to verify cursor state on disabled button
Thank you for whoever helps to start,
The issue I am seeing is running a disabled check on a button in my application. Unfortunately our team believes the best way to check the code we have to work with is to check the pointer-event, which remains: none. I am struggling to locate the cursor object whether inside Sys.Browser, Sys.Window, WndObjcect.
I have found the cursor documentation but I am unsure how to get the 'componentObj' needed for the property check. I also see tObjectPicker and have name mapped the object I hover the mouse over, but the properties pickedObjectName and cursor return failures in my script.
I am working in circles it seems, please help.
Hello vladd1,
I think I know what you are struggling with.
You may have this doc which explains settings the various cursor states....
https://support.smartbear.com/testcomplete/docs/reference/user-forms/properties/cursor.html
The button likely has a .cursor property however.var form = UserForms.SampleForm; var button = form.buttonOK; // Moves the cursor to the button center button.MouseMove(); //Returns the cursor type var currentCursor = button.Cursor; Log.Message("Cursor type: " + currentCursor);
This code reads the current cursor type and logs it. The value returned will be one of the cr* constants (like crDefault, crHandPoint, etc.).
... If you find my posts helpful drop me a like! π Be sure to mark or post the solution to help others out and/or to credit the one who helped you. π