var 生成图片 = function(wb,A,B,C,D,E,F,G,H,I,J){
import chrome.auto
wb = chrome.auto()
//第二个参数可以指定打开的浏览器
wb.setWinSize(1080,2170)
wb.startBrowser()
wb.go("D:\VIP开通质检\1.附件质检\VPN电子报告.html")
wb.wait()
wb.queryXpath(`//*[@id="text1"]`).value = C
wb.queryXpath(`//*[@id="text2"]`).value = tostring(time(F) ,"%Y年%m月%d日")
wb.queryXpath(`//*[@id="text3"]`).value = I
wb.queryXpath(`//*[@id="text4"]`).value = H
wb.queryXpath(`//*[@id="text5"]`).value = G
wb.queryXpath(`//*[@id="text6"]`).value = H
wb.queryXpath(`//*[@id="text7"]`).value = J
wb.queryXpath(`//*[@id="text8"]`).value = A
wb.queryXpath(`//*[@id="text9"]`).value = B
wb.queryXpath(`//*[@id="text10"]`).value = E
wb.queryXpath(`//*[@id="text11"]`).value = "30M"
wb.queryXpath(`//*[@id="text12"]`).value = "光猫"
wb.queryXpath(`//*[@id="text13"]`).value = "电信提供"
wb.queryXpath(`//*[@id="text14"]`).value = "FE/GE 光口"
wb.queryXpath(`//*[@id="text15"]`).value = "Ping测试"
wb.queryXpath(`//*[@id="text16"]`).value = "光猫LAN1口"
wb.queryXpath(`//*[@id="text17"]`).value = "PDA"
wb.queryXpath(`//*[@id="text18"]`).value = "IP-VPN"
wb.queryXpath(`//*[@id="text19"]`).value = "30M"
wb.queryXpath(`//*[@id="text20"]`).value = "0.02"
wb.queryXpath(`//*[@id="text21"]`).value = "0.00"
wb.queryXpath(`//*[@id="text22"]`).value = "0.00"
wb.queryXpath(`//*[@id="text23"]`).value = "0.00"
wb.queryXpath(`//*[@id="text24"]`).value = "0.00"
wb.queryXpath(`//*[@id="text25"]`).value = "-16"
wb.queryXpath(`//*[@id="text26"]`).value = math.random(1,15)++"KM"
wb.queryXpath(`//*[@id="text27"]`).value = "喀什"
wb.queryXpath(`//*[@id="text28"]`).value = tostring(time(F) ,"%Y年%m月%d日")
wb.queryXpath(`//*[@id="text29"]`).innerText = H
wb.queryXpath(`//*[@id="text30"]`).innerText = A
wb.queryXpath(`//*[@id="text31"]`).value = J
wb.queryXpath(`//*[@id="text32"]`).value = tostring(time(F),"%Y年%m月%d日")
f = "/生成图片/"++E++"_电子交付报告.jpeg"
wb.saveScreen(f)
wb.close()
return f;
}
核心代码见上文