-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmapped response #35
Comments
Hi @clay227 , You can find examples of Sikuli tests here - https://github.com/echoAlexey/selenium-examples We will add example project under Sterodium organisation shortly together with extended Selenium Grid launcher. |
Hello echoAlexey thank you for the replay, |
Do you use extension-proxy on hub? https://github.com/sterodium/selenium-grid-extensions/wiki/Hub-Configuration Same 0.5 version. |
yes 0.5 |
hello ,
This make the sterodium-rmi 02 version work. however i now get another exception, maybe i should add another dependencyManagement ? here is the exception: 7507 [PoolService-0] INFO i.s.r.p.c.RemoteObjectMethodInterceptor - Converting response 'System' to type class java.lang.String or java.lang.Stri |
As before the DesktopScreenRegion parameter value seem to be null after getting it's value from client.getDesktop() the node seems to get the request since i see in its logs: working with the mouse seems to work well, but nothing that requires DesktopScreenRegion can work. |
First, we don't support this version of sikuli. <dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency> Node will have <dependency>
<groupId>org.sikuli</groupId>
<artifactId>sikuli-api</artifactId>
<version>1.2.0</version>
</dependency> sikuli dependency. On a client it is recommended to use same version, because client API is proxied and method calls are sent via REST to node and then executed on the same version of library. Can you please try your grid setup against sample tests from example project: https://github.com/echoAlexey/selenium-examples |
thanks echoAlexey, always get : |
also note that the line 45 in SikuliHelper : 14747 [PoolService-0] INFO i.s.r.p.c.RemoteObjectMethodInterceptor - Converting response 'Invocation Exception: java.lang.RuntimeException: Method io.sterodium.extensions.node.rmi.TargetFactory.createImageTarget threw exception' to type class org.sikuli.api.ImageTarget or java.lang.String |
Please note that SikuliExtensionClient wraps Sikuli API and makes it remote. When you do it yourself - your classes are not proxied and cannot work remotely. Thus when you use sikuli api you should instantiate all classes with SikuliExtensionClient. Correct usage is SikuliExtensionClient sikuliExtensionClient = new SikuliExtensionClient(host, port, sessionId);
sikuliExtensionClient.uploadResourceBundle("folder-in-resources");
sikuliExtensionClient.getTargetFactory().createImageTarget("Capture1.png"); What happens here:
Can you check logs of your selenium grid (hub and nodes) to determine what may go wrong when you call ImageTarget imageTarget = targetFactory.createImageTarget(resource); It seems that image target is not created remotely or some exception is thrown in the middle. We are working on improving exception handling. =) Next release will have that. |
Hello again, FYI when i use the "test" folder for images i got the this exception the node side: 11:52:54.083 WARN - Method io.sterodium.extensions.node.rmi.TargetFactory.create
java:243)
java:243) |
@clay227 Hello, as @echoAlexey mentioned we will improve exception handling and log messages in next version.
Do you mean bringing browser window in front? Sikuli doesn't know about windows, it operates with visible screen areas. So, no test/work in parallel in the same desktop (there could be multiple desktops in single node). Switch browser tabs via Selenium API. It might be still possible to switch windows by sending platform specific key strokes via Sikuli. Please let us know if you have blocking issues. |
client.getDesktop(); retruns null values.
fallowed the example given on the page and could not make work, at the cleint side i get:
using ScreenRegion screenRegion = desktop.find(imageTarget);
49778 [PoolService-0] ERROR i.s.r.p.c.RemoteObjectMethodInterceptor - Unmapped response
java.lang.IllegalArgumentException: class sun.awt.image.ByteInterleavedRaster declares multiple JSON fields named maxX
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:146) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:83) ~[gson-2.3.1.jar:na]
at com.google.gson.Gson.getAdapter(Gson.java:359) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:55) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:99) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:219) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:99) ~[gson-2.3.1.jar:na]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:219) ~[gson-2.3.1.jar:na]
at com.google.gson.Gson.toJson(Gson.java:600) ~[gson-2.3.1.jar:na]
at com.google.gson.Gson.toJson(Gson.java:579) ~[gson-2.3.1.jar:na]
at com.google.gson.Gson.toJson(Gson.java:534) ~[gson-2.3.1.jar:na]
at com.google.gson.Gson.toJson(Gson.java:514) ~[gson-2.3.1.jar:na]
at io.sterodium.rmi.protocol.client.RemoteInvoker.toString(RemoteInvoker.java:67) ~[sterodium-rmi-0.1.jar:na]
at io.sterodium.rmi.protocol.client.RemoteInvoker.getMethodInvocation(RemoteInvoker.java:54) ~[sterodium-rmi-0.1.jar:na]
at io.sterodium.rmi.protocol.client.RemoteInvoker.invoke(RemoteInvoker.java:32) ~[sterodium-rmi-0.1.jar:na]
at io.sterodium.rmi.protocol.client.RemoteObjectMethodInterceptor.invoke(RemoteObjectMethodInterceptor.java:58) [sterodium-rmi-0.1.jar:na]
at io.sterodium.rmi.protocol.client.RemoteObjectMethodInterceptor.intercept(RemoteObjectMethodInterceptor.java:40) [sterodium-rmi-0.1.jar:na]
at org.sikuli.api.DesktopScreenRegion$$EnhancerByCGLIB$$c989fea2.find() [cglib-3.1.jar:na]
at com.nexperience.system.uitests.SikuliTestPoc.testScenario(SikuliTestPoc.java:76) [test-classes/:na]
at com.nexperience.system.uitests.BaseTest.scenarioFlow(BaseTest.java:239) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_10]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_10]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_10]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_10]
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) [selenium-server-standalone-2.45.0.jar:na]
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) [selenium-server-standalone-2.45.0.jar:na]
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) [selenium-server-standalone-2.45.0.jar:na]
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73) [selenium-server-standalone-2.45.0.jar:na]
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14) [selenium-server-standalone-2.45.0.jar:na]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_10]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_10]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_10]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_10]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_10]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_10]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_10]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_10]
The text was updated successfully, but these errors were encountered: