Closed GoogleCodeExporter closed 9 years ago
I am also facing the same issue , I got the SLF4J issue resolved by adding the
corresponding JAR . But not able to get the Null Pointer cleared . I have tried
adding s.find also yet to no avail.
Original comment by anup....@gmail.com
on 5 Dec 2012 at 6:08
Original comment by doubles...@gmail.com
on 7 Dec 2012 at 11:05
null pointer means Sikuli isn't able to see the image on the screen.
can you please provide a screenshot of the screen when Sikuli is trying to find
the logo of google code?
Thanks!
Original comment by doubles...@gmail.com
on 7 Dec 2012 at 11:11
Screenshot of my entire desktop. It is taken when I am using a dual screen
setup.
Original comment by marton...@gmail.com
on 7 Dec 2012 at 11:23
Attachments:
can you try two things?
1. Test with a single monitor configuration.
2. Try
ScreenRegion s = new DesktopScreenRegion();
s.setScreen(new DesktopScreen(1));
please let us know whether if either (or both) solutions work
Original comment by doubles...@gmail.com
on 7 Dec 2012 at 7:32
OMG!
I am so sorry! Both at home and work I had a browser zoom-level set at
something other then 100% That is why it did not find anything >_<
The code from my first post works as it should when the browser zoom-level is
set to 100%. The Hello world is showing up and the mouse is clicking on the
logo.
Thank you for the support! And I apologize again for searching for somehting
that was not broken.
Now I can start playing with this API :)
Original comment by marton...@gmail.com
on 7 Dec 2012 at 8:06
Original comment by doubles...@gmail.com
on 7 Dec 2012 at 8:19
Even I can't get the hello world example to work.
I followed the same steps. I am getting error
Exception in thread "main" org.sikuli.api.SikuliRuntimeException: Image file
can not be loaded from http://code.google.com/images/code_logo.gif because
Can't get input stream from URL!
at org.sikuli.api.ImageTarget.<init>(ImageTarget.java:46)
at HelloWorldExample.main(HelloWorldExample.java:25)
Original comment by roopapat...@gmail.com
on 23 Mar 2013 at 6:00
It sounds like a network connection issue. My test code in the first post is
still working for me.
Are you behind a proxy? Slow internet connection? etc.
Try this code snippet to test if it is a network issue.
-----------------------------------------------------
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
public static void main(String[] args) {
try {
URL imageURL = new URL("http://code.google.com/images/code_logo.gif");
Object ob = imageURL.getContent();
System.out.println("This object should be an image class of some sort: " + ob);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
-----------------------------------------------------
I get the following output:
"This object should be an image class of some sort:
sun.awt.image.URLImageSource@587bd9f2"
Original comment by marton...@gmail.com
on 23 Mar 2013 at 1:54
Thank you.. now its working for me tooo!!!!!!!!1111
Original comment by roopapat...@gmail.com
on 24 Mar 2013 at 4:03
I am trying this code 1st time and its not working and getting smae errors.
could you please help me where i am getting wrong
Original comment by er.deep...@gmail.com
on 29 Aug 2013 at 6:04
Answer to @er.deep...@gmail.com
There are two kind of errors mentioned in this ticket. You have to be more
specific.
Have you tried to download my eclipse project mentioned at the top?
http://ge.tt/7HBAtdS/v/0?c
For example:
-[ Error 1 ]-
Exception in thread "main" java.lang.NullPointerException
at org.sikuli.api.visual.Canvas.addLabel(Canvas.java:230)
at HelloWorldExample.main(HelloWorldExample.java:37)
-[ Error 2 ]-
Exception in thread "main" org.sikuli.api.SikuliRuntimeException: Image file
can not be loaded from http://code.google.com/images/code_logo.gif because
Can't get input stream from URL!
at org.sikuli.api.ImageTarget.<init>(ImageTarget.java:46)
at HelloWorldExample.main(HelloWorldExample.java:25)
Original comment by marton...@gmail.com
on 29 Aug 2013 at 12:52
I came across same issue. find is returning null and my zoom level on the
browser is set to 100%. sikuli script worked reliably but i can't get the find
working in sikuli API. what am i doing wrong? it is the same example posted in
this thread is what i am using.
Original comment by mala.mun...@gmail.com
on 3 Mar 2014 at 8:12
s.setScreen(new DesktopScreen(1));
This only seems to work if I move my browser to the main screen manually first
and even then this code here doesn't seem to do anything
Canvas canvas = new DesktopCanvas();
canvas.addLabel(r, "Hello World").display(3);
Original comment by Peter.la...@googlemail.com
on 12 Nov 2014 at 2:20
Original issue reported on code.google.com by
marton...@gmail.com
on 30 Nov 2012 at 11:18