浏览器动作
示例1:
import chrome.driverex
import process.imageView
driver = chrome.driverex()
//禁止显示浏览器被控制提示
driver.disableAutomation()
wb = driver.startBrowser()
wb.go("https://tieba.baidu.com/")
wb.wait()
wb.go("https://www.sohu.com/")
wb.wait()
//后退
wb.back()
win.delay(2000)
//前进
wb.forward()
win.delay(2000)
//刷新
wb.refresh()
wb.wait()
//网页截图
wb.saveScreen("/截图.jpg")
//查看图片
process.imageView("/截图.jpg")
浏览器信息获取:
示例2:
import chrome.driverex
driver = chrome.driverex()
//禁止显示浏览器被控制提示
driver.disableAutomation()
wb = driver.startBrowser()
wb.go("https://tieba.baidu.com/")
wb.wait()
//返回所有窗口句柄数组
handles = wb.getWindowHandles()
win.msgbox(handles)
//返回窗口区块table
re = wb.getRect()
win.msgbox(re)
//返回cookie数组
cookie = wb.getCookie()
win.msgbox(cookie)
//返回页面源码
import console
console.logPause(wb.getSource())