selenium 上传文件之AutoIt

1.下载地址:https://www.autoitscript.com/site/

 

2.

 

 

通过这个进行下面操作

 

 

 

3.

 

 

 

4.

 

 

 

通过这个编写【注意“打开”是你 当前的弹层名字;保存格式为au3,如upload.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\hui\Desktop.zip")

Sleep(2000)

; Click on the Open button

ControlClick("打开", "","Button1");

 

5.

 

 

通过这个 把au3 转换为exe

 

 

6.在代码中调用

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章