网页代码如下:<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>upload_file</title>
<link href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<div class="row-fluid">
<div class="span6 well">
<h3>upload_file</h3>
<input type="file" name="file" />
</div>
</div>
</body>
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.js"></script>
</html>
用ie打开的话ControlFocus("选择要加载的文件", "","Edit1")
WinWait("[CLASS:#32770]","",10)
ControlSetText("选择要加载的文件", "", "Edit1", "D:\\upload_file.txt")
Sleep(2000)
ControlClick("选择要加载的文件", "","Button1");
可以把路径输入进去
但是用Chrom的话,路径就输入不进去.
我应该怎么操作 |