SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Sep 2005
    Location
    NJ,USA
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Browser identification problem using DP

    Set tBrowser = Description.Create
    tBrowser("Class Name").value="Browser"
    tBrowser("title").value="XYZ Portal"
    tBrowser("name").value="XYZ Portal"
    tBrowser("version").value="internet explorer 6"
    tBrowser("application version").value="internet explorer 6"
    tBrowser("opentitle").value="xxx.net"
    tBrowser("micclass").value="browser"
    tBrowser("creationtime").value="0"
    tBrowser("openedbytestingtool").value="False"
    tBrowser("hasmenubar").value="True"
    tBrowser("hasstatusbar").value="True"
    tBrowser("hastoolbar").value="True"

    Set tPage=Description.Create
    tPage("name").value="foo"
    tPage("Class Name").value="Page"
    tPage("title").value="XYZ Portal"

    Set tFrame=Description.Create
    tFrame("title").value="ActgMethod-Insert View"
    tFrame("html tag").value="IFRAME"
    tFrame("html id").value="_jsx_0_d_iframe"
    tFrame("name").value="pageDetails"
    tFrame("Classs Name").value="Frame"

    Set tWbTable=Description.Create
    tWbTable("Class Name").value="WebTable"
    tWbTable("html tag").value="TABLE"
    tWbTable("outertext").value="Actg Methd:*Description:"
    tWbTable("text").value="Actg Methd:*Description:"
    tWbTable("html id").value="TABLE"
    tWbTable("name").value="{actionForm.actg_method}"
    tWbTable("innertext").value="Actg Methd:*Description:"

    Set tWbEdit = Description.Create
    tWbEdit("Class Name").value="WebEdit"
    tWbEdit("html tag").value="INPUT"
    tWbEdit("type").value="text"
    tWbEdit("name").value="{actionForm.actg_method}"


    Browser(tBrowser).Page(tPage).Frame(tFrame).WebTab le(tWbTable).WebEdit(tWbEdit).Set "Test"

    - the above statement gives an error 'Cannot find the "[WebEdit]" object's parent "[Browser]"(class Browser).Verify that parent properties match the object currently displayed in your application.

    i'm using QTP 9.2 with Web Add in on a IE(6.0,SP2).i have only one instance of the browser open while running script.

    can anyone throw some light into this problem.i tried adding/deleting some of the properties but it doesn't seem to work.

    thanks.

  2. #2
    Senior Member
    Join Date
    Mar 2006
    Location
    Bristol, UK
    Posts
    1,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser identification problem using DP

    Why are you using so many identifiers? You should use teh minimum you can get away with.

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Browser identification problem using DP

    First mistake is that there is nothing called "Class Name" in QTP (though object spy does show that). You need to use micclass for that.

    Second mistake is choosing the correct identification parameter
    Image i try to identify you by your name, your age, our hobbies etc...Now your age will change at certain moment in time, you hobbies also might change... Which means i would not be able to identifiy you know.

    But in case your name is unique then i can just remember you using your name only. So choose the identification properties very carefully.

    'for browser
    Set tBrowser = Description.Create
    tBrowser("creationtime").value="0"

    'for page
    Set tPage=Description.Create
    tPage("micclass").value="Page"

    'for frame
    Set tFrame=Description.Create
    tFrame("html tag").value="IFRAME"
    tFrame("html id").value="_jsx_0_d_iframe"

    'For table
    Set tWbTable=Description.Create
    tWbTable("micclass").value="WebTable"
    tWbTable("name").value="{actionForm.actg_method}"
    tWbTable("name").RegularExpression = False

    'Web edit
    Set tWbEdit = Description.Create
    tWbEdit("micclass").value="WebEdit"
    tWbEdit("name").value="{actionForm.actg_method}"
    tWbEdit("name").RegularExpression = False

  4. #4
    Junior Member
    Join Date
    Sep 2005
    Location
    NJ,USA
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Browser identification problem using DP


    thanks a ton,tarun..it works !

    i used 'Class Name' bcos that's how the OR shows while spying.i guess my usage of too many identfiers as robbie too pointed out added to the problem.

    thank both of you for the prompt replies.

 

 

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 © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (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 06:33 AM.

Copyright BetaSoft Inc.