GetObject is crashing UFT

Question ID: 106852

In UFT 11.53 with all the necessary patches installed. I have a function called MinimizeUFT which contains the following code.

Set objUFT = GetObject("", "Quicktest.Application")

As soon as the control comes to the GetObject line UFT crashes.

Has anyone seen this problem before and could you advise what I am doing wrong?

Marked as spam
Posted by (Questions: 361, Answers: 39)
Asked on April 29, 2016 9:24 pm
Answers (1)
Private answer

Here is the correct code for minimizing:

Function MinimizeUFTWindow

Set objUFT = GetObject('''', ''QuickTest.Application'')
objUFT.WindowState = ''Minimized''
Set objUFT = Nothing

End Function

oUFTApp is an instance of UFT itself and not an instance of window like browser, that's why we can not use oUFTApp.minimize.

Marked as spam
Posted by (Questions: 16, Answers: 772)
Answered on April 29, 2016 9:25 pm
thanks, that helps a lot.
( at April 29, 2016 9:28 pm)