SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Apr 2007
    Location
    AP,India
    Posts
    63
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Description: Not recognising the objects

    I am getting the following error while run below script

    "Cannot find the "Link" object's parent "Browser" (class Browser). Verify that parent properties match an object currently displayed in your application."

    code
    ------------------------------------------------------------
    With browser("Browser")
    Set bro=description.Create
    bro("opentitle").value=("Body Herbal Product, Now Foods, Herbal Life, Health Food Store, Home Remedy, Alternative Medicine, Health And Nutritional Supplements, Herbs at Herbspro.Com")
    Set page1=description.Create
    page1("url").value="http://www.herbspro.com/herbs/xq/asp/qx/default.htm"
    Set obj1=description.Create
    obj1("text").value="Alfalfa"
    wait(3)
    browser(bro).page(page1).link(obj1).click
    Set page_Alfalfa=description.Create
    page_Alfalfa("title").value="Alfalfa: Alfalfa Pure And Safe"
    Set obj2=description.Create
    obj2("text").value=" Life Minerals No Iron"
    wait(3)
    browser(bro).page(page).link(obj2).click
    .Page("1 Per Day Fat Burn - Buy").WebEdit("txtQty").Set 23
    .Page("1 Per Day Fat Burn - Buy").Image("Buy2").Click
    browser("Body Herbal Product, Now").Page("View cart page").WebButton("Update Basket").Click
    browser("Body Herbal Product, Now").Page("View cart page").WebButton("Continue Shopping").Click
    Set obj3=description.Create
    obj3("text").value=" Anti-oxidant Edge Tea"
    browser(bro).page(page).link(obj3).click

    Can any body send me updated script.

    Thanks,
    Rajesh.

  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: Description: Not recognising the objects

    Set the script up so that a message box appears when the error occurs (via test settings not actually code).

    When the error occurs, choose "Debug", then use object spy to click on the link you want. Then move up the hierachy and look at the properties for the browser. Check your properties for the browser against those in the object spy.

    It looks like you are not using the correct properties.

  3. #3
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Description: Not recognising the objects

    Do yo uhave Browser("Browser") in the OR? It doesnt look like DP.
    Vengat Ramanan.R

  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: Description: Not recognising the objects

    I don't see an "End With" in your script. I assume it must come later in the script or you would have a syntax error.

    So that means your "browser(bro).page(page).link(obj3).click" statment falls within the "With browser("Browser")" construct. I always end my "With" constructs before moving onto a different browser, so I don't really know if doing this would cause a problem or not, but it seems to me that it could very easily confuse QTP.

    Try removing the "With" statements from your script (CTRL+SHIFT+W).

    As I said, I have no idea how QTP handles having a second browser addressed inside the "With" statment for the first browser. Maybe it's not a problem at all.

    If nothing else, taking out the "With" statements should help with debugging the real problem.
    "The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"

  5. #5
    Member
    Join Date
    Apr 2007
    Location
    AP,India
    Posts
    63
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Description: Not recognising the objects

    Hi,
    In my script have "Endwith" statement, actually i copy and paste from midle of script, i forgot copy and paste "Endwith" in mail. And in OR have Browser("Browser").

    Thanks
    Rajesh

  6. #6
    Member
    Join Date
    Dec 2006
    Location
    Hyderabad, INDIA
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Description: Not recognising the objects

    Try using the property "title" in place of "opentitle" of Browser's description.

    Vijaya Bhaskar

  7. #7
    Member
    Join Date
    Dec 2006
    Location
    Hyderabad, INDIA
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Description: Not recognising the objects

    Why don't you write a generic script with the use of description objects without the use of object repository?

 

 

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 9.38%
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 06:41 AM.

Copyright BetaSoft Inc.