Currently, I am conducting tests on a web application that requires me to validate the information displayed in a tooltip when my mouse hovers over a specific area of the graphics.
The following is the snippet of HTML code responsible for generating this tooltip:
<div id="area-serverSlot-6a" class="annotation" style="width: 21px; height: 38px; left: 186px; top: 117px; position: absolute; z-index: 20; cursor: pointer;" name="annotation" present="1" tooltip="" href="javascript:select_module('server', '6a');" onareaover="javascript:DisplayTip('serverSlot-6a', TITLE,'Server Slot 6a')" onareaout="javascript:UnTip()"></div>
I am facing difficulty accessing the content of the tooltip as it moves along with the mouse cursor. Any suggestions on how I can extract the tooltip contents?
Below is the code snippet for DisplayTip function:
function DisplayTip()
{
var titleType = arguments[2];
var slotNumPos = titleType.lastIndexOf(' ');
var slotNum = " UNKNOWN";
var title = "UNKNOWN";
if (titleType.indexOf('Server') >= 0) title = vServerSlot;
else if (titleType.indexOf('IOM') >= 0) title = vIOMSlot;
else if (titleType.indexOf('PSU') >= 0) title = vPSUSlot;
else if (titleType.indexOf('CMC') >= 0) title = vCMCSlot;
else if (titleType.indexOf('KVM') >= 0) title = vKVMSlot;
else if (titleType.indexOf('Fan') >= 0) title = vFanSlot;
else if (titleType.indexOf('LCD') >= 0) title = vLcdSlot;
if (slotNumPos >= 0)
{
slotNum = titleType.substring(slotNumPos);
title += slotNum;
}
TagToTip(arguments[0], TITLE, title, JUMPHORZ, true,
JUMPVERT, true, ABOVE, true);
}