rainmanwy / robotframework-SikuliLibrary

Sikuli Robot Framework Library provide keywords for Robot Framework to test UI through Sikuli.
Apache License 2.0
146 stars 61 forks source link

Get text keyword failed #86

Open FrenchhMan opened 5 years ago

FrenchhMan commented 5 years ago

Hello Everybody,

Get text keyword raised me an error

Win 7, 64 bits robotframework==3.1.1 robotframework-SikuliLibrary==1.0.4

Settings Library ExcelRobot Library SikuliLibrary

Variables ${IMAGE_DIR} ../imagesTelefi3.sikuli

Test Cases My Test Add Image Path ${IMAGE_DIR} Set Ocr Text Read True SikuliLibrary.Get Text

error:

DEBUG | java.lang.UnsatisfiedLinkError: Le module spécifié est introuvable. at com.sun.jna.Native.open(Native Method) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:263) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403) at com.sun.jna.Native.register(Native.java:1529) at com.sun.jna.Native.register(Native.java:1252) at net.sourceforge.tess4j.TessAPI1.(TessAPI1.java:41) at org.sikuli.script.TextRecognizer.start(TextRecognizer.java:56) at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:195) at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:190) at org.sikuli.script.Region.text(Region.java:4810) at com.github.rainmanwy.robotframework.sikulilib.keywords.ScreenKeywords.getText(ScreenKeywords.java:747) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:50) at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:62) at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$2.execute(AnnotationKeywordExtractor.java:84) at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37) at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:81) at com.github.rainmanwy.robotframework.sikulilib.SikuliLibrary.runKeyword(SikuliLibrary.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.robotframework.remoteserver.library.DynamicApiRemoteLibrary.runKeyword(DynamicApiRemoteLibrary.java:65) at org.robotframework.remoteserver.servlet.ServerMethods.run_keyword(ServerMethods.java:90) at org.robotframework.remoteserver.servlet.ServerMethods.run_keyword(ServerMethods.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115) at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106) at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46) at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86) at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200) at org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:112) at org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:196) at org.robotframework.remoteserver.servlet.RemoteServerServlet.doPost(RemoteServerServlet.java:122) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.robotframework.remoteserver.servlet.RemoteServerServlet.service(RemoteServerServlet.java:102) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:348) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Unknown Source)

Could someone help me, please?

Wesly-Yu commented 5 years ago

You can try just Get Text, do not add SikuliLIbrary. If the library have not same keyword, I just use the Click picture:Click xxx.png. I hope this can help you

rainmanwy commented 5 years ago

@FrenchhMan , how about jdk version you are using? And could you have a try to use "click" keyword, to make sure this is only related with ocr functionality?

FrenchhMan commented 5 years ago

@rainmanwy I use jdk1.8.0_191, python 3.6.7 And "click" keyword works fine in other test cases

FrenchhMan commented 5 years ago

@rainmanwy I Downgrade sikuliLibrary to robotframework-SikuliLibrary==1.0.2 and "get text" keyword works!!!! This is le only change I made

Maybe bug comes from version 1.0.4?

rainmanwy commented 5 years ago

@FrenchhMan , how about the version of tesseract? You may check this url