SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP keeps waiting at the loop after object display

    Hello

    I am very new to QTP.

    I am testing Cognos reports using QTP 11. I just need to generate the reports and save it as pdf. The steps are as follows:

    1. The report portal is opened in Internet Explorer.
    2. Link for specific report is clicked. Report prompt page is displayed in new window.
    3. Values are selected from many weblist objects and report is run. Report is displayed in new window.


    I am currently using following code to wait for report to appear. This loop should run till the message displayed in image attached exists on screen.

    While Browser("").Page("").WebElement("Instead of waiting, you").Exist
    Browser("").Page("").Sync
    Wend

    But even after the the wait message no longer exists, the QTP keeps on waiting at this loop for about 30 sec. Why does this happen? Is there any other way to do this? I need to record the time taken for a report to run, so it is important for me that QTP should not wait at the loop after the report is displayed. Please refer attached screenshot.
    Attached Images Attached Images

  2. #2
    Super Member QAGanesh's Avatar
    Join Date
    Sep 2010
    Posts
    1,898
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP keeps waiting at the loop after object display

    use this, may be use wait instead of sync which would

    While Browser("").Page("").WebElement("Instead of waiting, you").Exist
    wait(10)
    Wend
    Thanks,
    Ganesh Iyer
    Winds of Change

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP keeps waiting at the loop after object display

    When using Exist(), you need to put some timeout, like "Exist(5)"

    As soon as it exist, the control flow returns true and go to next row. If it does not exist within the timeout seconds, it returns false and move to next row in your code.

    Without timeout, it still use the default timeout waiting time from your Test Settings|Run|Object Synchronization Timeout, I guess this is why it hangs for 30 seconds.

 

 

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.34%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:39 AM.

Copyright BetaSoft Inc.