2

I am trying to play my QTP11 scripts in the UFT14 (trail) but for some reason .Exist doesn't wait for the given timeout. Rather it is waiting as per the Object sync timeout project settings if the object doesn't exist. Any reason why?

Like my project's object sync timeout is set at 60 seconds. And when I use something like If ErrorObject.Exist(10) Then ErrorObject.Close -- this should wait for 10 seconds only but rather UFT14 is waiting for full 60 seconds. Is it a bug or is there any extra setting which I have to apply in UFT14 for Exist to wait for the given timeout only?

Edit - On further inspection I found out that this is an issue with Java objects only. So might be a bug in Java addin. Can anyone verify or provide a workaround.

Edit - HP acknowledged that this is an issue. Here is the link if anyone is interested.

https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM02764499

Pankaj Jaju
  • 5,371
  • 2
  • 25
  • 41
  • What is `ErrorObject`? I tried with UFT 14 and couldn't reproduce your problem. – Motti Mar 22 '17 at 08:52
  • I think this is an issue with JavaObjects only. I was testing a java application. I then tested it for other objects and they were working fine. So something is wrong in the Java addin. – Pankaj Jaju Mar 22 '17 at 10:16
  • Could be, I only checked on Web. I suggest contacting HPE's support. – Motti Mar 22 '17 at 10:35

1 Answers1

1

This is because of the default timeout in UFT.You can change that default timeout as below

Test Settings -> Run -> Object synchronization timeout

Change the "Object synchronization timeout" in seconds.

Or You can do this directly through vbscript code

Setting("DefaultTimeout") = 5000(This value is in milliseconds) 
SaiPawan
  • 1,189
  • 7
  • 20
  • Exist(10) should wait for just 10 seconds irrespective of Object synchronization timeout. This was working fine in v11. – Pankaj Jaju Mar 31 '17 at 14:42
  • It will wait for 10 seconds on the top of your synchronization timeout in QTP.It will wait 10+timeout – SaiPawan Apr 01 '17 at 12:25
  • I know it will wait, but this is a workaround. This also mean that you need to change all your scripts if you want to migrate from v11 to v14. – Pankaj Jaju Apr 01 '17 at 16:01