1. 如果要在某個主窗體中執行JS,使用 appcan.window.evaluateScript(name,scriptContent)
eg: appcan.window.evaluateScript('index','alert(1)')
2. 如果要在某個 浮動窗體、彈出窗體 中執行JS,使用 appcan.window.evaluatePopoverScript(name,popName,scriptContent)
eg: appcan.window.evaluatePopoverScript('submitOrder','popname','alert(1)')
主窗口name 浮動name js
*需要注意,在Appcan默認創建的主文件中,加載浮動窗口要加入浮動窗口名稱,
eg:appcan.frame.open("content", "submitOrder_content.html", 0, titHeight,"popname");
id url 定位 浮動窗口名稱
* 此方法與 appcan.frame.evaluateScript(name,popName,scriptContent) 實驗后,都可以用在 浮動窗體 上,彈出窗體沒有試過。