ehawkins
11 years agoNew Contributor
Unable to perform the action because the control is disabled.
I receive the 'Unable to perform the action because the control is disabled' during playback.
The object button in question is not disabled and its name is mapped correctly. I can validate the name mapping of the object button using the 'highlight' field feature within NameMapping.
I have attempted to fix this step in the playback process by using a breakpoint and utilizing the object spy feature. The "drag the target to point to the object' and 'point and fix' within object spy doesn't seem to do the trick.
This same update object button works later on in the test, so i know the object is not disabled. The coordinates or layout off the applciation have not chnaged.
Any thoughts?
The object button in question is not disabled and its name is mapped correctly. I can validate the name mapping of the object button using the 'highlight' field feature within NameMapping.
I have attempted to fix this step in the playback process by using a breakpoint and utilizing the object spy feature. The "drag the target to point to the object' and 'point and fix' within object spy doesn't seem to do the trick.
This same update object button works later on in the test, so i know the object is not disabled. The coordinates or layout off the applciation have not chnaged.
Any thoughts?
- It may be that the button is temporary disabled for a short period of time, which just happens to be when you want to use it.
Try waiting until the button is enabled before clicking on it.
WaitProperty example:
Set btn = Sys.Process("MyApp").Window("TMainFrm","MyApplication *").Child(2)
If btn.WaitProperty("Enabled", True, 2000) Then
' Button is enabled
Else
' Button is disabled
End If