Forum Discussion

ehawkins's avatar
ehawkins
New Contributor
11 years ago

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 ...
  • Adrian_Tankard's avatar
    11 years ago
    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