[selenium2]利用AUTOIT上传 下载
2015-10-20 16:54
447 查看
If $CmdLine[0]<1 Then Exit EndIf
handleUpload($CmdLine[1])
Func handleUpload($uploadfile)
Dim $title="文件上传"
If WinWait($title,"",4) Then
WinActivate($title)
Sleep (1000)
ControlSetText($title,"","Edit1",$uploadfile)
ControlClick($title,"","Button1")
Else
Return False
EndIf
EndFunc
https://www.autoitscript.com/site/autoit/
java
public void handleUpload(String execute_file,String filepath) {
String cmd = "\"" + execute_file + "\"" + " " + "\"" + filepath + "\""; //with arguments
try {
Process p = Runtime.getRuntime().exec(cmd);
p.waitFor(); //wait for the upload.exe to complete
} catch (Exception e) {
e.printStackTrace();
}
}
handleUpload($CmdLine[1])
Func handleUpload($uploadfile)
Dim $title="文件上传"
If WinWait($title,"",4) Then
WinActivate($title)
Sleep (1000)
ControlSetText($title,"","Edit1",$uploadfile)
ControlClick($title,"","Button1")
Else
Return False
EndIf
EndFunc
https://www.autoitscript.com/site/autoit/
java
public void handleUpload(String execute_file,String filepath) {
String cmd = "\"" + execute_file + "\"" + " " + "\"" + filepath + "\""; //with arguments
try {
Process p = Runtime.getRuntime().exec(cmd);
p.waitFor(); //wait for the upload.exe to complete
} catch (Exception e) {
e.printStackTrace();
}
}
相关文章推荐
- Android 的数据存储方式有哪些?
- JDBC获取connection
- win7系统中重装win10系统的方法 win7系统重装win10系统图文教程
- 使用GridView实现仿桌面图标的设计
- CCNA学习笔记2---以太网
- 远程控制计算机
- php 命令行工具 日志请使用绝对路径
- iOS ---打开iPhone照相机和相册
- java学习——代理模式之动静PK
- 实现一个对象验证库系列 -- 1) 接口介绍以及总体思路概述 (请大神批评)
- android开源项目框架大全:
- 【SQL Server】左联接,右联接,内联接的比较
- C# WinForm 单例模式(例:同一个窗体只创建一次实例)
- android SeekBar双滑块
- Java 连接池的工作原理
- iOS开发笔记--超全!iOS 面试题汇总
- 带阻尼效果的scrollview,仿QQ空间
- LA3490 Generator
- Objective-C 协议(protocol)
- PLSQL之Split截取字符串