|
弹出的菜单是用javascript写的,代码如下:
var oPopup = window.createPopup();
function ShowMenu()
{
var e = event.srcElement;
var id = e.attributes["VID"].value;
var companyid = e.attributes["CompanyID"].value;
var t=e.offsetTop;
var l=e.offsetLeft;
var h = e.offsetHeight;
while(e=e.offsetParent)
{
t+=e.offsetTop;
l+=e.offsetLeft;
}
t+=h;
setMenuParam(id,companyid);
oPopup.document.body.innerHTML = ContextMenu.innerHTML;
oPopup.show(l, t, 100, 20, document.body);
}
弹出的菜单如附件中1.bmp所示.
但是无法录制点击的这个事件,我写了脚本来实现,运行脚本没有错误,但没有窗口弹出,也没有任何反应.
我写的脚本是:
Dim page_payroll
set page_payroll = Browser("Mariners Döhle (IOM)").Page("Mariners Döhle (IOM)_2")
page_payroll.Sync
page_payroll.frame("menu").WebElement("html tag:=td","innertext:=Wages").click
page_payroll.frame("menu").WebElement("html tag:=td","innertext:=Payroll").click
page_payroll.frame("f3").Image("menuDown").click
page_payroll.frame("f3").WebElement("html tag:=td","innertext:=Edit").Click
请高手指教!万分感激! |
|