SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Using tpAttachChild

    Hi,

    I've been trying to use tpAttachChild to try to attach to objects or search for objects with the scope of a currently attached object. However, it's not working for me and I'm wondering if I'm using it incorrectly.

    Here's an example:

    <table name="table1">
    <td>...</td>
    <td InnerText="SomeData">....</td>
    <td>...</td>
    </table>

    <table name="table2">
    <td>...</td>
    <td InnerText="SomeData">....</td>
    <td>...</td>
    </table>

    What I want to do is search "table2" for the existence of the "SomeData" TD. This is the code I have:

    Dim tdfind As THTMLTD
    Dim flags As tpAttachFlags

    flags = tpAttachNoWait & tpAttachChild

    HTMLTable("Name='Table2'").Attach

    Set tdfind = HTMLTD("InnerText='SomeData'", flags)

    If tdfind.Exists Then
    ....

    However, through experimentation, I know that this search returns the "SomeData" cell from Table1. I know I could use the "Index=2" property to make sure I get the TD from Table2, but this is a dynamic app and Table1 won't always exist.

    Am I using tpAttachChild incorrectly? I'd appreciate any advice on how to perform a search for objects within the scope of a currently attached object.

    Thx!!
    Scott.

  2. #2
    Member
    Join Date
    Aug 2007
    Location
    India
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using tpAttachChild

    Using tpAttachChild wouild not solve your problem.
    your Field in concern is htmltd object which in turn seems to be a dynamic control (ajax). It is one of the limitation of TestPartner to identify Dynamic Controls and execute it. I have mentioned same in my earlier posts

    http://www.sqaforums.com/showflat.php?Ca...true#Post535585

    http://www.sqaforums.com/showflat.ph...e=0#Post530381

    However as a workaround you need to use code like below:
    HTMLTD("InnerText=" & strFieldValue & " Row=1 Column=1").Click 15, 34.
    Here 15,34 are the my field coordinates where I want TestPartner to click. You need to change this coordinates depending location for htmltd in your application screen.
    -Manish
    TeatPartner 6.0.0 (Present)
    QTP 8.1 (Earlier)

 

 

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 11:49 AM.

Copyright BetaSoft Inc.