I have been trying to integrate it with Thycotic Secret Server. I have found all the necessary automation id such as LoginUserName or LoginPasswordBox. The script works when an instance of smartconsole is already running on the machine. But when i try to launch the application from the secret server first time (i.e no instance of smartconsole is already running on the machine) its throws this error.
The target element corresponds to UI that is no longer available (for example, the parent window has closed).
at MS.Internal.Automation.Misc.ThrowWin32ExceptionsIfError(Int32 errorCode)
at MS.Internal.Automation.Misc.GetWindowLong(HWND hWnd, Int32 nIndex)
at MS.Internal.Automation.HwndProxyElementProvider.IsWindowPatternWindow(HWND hwnd)
at MS.Internal.Automation.HwndProxyElementProvider.System.Windows.Automation.Provider.IRawElementProviderSimple.GetPropertyValue(Int32 propertyId)
Any idea why? Is there any fix for this problem?
Any help would be appreciated.