我正在运行一个Ruby脚本,使用Watir为我自动化一些事情。我正在尝试自动将一些文件保存到某个目录。因此,在我的Mozilla设置中,我将默认下载目录设置为桌面,并选择自动保存文件。
但是,当我开始运行我的脚本时,这些更改不会反映出来。似乎首选项又恢复为默认设置。我包含了以下内容
require "rubygems" # Optional.
require "watir-webdriver" # For web automation.
require "win32ole" # For file save dia
public class MyFirstSikuliTest {
public static void main(String[] args) {
App.open("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
Screen s = new Screen();
try{
s.click("How do I take the screenshot and pass the path of the PNG here?", 0);