Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Screen s;
- public static Region r;
- public static App firefox;
- public static void main(String[] args) throws Exception {
- setup();
- // Wait for login prompt
- s.wait("images/login_prompt.png", 25);
- // Fill in email
- Pattern p = new Pattern("images/login_email.png").similar((float) 0.69).targetOffset(-125,12);
- //s.type(p,"a", Key.CTRL);
- s.type(p,"test");
- tearDown();
- }
- public static void setup() throws Exception{
- s = new Screen(0);
- s.setFindFailedResponse(FindFailedResponse.SKIP);
- firefox = new App("C:/Program Files (x86)/Mozilla Firefox/firefox.exe");
- firefox.open();
- }
- public static void tearDown() throws FindFailed{
- //s.click("images/signout.png");
- firefox.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment