当前位置:网站首页>Uploading files using AutoIT
Uploading files using AutoIT
2022-06-29 17:40:00 【bobob_】
1. Write a script
$fileName=$cmdline[1]
ControlFocus(" open ","","Edit1")
ControlSetText(" open ","","Edit1",$fileName)
ControlClick(" open ","","Button1")
2. Compile the script as : uploadFile.exe
3. stay java Call in code uploadFile.exe
/**
*
* @param fileName Full path file name e.g :C:\\Users\\Administrator\\Downloads\\user_ex.csv
*/
public static void uploadFile(String fileName) {
try {
if(I2GUITestPage.isDebug()){
Runtime.getRuntime().exec("D:\\bat\\autoit\\uploadFile.exe "+fileName);
}else{
Runtime.getRuntime().exec("Z:\\resources\\uploadFile.exe "+fileName);
}
} catch (IOException e) {
e.printStackTrace();
}
}
Little knowledge points :
stay cmd In the implementation of AutoIt When automating scripts , You can pass parameters to the script .
AutoIt When the script is executing , Automatically initializes a special array $CmdLine, among $CmdLine[0] Represents the number of parameters ,$CmdLine[1] Represents the first parameter ,$CmdLine[2] representative The second parameter .
边栏推荐
- 如何使用B/S开发工具DevExtreme的图表控件 - 自定义轴位置?
- 2022 software evaluator examination outline
- PCB frame drawing - ad19
- What is the function of MySQL cursors
- 2022春夏系列 KOREANO ESSENTIAL重塑时装生命力
- About harbor private warehouse forgetting the login password
- 剖析下零拷贝机制的实现原理,适用场景和代码实现
- Master slave replication of MySQL
- Help MySQL data analysis with databend
- 第42期:MySQL 是否有必要多列分区
猜你喜欢

sequential detector

How to create a virtual image

What is the MySQL query view command

SRM supplier collaborative management system function introduction
![分割回文串[dp + dfs组合]](/img/7b/221b000984977508f849e19802c2c2.png)
分割回文串[dp + dfs组合]

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

序列检测器

迈动互联中标大家保险集团
Master slave replication of MySQL

DevCloud加持下的青软,让教育“智”上云端
随机推荐
Multi mode concurrent implementation of tortoise and rabbit race in go language
How to establish and use KUKA subroutines / functions
力扣每日一题 06.29 两数相加
KUKA robot external axis configuration what you must know
L'intercepteur handlerinterceptor personnalisé permet l'authentification de l'utilisateur
What is a SCM system? What are the advantages of a supply chain management system?
育润多维发力慈善领域,勇抗企业公益大旗
Mysql高可用集群–MHA
数字孪生能源系统,打造低碳时代“透视”眼
2022 spring summer collection koreano essential reshapes the vitality of fashion
Open source warehouse contribution - submit pr
SRM供应商协同管理系统功能介绍
[try to hack] cookies and sessions
Repair of JSON parsing errors in a collection
External automatic (PLC start robot)
Sectigo ov pan domain name certificate is 1590 yuan a year easy to use
mysql. What is the concept of sock
R language ggplot2 visualization: use the patchwork package (directly use the plus sign +) to horizontally combine a ggplot2 visualization result and a plot function visualization result to form the f
KUKA机器人外部轴配置你一定要知道的那些知识
R语言ggplot2可视化:使用patchwork包(直接使用加号+)将两个ggplot2可视化结果横向组合、接着再和第三个图像横向组合起来(三幅图各占比例为50%、25%、25%)