I'm new to sikuli and I want to run firefox and set proxy on it (through foxyproxy) using sikuli. This code opens firefox and load "https://google.com". How would I click on foxyproxy button in firefox toolbar and create new proxy using sikuli?
import org.sikuli.script.*;
public class SikulixTest {
public static void main(String[] args) {
Screen s = new Screen();
App browser = App.open("Firefox");
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
browser.focus();
s.highlight(0);
s.type("https://google.com" + Key.ENTER);
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
browser.close();
}
}
Thanks,
Sikuli works based on visual pattern matching. In order to do what you need, you have to:
Pattern
Pattern pattern = new Pattern("screenshot.png");
Match m = s.find(pattern);
m.click();