SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Waitproperty does not wait for the time specified

    I defined wait time in milliseconds say 90000 (for 1 1/2 min) but by default it takes the time out specified in the Run tab.

    I tried all the properties like text, enabled, focus etc.

    ex:

    Window("Login").WaitProperty "text", "Event Login", 90000

    Login window takes atleast 1 min to load but it waits only for 20 secs and move to next step. It happens for all the other windows as well.

    Any idea why it's taking the time in run tab when i specify the time in waitproperty?

  2. #2
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    [ QUOTE ]
    Window("Login").WaitProperty "text", "Event Login", 90000

    Login window takes atleast 1 min to load but it waits only for 20 secs and move to next step. It happens for all the other windows as well.

    [/ QUOTE ]

    Is the text "Event Login" displayed within 20 secs?
    If yes then QTP is working fine.

    In the above example QTP will wait till the text "Event Login" is displayed. If the text is displayed in 2 secs it continues to the next step. It doesn't wait for 90000 milliseconds.

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Nope, Event Login does not display within 20 secs. I changed the time in Run tab to 3 secs to just see which time QTP is picking up.

    It then waited for only 3 secs and moved to next step. The window Login takes 60-90 secs to load up.

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Is "Event Login" the window title? What does the below statement return? Does it return true

    Msgbox Window("Login").WaitProperty "text", "Event Login", 90000

    Thanks,
    Pavan

  5. #5
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,556
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Sounds like you need an Exist statement on the window before you go checking a specific property. If the object doesn't exist it will use the time specified in the run tab for object sync.

    Use WaitProperty for an object that does exist but has a state that will change.

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified


    Msgbox Window("Login").WaitProperty("text", "Event Login", 90000) returns False when window does not display, return True when the window displays.

    When it retuned false (when i didn't launch the dialog) it only waited for 3 secs that is specified in Run time tab.

    I used waitproperty many times before, this is the first time it behaves like this.

  7. #7
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,556
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Must be the first time you've used it on an object that didn't exist within the default object sync time.

  8. #8
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    I think Ryan(NoUse4aName)is absolutely right. As he said, I don't think you use WaitProperty when the object doesn't exist because before the waitproperty statement is executed QTP executes the Exist method and stops the test when it is not displayed(or continues if you have on error resume next or recovery scenario).

    Thanks,
    Pavan

  9. #9
    Senior Member
    Join Date
    Apr 2005
    Posts
    121
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Hi Ryan, when i double click on exe it takes time to load and it all depends on how much data you have.

    The time, in milliseconds, after which only QuickTest continues to the next step if the specified value is not achieved. Isn't it supposed to wait for that long?

    The object will not exist until it loads obviously. That's why i want to use waitproperty to wait.

  10. #10
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Waitproperty does not wait for the time specified

    Why can't you use

    Window("Login").Exist(90) 'waits for maximum of 90 secs

    Thanks,
    Pavan

 

 
Page 1 of 2 12 LastLast

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 10.71%
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 05:31 AM.

Copyright BetaSoft Inc.