GetObject is crashing UFT
Question ID: 106852
1
0

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")
objUFT.Minimize

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: 386, Answers: 64)
Asked on April 29, 2016 9:24 pm
38 views
Answers (1)
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: 807)
Answered on April 29, 2016 9:25 pm
0
thanks, that helps a lot.
( at April 29, 2016 9:28 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top