I have tried the solution you have provided but it didnt work out.
I have a clarification, will I be able to use the InnerText property of the object and identify and perform action on it. During the record it has fetched the ID and the Index properties.
Fist of all does TD has any ID because Index is not efficient way of working, this index can change any time depending on if new object is added.
lets assume if the TD has ID called "All-Ready-Clicked" then you can do similar thing
[ QUOTE ]
If HTMLTD("ID='All-Ready-Clicked",tpAttachWait).Exists = true then
msgbox("You are already In")
[/ QUOTE ]
above code will check if the HTMLTD exists then do nothing and if it doesn’t exists then click on HTMLAchor property. you can also check further to see if even HTMLAnchor property exists as well or not, and if not then raise failure log otherwise click.
I have created a generic function for this ..
PF below code
Function click_anchor(ByVal val As String)
Dim win As TWindow
Set win = TestPartner.ActiveWindow
If HTMLAnchor("Caption='" + val + "'", tpAttachNoWait).Exists Then
HTMLAnchor("Caption='" + val + "'").Click
If HTMLTD("InnerText=' " + val + "'", tpAttachNoWait).Exists Then