如何将值从autoit脚本返回到selenium
如何将值从autoit脚本返回到selenium 我想将字符串值从autoit返回到selenium如何将值从autoit脚本返回到selenium,selenium,autoit,Selenium,Autoit,如何将值从autoit脚本返回到selenium 我想将字符串值从autoit返回到selenium String t = Runtime.getRuntime().exec("D:\\AutoItScipts\\downloadWindow.exe"); System.out.println(t); 谢谢,阅读流程的输入流: Process p = Runtime.getRuntime().exec("your autoIT exe file path"); BufferedReader
String t = Runtime.getRuntime().exec("D:\\AutoItScipts\\downloadWindow.exe");
System.out.println(t);
谢谢,阅读流程的输入流:
Process p = Runtime.getRuntime().exec("your autoIT exe file path");
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while ((line = input.readLine()) != null) {
System.out.println(line);
}
然后,方法waitFor()
将使当前线程等待外部程序完成并返回退出值
int exitVal = p.waitFor();
System.out.println("Exited with error code "+exitVal);
在AutoIT脚本中,您可能需要将输出写入控制台(请尝试):
到目前为止你都试了些什么?
ConsoleWrite("data")