当前位置:网站首页>[webdriver] upload files using AutoIT
[webdriver] upload files using AutoIT
2022-06-29 17:40:00 【bobob_】
One 、AutoIt be used for Windows GUI( Graphical interface ) Automatic operation in the system .
Official website :https://www.autoitscript.com/site/
Edit the windows Script

Click capture element

Element found

Through the two figures above AutoIt Windows Info in Control page Get the following information .
Window title by “ Upload files ”, The title of Class by “#32770”.
Of the file name input box class by “Edit”,Instance by “1” ,ClassnameNN by “Edit1”.
Turn on the button class by “Button”,Instance by “1” ,ClassnameNN by “Button1”.
3、 open SciTE Script Editor Editor , Write a script .
SciTE Script Editor The editor is as follows :

ControlFocus(" open ", "", "Edit1")
WinWait("[CLASS:#32770]","",3)
ControlSetText(" open ","","Edit1","C:\DuBo\Desktop\TestData3.pdf")
Sleep(2000) ; wait for 2 Second
ControlClick(" open ","","Button1")
4、 Save the script as uploadFile.au3, And then keep uploadFile.html The upload file window of is open , Then pass Run Script Tools will uploadFile.au3 Turn on run

5. Call... Through an automated test script upfile.exe Program upload
public class UploadFile {
public static void main(String[] args) {
.........
try {
String str = "E://uploadFile.exe";
rn.exec(str);
} catch (Exception e) {
System.out.println("Error to run the exe");
}
}
}
边栏推荐
- Basic operations such as MySQL startup under Windows platform
- Face recognition 4- research on Baidu commercial solutions
- 自定义HandlerInterceptor拦截器实现用户鉴权
- Master slave replication of MySQL
- 基于gis三维可视化的智慧城市行业运用
- 自定義HandlerInterceptor攔截器實現用戶鑒權
- Open source warehouse contribution - submit pr
- MySQL highly available cluster – MHA
- 关于KALI使用xshell连接
- 在线SQL转CSV工具
猜你喜欢

在线SQL转CSV工具

LeetCode 每日一题——535. TinyURL 的加密与解密

关于日期相加减问题

mysql在linux中2003错误如何解决

High landing pressure of "authorization and consent"? Privacy computing provides a possible compliance "technical solution"

Does MySQL support foreign keys

The soft youth under the blessing of devcloud makes education "smart" in the cloud

【WebDriver】使用AutoIt上传文件

Inherit Chinese virtues, pay attention to the health of the middle-aged and the elderly, and Yurun milk powder has strong respect for the elderly

小程序容器是什么技术?能助力物联网企业红海突围?
随机推荐
Error:Connection refused: connect
使用 SSH 方式拉取代码
sequential detector
2022 spring summer collection koreano essential reshapes the vitality of fashion
SAAS 服务的优势都有哪些
Basic operations such as MySQL startup under Windows platform
Bottom level internal skill cultivation
基于STM32F103ZET6库函数PWM输出实验
Error:Connection refused: connect
MySQL触发器如何创建与删除
What are the usage scenarios for locks in MySQL
传承中华美德,关注中老年大健康,育润奶粉敬老情浓
Younger sister Juan takes you to learn JDBC - 2-day dash Day1
Can MySQL views create indexes
What is a SCM system? What are the advantages of a supply chain management system?
LeetCode 每日一题——535. TinyURL 的加密与解密
DevCloud加持下的青软,让教育“智”上云端
Kubernetes deployment dashboard (Web UI management interface)
About Kali using xshell connection
The R language uses the KAP function (kap.2.raters function) of epidisplay package to calculate the value of kappa statistics (total consistency, expected consistency), analyze the consistency of the