| || |
How to get Tooltip text for a link ?
I want to get the tooltip text for a Link object. I am working on JAVA web based application. I tried couple of solutions mentioned in this forum before.
Please help me out regarding this.
I tried below mentioned code after doing: BrowserObject.Link("Hari").FireEvent "onmouseover"
Const GW_ENABLEDPOPUP = 0
extern.Declare micInteger,"GetWindow","user32.dll","GetWindow", micInteger , micInteger
hwnd_parent = Browser("title:=EDM.*").GetROProperty("hwnd")
hwnd_child = extern.GetWindow(hwnd_parent , GW_ENABLEDPOPUP)
popup_text = Window("hwnd:=" & CStr(hwnd_child)).GetVisibleText
In above code I got a value for hwnd_child but in the next statement, I got error msg as :
Cannot identify the object "[ Window ]" (of class Window). Verify that this object's properties match an object currently displayed in your application.
Line (78): "popup_text = Window("hwnd:=" & CStr(hwnd_child)).GetVisibleText".
2nd one :
I too tried the code: Here Var is the OuterHtml of the link
Var = "<A onmouseover=callthis(data,2) onmouseout=closepopup() href=""/edm/patient/documents.do?action=loadDocuments&amp;view_pat ients_navigator_link=Documents&amp;patientSid= 9376&amp;facilitySid=65&amp;alias=false&am p;amp;accountNo="" target=_self data='JONES, ALICE "". Acct #: 12345 AD: 01/30/2006 DD: 01/30/2006 Visit Type: No Data&#10;JONES, ALICE "". Acct #: 0022330394030 AD: 01/30/2004 DD: 01/30/2004 Visit Type: E'>JONES, ALICE "". </A>"
Set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = 1
oIE.Document.Body.innerhtml = Var
Re: How to get Tooltip text for a link ?
I have tried such validation in the past with no luck. Since the ToolTip exists in my ASPX page it will always find it. I have not been able to capture the text as a check point. But... After speaking to our dev team their take is that this is an IE control and not any code they have written. So if the tip exists in the source code it should be visible when the user mouse's over. Sorry I am not much help just wanted to share my experience with the issue.