WinAppDriver errors out after initial login screen
System Details: WinAppDriver: 1.2.1 Katalon Studio Enterprise: 8.6.8
Summary: WinAppDriver launches ADMS (GE Digital Software) and is able to identify and connect to the initial login screen. I am able to automate logging into the app with a username and password and selecting the login button. This issue occurs after successfully logging in and winAppDriver is not able to select/locate the subsequent screen(s) and the following error is reported:
GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/screenshot HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (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."}}
========================================== Katalon Log (note, some details replaces with X)
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: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XXX.XXX', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_362' Driver info: io.appium.java_client.windows.WindowsDriver Capabilities {app: XXX..., javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS} Session ID: 924353B4-4465-4820-82FF-336A1B7CCE83 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:84) at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.captureImage(WindowsRecorderDialog.java:671) at com.kms.katalon.composer.windows.dialog.WindowsRecorderDialog$3.run(WindowsRecorderDialog.java:638) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
========================================== Full WinAppDriver log
Windows Application Driver listening for requests at: http://127.0.0.1:4723/ Press ENTER to exit.
========================================== POST /session HTTP/1.1 Accept-Encoding: gzip Connection: Keep-Alive Content-Length: 306 Content-Type: application/json; charset=utf-8 Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
{ "desiredCapabilities": { "app": "C:\Program Files\GE Energy\ADMS\ADMSClient.exe", "platformName": "Windows" }, "capabilities": { "firstMatch": [ { "appium:app": "C:\Program Files\GE Energy\ADMS\ADMSClient.exe", "platformName": "windows" } ] } } HTTP/1.1 200 OK Content-Length: 157 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":{"app":"C:\Program Files\GE Energy\ADMS\ADMSClient.exe","platformName":"Windows"}}
==========================================
GET /session/924353B4-4465-4820-82FF-336A1B7CCE83 HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 106 Content-Type: application/json
{"status":0,"value":{"app":"C:\Program Files\GE Energy\ADMS\ADMSClient.exe","platformName":"Windows"}}
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83 HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 106 Content-Type: application/json
{"status":0,"value":{"app":"C:\Program Files\GE Energy\ADMS\ADMSClient.exe","platformName":"Windows"}}
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/window_handle HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 84 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":"0x000506BC"}
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/source HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 12875 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":"<Window AcceleratorKey="" AccessKey="" AutomationId="LoginForm" ClassName="WindowsForms10.Window.8.app.0.232467a_r14_ad1" FrameworkId="WinForm" HasKeyboardFocus="True" HelpText="" IsContentElement="True" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="True" IsOffscreen="False" IsPassw [...]
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/screenshot HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 12946 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":"iVBORw0KGgoAAAANSUhEUgAAAjQAAAFPCAIAAADV5MPLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACVeSURBVHhe7d0HeI3XA8dxYsWIJIgVM0JCRNVO+jeiSlGbxtaqWLFXK0aL0tqtvTpo0TapCtram1aNVlDE3jFixJbhf27OyXXdbAk9ufl++j7vc855z3tv7qvP+7vnve/I6OFVNwMAADoxhFPwkWOqBgDAf62Mm6uVKgIAoA3CCQCgHcIJAKAdwgkAoB3CCQCgHcIJAKAdwgkAoB3CCQCgHcIJAKAdwgkAoB3CCQCgHcIJAKAdwgkAoB3CCQCgHcIJAKAdwgkAoJ1X/bDB1yuU9/ [...]
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/source HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 609 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":"<Pane AcceleratorKey="" AccessKey="" AutomationId="" ClassName="" FrameworkId="Win32" HasKeyboardFocus="False" HelpText="" IsContentElement="True" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="False" IsOffscreen="True" IsPassword="False" IsRequiredForForm="False" ItemStatus="" I [...]
========================================== GET /session/924353B4-4465-4820-82FF-336A1B7CCE83/screenshot HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (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/924353B4-4465-4820-82FF-336A1B7CCE83/window_handle HTTP/1.1 Accept-Encoding: gzip Cache-Control: no-cache Connection: Keep-Alive Host: 127.0.0.1:4723 User-Agent: selenium/unknown (java windows)
HTTP/1.1 200 OK Content-Length: 84 Content-Type: application/json
{"sessionId":"924353B4-4465-4820-82FF-336A1B7CCE83","status":0,"value":"0x000506BC"}
After you login is it a separate window. In case it is then you need to create a root session. And then create a session with the opened window.
The initial login window pops up, I enter credentials, the login window then closes/disappears. Then a splash screen/window then appears on screen, after loading then disappears and then the application is displayed.
There is a bar at the top of the screen which is hidden until the mouse moves to the top of the screen and the various functions appear in their own window.
The best way to describe the function windows behaviour using an example is how excel used to function where you could open multiple workbooks each its own window but where still contained with the excel application itself.
Within Katalon there is a method to switch to the root, but I am not sure how to then create another session within the opened window(s)
abrody18 Try this https://github.com/microsoft/WinAppDriver/issues/1656#issuecomment-999872116