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

    Exist timeout failing for programmatic description

    Hi

    I have some code that checks if one of two types of popup window appears after clicking a button.

    The check checks for a dialog and then for a custom .Net dialog and if either of them is show, it produces an error.

    The code looks as below:

    If QTPObject.Dialog("object class:=#32770").Exist(2) = True Then
    ErrorMessage = QTPObject.Dialog("object class:=#32770").Static("window id:=65535").GetROProperty("text")

    ElseIf QTPObject.SwfWindow("swftypename:=Jpmc.BlackWidow. CompositeUI.Services.CabApplicationShell.MessageBo xForm").Exist(2) = True Then
    Set MessageForm = QTPObject.SwfWindow("swftypename:=Jpmc.BlackWidow. CompositeUI.Services.CabApplicationShell.MessageBo xForm")
    ErrorMessage = MessageForm.SwfEditor("swftypename:=DevExpress.Xtr aEditors.TextBoxMaskBox").GetROProperties("text")
    MessageForm.Close
    End If

    Both of the Exist commands have a timeout of 2 seconds. The first Exist check on the Dialog waits 2 seconds then proceeds to the next line. However one the second Exist command on the custom .Net dialog, it waits for 30 seconds instead of 2 before proceeding to the next line.

    How can I stop this happening? I want it to wait for 2 seconds for both objects.

  2. #2
    Advanced Member venu.adhikesevan's Avatar
    Join Date
    Jun 2010
    Posts
    517
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: Exist timeout failing for programmatic description

    Check the window is completely loaded before the second exist statement. Place a break point and manually check for this.
    Venu
    Today is always better than Tomorrow
    My Blog
    My LinkedIn

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

    Re: Exist timeout failing for programmatic description

    I've tried that. If I do an exist on a Window or a JavaWindow with programmatic descriptions then the timeout works correctly, if it is a SwfWindow with a programmatic description, the timeout is ignored and it uses the default 30 seconds.

    I'm actually checking that a popup window hasn't appeared so havingto wait an extra 24 seconds is annoying

  4. #4
    Advanced Member
    Join Date
    Aug 2006
    Location
    Other side of the Computer
    Posts
    598
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Exist timeout failing for programmatic description

    under [File => Settings => RUN]
    Set the Object synchronization time out to 0 and try.
    ===========================================

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

    Re: Exist timeout failing for programmatic description

    Tried that too fella. It didn't do anything. It seems that if I don't have it as a child window, it works properly.

    If it is a child window, it ignores the timeout parameter.

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

    Re: Exist timeout failing for programmatic description

    How about set a = QTPObject.SwfWindow("swftypename:=Jpmc.BlackWidow. CompositeUI.Services.CabApplicationShell.MessageBo xForm")
    ElseIf a.exist(2)

 

 

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.00%
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 09:53 PM.

Copyright BetaSoft Inc.