public static void main(String[] args) throws MalformedURLException, InterruptedException
{
// Open the main page of Google Code in the default web browser
browse(new URL("MYAPP"));
// Create a screen region object that corresponds to the default monitor in full screen
ScreenRegion s = new DesktopScreenRegion();
System.out.println("jiuiuiuddfcscdesi");
ScreenRegion result = s.wait(new ImageTarget(new File("//home//dgangwar/LoginFields.PNG")), 5000);
System.out.println(null==result);
System.out.println("jiuiuiui");
// //Target imageTarget = new ImageTarget(new File(DataFile.USERIDTEXT));
Mouse mouse = new DesktopMouse();
mouse.click(result.getCenter());
Mouse mouse = new DesktopMouse();
mouse.click(result.getCenter());
Keyboard kb = new DesktopKeyboard();
kb.type("Hijhiih");
}
}
After running this program I got the below error.
sikuli main" java.lang.UnsatisfiedLinkError:
I added the Path and Sikuli_Home variable to my Eclipse Run configuration, after this the above error did not come.
Now I ran the Test case and got the below error. I have set up my VNC with 3 screen resolutions.
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.Desktop.getDesktop(Desktop.java:142)
at org.sikuli.api.API.browse(API.java:20)
at FirstStandAlone.main(FirstStandAlone.java:18)
What is the expected output? What do you see instead?
I used the same code on windows and it worked fine but on Linux I had the above problem.
What version of the product are you using? On what operating system?
GNU/LINUX , Sikuli-api-1.0.2-standalone.jar, Java SE 6
Original author: dharmesh...@gmail.com (March 30, 2013 16:19:18)
What steps will reproduce the problem?
import java.io.File; import java.net.MalformedURLException; import java.net.URL;
import javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler;
import org.sikuli.api.*; import org.sikuli.api.robot.Keyboard; import org.sikuli.api.robot.Mouse; import org.sikuli.api.robot.desktop.DesktopKeyboard; import org.sikuli.api.robot.desktop.DesktopMouse; import org.sikuli.api.visual.Canvas; import org.sikuli.api.visual.DesktopCanvas;
import static org.sikuli.api.API.*;
public class FirstStandAlone {
// //Target imageTarget = new ImageTarget(new File(DataFile.USERIDTEXT)); Mouse mouse = new DesktopMouse(); mouse.click(result.getCenter());
}
After running this program I got the below error.
Now I ran the Test case and got the below error. I have set up my VNC with 3 screen resolutions.
Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.Desktop.getDesktop(Desktop.java:142) at org.sikuli.api.API.browse(API.java:20) at FirstStandAlone.main(FirstStandAlone.java:18)
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue: http://code.google.com/p/sikuli-api/issues/detail?id=41