当前位置:网站首页>[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");
}
}
}
边栏推荐
- About harbor private warehouse forgetting the login password
- selenium上传文件
- Maidong Internet won the bid of Dajia Insurance Group
- R语言ggplot2可视化:使用patchwork包(直接使用加号+)将一个ggplot2可视化结果和一个plot函数可视化结果横向组合起来形成最终结果图
- What are the advantages of SaaS services
- 序列检测器
- R语言使用自定义函数编写深度学习线性激活函数、并可视化线性激活函数
- Yurun multidimensional makes efforts in the charity field and bravely resists the corporate public welfare banner
- What is a SCM system? What are the advantages of a supply chain management system?
- Viewing splitchunks code segmentation from MPX resource construction optimization
猜你喜欢

Maidong Internet won the bid of Dajia Insurance Group

mysql如何查询表的字符集编码

Automatic vending machine

Viewing splitchunks code segmentation from MPX resource construction optimization

基于STM32F103ZET6库函数串口实验

mysql在linux中2003错误如何解决

mysql查询视图命令是哪个

Redis 原理 - Sorted Set (ZSet)

How to solve MySQL 1045 error in Linux

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
随机推荐
Use SSH to pull codes
Face recognition 4- research on Baidu commercial solutions
KUKA机器人外部轴配置你一定要知道的那些知识
R language ggplot2 visualization: use the patchwork package (directly use the plus sign +) to horizontally combine the two ggplot2 visualization results, and then horizontally combine them with the th
About Kali using xshell connection
mysql视图能不能创建索引
Teach you how to install the latest version of mysql8.0 database on windows, nanny level teaching
Open source warehouse contribution - submit pr
SRM supplier collaborative management system function introduction
Automatic vending machine
How to use interrupt
How to establish and use KUKA subroutines / functions
基于STM32F103ZET6库函数独立看门狗(IWDG)实验
R语言使用自定义函数编写深度学习线性激活函数、并可视化线性激活函数
Mysql高可用集群–MHA
Epoll analysis
Cross border independent station language Unicode to Hebrew
Error:Connection refused: connect
R language uses GLM of mass package The Nb function establishes the negative binomial generalized linear model, and the summary function obtains the summary statistical information of the negative bin
Master slave replication of MySQL