I use dotNET.System_Windows_Forms.Clipboard.GetDataObject() to check if the clipboard has any data on it.
The code is similar to:
function ClipboardIsAvailable()
{
var oDataObject = dotNET.System_Windows_Forms.Clipboard.GetDataObject();
return oDataObject.GetDataPresent("string");
}
This worked great while I was using TestComplete 6.52.
However, when I converted the script to TestComplete 7.51, dotNET.System_Windows_Forms.Clipboard.GetDataObject() always returns null.
Is there additional setting I need to do under TestComplete 7.5 that I didn't have to do on 6.52? Is this a bug?
System.Windows.Forms, version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is listed under CLR bridge of the project. The application that's being tested is a .NET software, and it's the same software I was testing under TestComplete 6.52. In fact, I can still run the same script in TestComplete 6.52, and it finds the value.
Thanks.