Hi Amith,
Did you save the project after setting the Mouse movement delay option to 0?
0 means that TestComplete won't drag the cursor - it will just put it to the needed position.
Anyway, I can suggest another idea to you. The code below clicks a menu item by using native properties of the menu control. Try using it:
function Main()
{
var fileMaintenance;
fileMaintenance = Sys.Process("FileMaintenance", 2);
asd=fileMaintenance.frmFMMainMenu.MainMenu;
ClickItem(asd, "File|Miscellaneous|Interface to Other Systems|HL7|HL7 Tele-Health Setup",0);
}
function ClickItem(items, itemStr, level)
{
tempResult = false;
var itemArray = itemStr.split("|");
itemCount = items.Count
for (var itemId = 0; itemId < itemCount; itemId++)
{
var currentItem = items.Items(itemId);
if (SameText(currentItem.Caption, itemArray[level]))
{
Log.LockEvents();
items.Select("[" + itemId + "]");
Log.UnlockEvents();
Delay(500);
items.Click("[" + itemId + "]");
tempResult = true;
if (level < itemArray.length - 1)
{
tempResult = ClickItem(currentItem.SubMenu, itemStr, level + 1);
}
return tempResult;
}
}
return tempResult;
}
Does it work for you?