Object.Exist(10) failure (UFT/QTP)

Question ID: 105646
1
0

We have used Object.Exist(10) as a stand alone statement for a dynamic wait in QTP10, but that fails now for QTP 11. Exist() does work in QTP11 when used within another statement such as If-Then, but does not work stand alone. This has been failing for Web Objects, but we have not tried other objects as of yet. The browser we use is Internet Explorer 8.

Marked as spam
Posted by (Questions: 28, Answers: 0)
Asked on October 24, 2014 7:20 pm
8 views
Answers (1)
1
Private answer

I am able to reproduce the issue with QTP 11 and 10 with the line of code provide. The line of code Browser(''site'').Exist(0) is designed to return a Boolean value and system engine does not know where to assign the value and throws an error. Recommend assign the line of code to a value or using a 'if then' condition as shown in the QTP 10 example.

From:
Browser(''site'').Exist(0)

To
blnVar=Browser(''site'').Exist(0)

OR
IF Browser(''site'').Exist(0) THEN
MSGBOX ''HERE''
END IF

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on October 24, 2014 7:21 pm