SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Help needed with creating Dynamic Links

    I am working on a data driven test script for QTP v 9.2. I need to have the script be able to recognise and click on the dynamic links within a webtable. I have tried using ChildObjects and ChildItems. Following is the code for each:

    ticker = "MMM"

    <<CHILDOBJECTS>>
    Set oDesc = Description.Create()
    oDesc("micclass").Value = "link"
    oDesc("name").value = ticker

    Set link1 = Browser("Bank of America | Simplified").Page("Pre-Trade Compliance :").WebTable("Latest Query Activity").ChildObjects(oDesc)
    link1.click

    ERROR: LINK1 OBJECT DOES NOT SUPPORT CLICK OPERATION

    <<CHILDITEM>>

    Set link1 = Browser("Bank of America | Simplified").Page("Pre-Trade Compliance :").WebTable("Latest Query Activity").ChildITEMS(ROW,COLUMN,"LINK",0)
    LINK1.CLICK

    ERROR: LINK1 OBJECT DOES NOT SUPPORT CLICK OPERATION

    Can anyone help me figure what is the issue here. I went through the documentation guide and it does not provide me any clue. Help will be greatly apprciated.

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

    Re: Help needed with creating Dynamic Links

    With ChildItem, the error is

    "Object required Link1". Please ignore the error msg I posted for Childitem code mentioned above.

  3. #3
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help needed with creating Dynamic Links

    Try this:

    Print Browser("Bank of America | Simplified").Page("Pre-Trade Compliance :").WebTable("Latest Query Activity").ChildItemCount(ROW,COLUMN,"Link")
    Set link1 = Browser("Bank of America | Simplified").Page("Pre-Trade Compliance :").WebTable("Latest Query Activity").ChildItem(ROW,COLUMN,"Link",0)
    link1.HighLight
    link1.Click

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

    Re: Help needed with creating Dynamic Links

    Thanks for the response.

    I tried Msgbox Browser("Bank.....
    before and after the Set Link1 command. It returns an error message saying " Object Variable not SET.

    link1.highlight and link1.click are still showing same error .. "Boject required:link1"

  5. #5
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help needed with creating Dynamic Links

    What does this give you?

    Print Browser("Bank of America | Simplified").Page("Pre-Trade Compliance :").WebTable("Latest Query Activity").ChildItemCount(ROW,COLUMN,"Link")

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

    Re: Help needed with creating Dynamic Links

    I get the count 0.

    So atleast we have figured out why it is failing. It is failing to recognize the child objects within the cell. Now is there any setting with the object repository required for it to be able to recognize the childitems in the webtable?

    Latest Query Activity webtable is ofcourse in the Repository.

  7. #7
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help needed with creating Dynamic Links

    By default QTP reads html tag and index properties for WebTable object into OR. When the page is dynamic, number of webtables might change and QTP will not identify correct webtable during replay. So I would suggest you to identify some unique properties(like name, LogicalName, Index etc.) for the desired webtable and update the OR.

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

    Re: Help needed with creating Dynamic Links

    It is able to recognize the webtable. It is not recognizing the link. since we r using the childitem method to extract the link within the cell of the webtable, i do not think we need to have the link to be reognized in the OR. Is that true?

  9. #9
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help needed with creating Dynamic Links

    If possible try saving the webpage and add to this thread as an attachment and somebody might help you here.

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

    Re: Help needed with creating Dynamic Links

    I could not save the webpage. So I have taken the screenshot. Hope this helps.
    Attached Files Attached Files

 

 
Page 1 of 3 123 LastLast

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 11.11%
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 02:21 PM.

Copyright BetaSoft Inc.