Unable to start appplication in Windows object spy


#1

I created a new keyword for Windows testing, but unable to start object spy. I tried to spy UI objects of Putty, but got following error.


#2

Well, clearly something is blocking the connection to your local server. It’s likely a security measure you have on somewhere. I suggest checking that out, Katalon can’t do anything about it.

Maybe try putting Katalon in trusted sources?


#3

I tried it on another workstation in another network, but got the same error message.


#4

@plaidshirtakos

Please start your WinAppDriver first. https://docs.katalon.com/katalon-studio/docs/setup-winappdriver.html#set-up-windows-application-driver-on-a-local-windows-10-machine

Thanks


#5

I started it on a remote machine, I see in command prompt, that it is listening for requests on given port.
When I try to connect from workstation I got following error.

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Original error: Failed to connect to /myip:4723


#6

Please follow https://docs.katalon.com/katalon-studio/docs/setup-winappdriver.html#set-up-windows-application-driver-on-a-remote-machine or https://github.com/microsoft/WinAppDriver/blob/master/Docs/FAQ.md#general-development--best-practices#user-content-running-on-a-remote-machine to allow connect for remote machines.

If your setup is correct, you will see the HTTP commands listed in the WinAppDriver cmd after you start an application.

Thanks


#7

@duyluong : I set these, but got following error on server:

User-Agent: selenium/3.141.59 (java windows)
{
“using”: “tag name”,
“value”: “Window”
}
HTTP/1.1 404 Not Found
Content-Length: 139
Content-Type: application/json

{"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}

In client:

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Failed to locate opened application window with appId


#8

Hi @plaidshirtakos,

If your application has a splash screen or loading screen, please refer to my post:


#9

Hello @duyluong ,

it doesn’t, it is PuTTY, just for testing purpose.


#10

Hi @plaidshirtakos,

We can launch the PuTTY app via Katalon Windows Recorder without any problem.

.


#11

I see, but I try the same on remote host. Connection is successful, but got errors when try to use some methods(click, getText).

org.openqa.selenium.WebDriverException: An unknown error occurred in the remote end while processing the command. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘LAPTOP’, ip: ‘192.168.56.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {app: C:\Users\user101\Downloads…, javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS}
Session ID: 3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
at com.kms.katalon.composer.windows.spy.WindowsInspectorController.captureScreenshot(WindowsInspectorController.java:82)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.captureImage(WindowsRecorderDialog.java:653)
at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.run(WindowsRecorderDialog.java:620)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

On server side:
==========================================
GET /session/3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D/screenshot HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: myip:4723
User-Agent: selenium/3.141.59 (java windows)

HTTP/1.1 500 Internal Error
Content-Length: 133
Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}


==========================================
GET /session/3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D/window_handle HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: myip:4723
User-Agent: selenium/3.141.59 (java windows)


HTTP/1.1 200 OK
Content-Length: 84
Content-Type: application/json

{"sessionId":"3A8AB5F8-E6B3-4FB1-9C14-E48B8F4F5C4D","status":0,"value":"0x000A09F4"}

#12

@duyluong : This is what I see in Katalon Studio.


#13

@plaidshirtakos

Please let us know your Appium version.


#14

@duyluong : Where could I find it please?


#15

@duyluong : I use all the built in tools in your IDE, but not sure, why would be Appium version important in this case.


#16

same issue