1.首先打开AutoIt Windows Info 工具,鼠标点击Finder Tool(按住左键不松手),鼠标将变成一个小风扇形状的图标,移动到目标控件上;如图

2.通过AutoIt Windows Info 获得以下信息。

窗口的title为“打开”,标题的Class为“#32770”。

文件名输入框的class 为“Edit”,Instance为“1” ,ClassnameNN为“Edit1”。

打开按钮的class 为“Button”,Instance为“1” ,所以ClassnameNN为“Button1”。

3.编写脚本(因为IE、Chrome、FireFox文件上传的左上角位置title不一致,所以我们坐下适配)
编写工具:SciTE Script Editor应用程序

4.转换成exe文件:打开autoit安装目录下的应用程序:Compile Script to .exe (x86)或者Compile Script to .exe (x64)

5.在selenium中的调用: