SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    170
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Object Exists function ignoring timeout override

    Hi Chaps,

    I'm using QTP 10 and trying to see if a .Net object exists on a window.

    I'm using the code

    VBWindow("VBWindow").SwfWindow("SwfWindow").SwfLab el("swfname:=lblLabel").Exist(0)

    Even though I've overriden the timeout by using Exist(0) it is taking 50 seconds or so to return False if it isn't found. The same code with a VBLabel label object or a Static object returns false straight away if it isn't found.

    Is there any way to reduce that wait time or is this a known issue with .Net when using descriptive programming for objects that aren't in the repository?

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Exists function ignoring timeout override

    try this one:

    Dim App
    Dim old_Value
    Set App = CreateObject("QuickTest.Application")
    old_Value = App.Test.Settings.Run.ObjectSyncTimeOut
    App.Test.Settings.Run.ObjectSyncTimeOut = 0
    VBWindow("VBWindow").SwfWindow("SwfWindow").SwfLab el("swfname:=lblLabel").Exist(0)
    App.Test.Settings.Run.ObjectSyncTimeOut = old_Value
    Set App = Nothing


    will this works???
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Member
    Join Date
    Jun 2003
    Posts
    170
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Exists function ignoring timeout override

    That should work but it seems that once the timeout has been set to 0, you cannot reset it back again. It remains set to 0. In fact in my version of QTP 10, no matter what you set the timeout to, it goes to 0 and cannot be changed.

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Exists function ignoring timeout override

    you can set the value back.
    possibly there is no valid value in 'old_Value'

    it should be a integer. 20000 = 20 seconds
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    170
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Exists function ignoring timeout override

    Actually, it's in milliseconds which is why I was having problems. That seems a good workaround for the issue. Thanks!

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Exists function ignoring timeout override

    the "exist" method use the additonal of global ObjectSyncTimeOut and the given timeout, thatswhy you have to wait until the global timeout is over...
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:38 AM.

Copyright BetaSoft Inc.