作者:年轻的周末我做主 | 来源:互联网 | 2022-03-12 07:42
这篇文章主要介绍了Pythonselenium使用autoIT上传附件过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
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中的调用:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。