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.
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
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.
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
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.