1
這是AutoIt腳本無法使用機器人及的AutoIt腳本
ControlFocus("File Upload","","Edit1")
ControlSetText("File Upload","","Edit1", "file path")
ControlClick("File Upload","","Button1")
而且機器人腳本是做文件上傳功能在詹金斯:
StringSelection stringSelection = new StringSelection(string);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null);
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
我只是試圖與上述腳本jenkins
執行,但它不起作用。 任何人都可以請建議我與正確的執行腳本。