SPONSORS:






User Tag List

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

    Can not remove Parents-Child properties for Window

    I have problem removing Parents-Child properties for Window test class.

    I work with QTP9.2 and .NET app. I try to build the common OR and collect descriptions for common windows that my app uses in many places.

    I removed “is owned window” and “is child window” properties from the Tools -> Object Identification -> Mandatory Properties for "Window" Test class. I re-learned the objects in the Object Repository using OR manager->Object->Navigate and Learn.

    In the new (re-learned) Object Repository the "Window" test class was learned with both properties included in Description properties (the same like it was with default set of Mandatory properties).

    To be clear I restarted QTP, verified that both properties are not in the Mandatory set for "Window" test class, re-learned OR again... It was learned with both properties included in Description properties.

    Am I doing something incorrect?

    Thanks in advance for any ideas/help

  2. #2
    Advanced Member
    Join Date
    Mar 2007
    Location
    Salt Lake City, UT, USA
    Posts
    606
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can not remove Parents-Child properties for Window

    If a property is mandatory, it is always included as a recognition property.

    If a property is NOT mandatory, then it can still be included if QTP is unable to uniquely identify the object with just the remaining mandatory properties.

    So what could have happened is QTP tried to learn the windows the second time, but the mandatory properties were not sufficient, so it added whatever non-mandatory properties it felt would be able to uniquely identify those windows. Had your remaining mandatory properties been sufficient, the "is owned window" and "is child window" properties would not have been used.

    Of course, it could have been some other reason, but this is how it is supposed to work and could explain what happened.
    "The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"

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

    Re: Can not remove Parents-Child properties for Window

    I’d like to update my previous post as I messed some steps. The following are the correct details.
    1. I have an application(e.g. Window2) based on WindowsForms that could be started from command line or from another app window (e.g. Window1). If I create the object repository for command line option, QTP does not recognize the main app window when I start app from another window (and vice versa).
    2. I removed both (“is owned window”, “is child window”) properties from the Tools -> Object Identification -> Mandatory Properties for "SwfWindow" Test class (Environment->”.NET Windows Forms”).
    3. I re-learned Window1 and Window2 (in my application in this case the Window2 was started from the Window1) in the Object Repository using OR Manager->Object->Navigate and Learn.
    4. Results – Window1 and Window2 did not have both properties (“is owned window”, “is child window”) in the Description properties but in OR they were still shown in hierarchy as parent and child.
    5. I run the test where Window2 was started from Window1 – it’s PASS. I run the test where Window2 was started using command line call – it’s FAIL
    6. I divided OR and made OR1 and OR2. OR1 contains Window1 objects only, and OR2 contains Window2 objects only (Window2 here is a top window in hierarchy – it was re-learned using command line call)
    7. I associated my tests with both OR1 & OR2. The test where Window2 was started from Window1 – FAIL, the test where Window2 was started using command line call – PASS.

    Please advice what I need to do to make it work.

  4. #4
    Advanced Member
    Join Date
    Mar 2007
    Location
    Salt Lake City, UT, USA
    Posts
    606
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can not remove Parents-Child properties for Window

    I'm wondering, if you check window2's title, is it EXACTLY the same when you launch it from window1 as it is when you launch it from your command line call?

    It would seem to me that if class and title are used as identification properties, and nothing else, and the title is correct and unique, then the window should be found regardless of whether it is a child window or not.

    But even one different character in the title would make it fail.

    So launch it both ways and use the Object Spy to look at those titles.

    Maybe you have already done this and maybe they are exactly the same and it still doesn't work, but it seems worth discussing to rule it out.

    If you do find some difference, try using a regular expression in the title property so the one OR reference covers both versions of the window title.
    "The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"

  5. #5
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can not remove Parents-Child properties for Window

    I did it all. The Object Spy shows a difference in “is owned window” and “hwnd” properties only – both are not used in OR.

    To be safe, I used Regular Expression (in case of something invisible, “space” for example) but it did not help.

 

 

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 11.54%
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:51 AM.

Copyright BetaSoft Inc.