当前位置:网站首页>[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");
}
}
}
边栏推荐
- High landing pressure of "authorization and consent"? Privacy computing provides a possible compliance "technical solution"
- Mysql database literacy, do you really know what a database is
- [try to hack] cookies and sessions
- 2020版KALI安装教程
- 数字孪生能源系统,打造低碳时代“透视”眼
- 使用autoIt 上传文件
- What is the MySQL query view command
- It is the same that robots can win gold medals without maintenance and out of bounds
- selenium 文件上传方法
- Master slave replication of MySQL
猜你喜欢

How to solve MySQL 1045 error in Linux

力扣每日一题 06.29 两数相加

Tencent cloud released orbit, an automated delivery and operation and maintenance product, to promote enterprise applications to be fully cloud native

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

Does MySQL support foreign keys

Redis principle - sorted set (Zset)
Help MySQL data analysis with databend

0 basic self-study STM32 (wildfire) -- use register to light LED -- Explanation of GPIO function block diagram

How to create a virtual image

Mysql database literacy, do you really know what a database is
随机推荐
R语言ggplot2可视化:使用patchwork包(直接使用加号+)将两个ggplot2可视化结果横向组合、接着再和第三个图像横向组合起来(三幅图各占比例为50%、25%、25%)
在线SQL转CSV工具
设置双击运行 jar 文件
What are the advantages of SaaS services
开源仓库贡献 —— 提交 PR
Cross border independent station language Unicode to Hebrew
Younger sister Juan takes you to learn JDBC - 2-day dash Day1
Walk with love, educate and run poor families, and promote public welfare undertakings
Bags of Binary Words for Fast Place Recognition in Image Sequenc
SRM供应商协同管理系统功能介绍
正则表达式
腾讯云发布自动化交付和运维产品Orbit,推动企业应用全面云原生化
Development of freedom free agreement pledge mining system
2020版KALI安装教程
Maidong Internet won the bid of Dajia Insurance Group
自定義HandlerInterceptor攔截器實現用戶鑒權
Industry application of smart city based on GIS 3D visualization
2022 software evaluator examination outline
Li Kou today's question -535 Encryption and decryption of tinyurl
How to use interrupt