SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2007
    Location
    Dublin, Ireland
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    DP Object Binding

    Hi all,

    I'm trying to implement a central DP location using the following method.

    <font class="small">Code:</font><hr /><pre>
    Set wMainLobby = Window("regexpwndclass:=FTCLobby")
    Set wMainLobby_dLogin = wMainLobby.Dialog("nativeclass:=\#32770")

    wMainLobby_dLogin.Highlight
    </pre><hr />

    This works fine - BUT if i close the login dialog and reopen it and then try to highlight it again I get a general run error:
    #: "-2147467259"
    Desc: ""

    I'm guessing that when the object is created it is bound to some property which changes when the dialog is closed and reopened - possibly hwnd.

    I can get around this by redeclaring the object before I highlight it the second time.

    Obviously I was hoping to declare all the objects at the beginning of the script and be able to access them for the run duration. Has anyone encountered this before? Is there a workaround or different method that will work?

    Thanks!

  2. #2
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP Object Binding

    the nativeclass of Dialog should not change from 32770, I use Dialog("regexpwndclass:=#32770") for a number of different IE dialogs with no issues.

    Does the object spy show any difference pre &amp; post closure between the window regexpwndclass?

    Mark Smith.

  3. #3
    Member
    Join Date
    Jul 2007
    Location
    Dublin, Ireland
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP Object Binding

    Well, I checked the hwnd and it does change but the class does not.

    If I print the hwnd after I highlight the object it returns a value. But when I close and reopen the dialog and try to reprint the hwnd it returns blank.

    However if I use the Object Spy it does have a value just not the same value as initially.

    Do you know what QTP binds to when I declare the object?

  4. #4
    Member
    Join Date
    Jul 2007
    Location
    Dublin, Ireland
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP Object Binding

    Interestingly - If I add a .Exist into the flow after re-opening the dialog it then sees the object and I no longer get an error. So at least I have a workaround of sorts.

    Still doesn't make sense to me though...

  5. #5
    Member
    Join Date
    Jul 2007
    Location
    Dublin, Ireland
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: DP Object Binding

    Just an update on this. I've raised a support case with HP and I'll post anything useful they come up with.

    In the meantime I'm having good luck with a workaround posted in a different thread-
    http://www.sqaforums.com/showflat.php?Number=470431

    Though I've had to edit it a little because one of the object which is getting destroyed is the parent object hierarchically.

 

 

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 12.50%
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 10:07 PM.

Copyright BetaSoft Inc.