Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

The method GuiTestObject::GetHandle is not supported for the desktop object

The method GuiTestObject::GetHandle is not supported for the desktop object

On upgrading to Silk Test 15.0+ my existing Silk Test Classic scripts now throw the error, "The method GuiTestObject::GetHandle is not supported for the desktop object.".

The above error is most commonly observed when a Silk Test Classic framework uses one of the following dll functions:

  • ShellExecute
  • ShellExecuteA
  • ShellExecuteW

Previously in the Classic Agent it was recommended to use the following approach similar to the following when calling ShellExecute:

ShellExecuteW(Desktop.GetHandle( ), "open", "myApp.exe", "-param", "C:\AUT_Dir\", 5)

As the GetHandle( ) is no longer automatically routed to the Classic Agent, it is recommended to replace the Desktop.GetHandle( ) value with 0. For example:

ShellExecuteW(0"open""myApp.exe""-param""C:\AUT_Dir\"5)


Using the value 0 tells the ShellExecute statement that the command being invoked is not associated with a window, which has the same desired effect as using Desktop.GetHandle( ).

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2014-11-05 15:39
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.