1、官网下载https://www.autoitscript.com/site/autoit/downloads/,点击下载autoit-v3-setup
selenium -上传文件
温馨提示:
autoit-v3-setup
链接: https://pan.baidu.com/s/1HSSemWbhYrEKX9v47LgpZg 提取码: uyd9

2、.双击autoit-v3-setup,一直点next安装
selenium -上传文件
3、点击autoit window info x86(用于识别wondow窗口信息),弹出定位窗口
selenium -上传文件
selenium -上传文件
4、点击Finder Tool 一直移动到文件输入框中
selenium -上传文件
5、获取文件名输入框的值
selenium -上传文件
6、获取打开按钮的定位
selenium -上传文件
7、打开script editor,用于编写autoit脚本
selenium -上传文件
8、根据刚才的定位值,编写脚本,保存为au3格式的文件

;ControlFocus(“title”,“text”,controlID) Edit1=Edit instance 1
ControlFocus(“打开”, “”,“Edit1”)

; Wait 10 seconds for the Upload window to appear
WinWait("[CLASS:#32770]","",10)

; Set the File name text on the Edit field

ControlSetText(“打开”, “”, “Edit1”, “C:\Users\Pictures\1.jpg”)

Sleep(2000)

; Click on the Open button

ControlClick(“打开”, “”,“Button1”);
提示:
autoit脚本,链接: https://pan.baidu.com/s/1G3qptNqFzsgxjrv78T-mBw 提取码: g7n9

9、打开Compile Script to.exe,选择之前保存好的au3格式的文件,再选择要保存exe的路径,点击Convert,就会生成一个exe文件
selenium -上传文件
10、添加以下代码
import os

#selenium定位上传按钮

#生成的openfile.exe放在在D盘,

os.system(r"D:\openfile.exe")

提示:
openfile.exe链接: https://pan.baidu.com/s/1C9fTZtkPH-GdJDEbE7qq3A 提取码: wjgi 复制这段内容后打开百度网盘手机App,操作更方便哦

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-04
  • 2021-06-08
  • 2021-11-19
  • 2021-11-04
  • 2022-03-07
  • 2021-08-01
相关资源
相似解决方案