Winappdriver: unable to identify a pop up window

Created on 7 Jan 2021  Â·  9Comments  Â·  Source: microsoft/WinAppDriver

Hi I have been trying different ways to resolve it but unfortunately non worked. so i was automating the process of uninstalling a software through its own install/uninstall tool. however when i click the install button a small popup window shows up asking me if i would like to continue and yes or no so i inspected the window it has a different process id but when creating a desktop session and looking for the window using automation id, name or even class name non is found so i tried using attaching the process to a new session i was able to get the page property however the yes and no buttons are not there so any ideas how to resolve this ?

Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.

==========================================
POST /session HTTP/1.1
Accept: application/json, image/png
Connection: Keep-Alive
Content-Length: 251
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":{"app":"C:\Program Files (x86)\WK\ProSystem fx Suite\Install and Update\SaaS\Cch.Pfx.NGDeploy.Client.ClientAgent.exe","platformName":"Windows"}}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/title HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Install and Update Manager"}

==========================================

GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/title HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Install and Update Manager"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/window_handles HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":["0x003907DC"]}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/window HTTP/1.1
Accept: application/json, image/png
Content-Length: 21
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"name":"0x003907DC"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/window/current/maximize HTTP/1.1
Accept: application/json, image/png
Content-Length: 2
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element HTTP/1.1
Accept: application/json, image/png
Content-Length: 34
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"name","value":"Install"}
HTTP/1.1 200 OK
Content-Length: 102
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":{"ELEMENT":"7.15428.42592467"}}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.42592467"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.42592467"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/click HTTP/1.1
Accept: application/json, image/png
Content-Length: 12
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"button":0}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/window_handles HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":["0x003907DC"]}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/window HTTP/1.1
Accept: application/json, image/png
Content-Length: 21
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"name":"0x003907DC"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element HTTP/1.1
Accept: application/json, image/png
Content-Length: 53
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"accessibility id","value":"checkboxheader"}
HTTP/1.1 200 OK
Content-Length: 102
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":{"ELEMENT":"7.15428.31644779"}}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.31644779"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.31644779"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/click HTTP/1.1
Accept: application/json, image/png
Content-Length: 12
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"button":0}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/elements HTTP/1.1
Accept: application/json, image/png
Content-Length: 37
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"class name","value":"Cell"}
HTTP/1.1 200 OK
Content-Length: 1308
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":[{"ELEMENT":"7.15428.10428696"},{"ELEMENT":"7.15428.39418019"},{"ELEMENT":"7.15428.38742975"},{"ELEMENT":"7.15428.51173267"},{"ELEMENT":"7.15428.51393992"},{"ELEMENT":"7.15428.33939988"},{"ELEMENT":"7.15428.64784526"},{"ELEMENT":"7.15428.13055244"},{"ELEMENT":"7.15428.50841847"},{"ELEMENT":"7.15428.24548918"},{"ELEMENT":"7.15428.37616995"},{"ELEMENT":"7.15428.270777 [...]

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.10428696/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.39418019/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Document"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.38742975/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.51173267/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.51393992/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.33939988/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.64784526/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Financial Prep"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.13055244/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.50841847/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2018-1.0"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.24548918/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.37616995/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.27077749/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Knowledge Coach"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.45814047/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.19950346/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2018-4.1"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.5365342/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.64244561/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.36426933/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Practice"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.64900454/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.22445387/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.6137036/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.65133811/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.41347315/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"ProSystem fx Practice Management - Mobile Profiles"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.60798228/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.25709437/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2013-1.0"}

==========================================

GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.2089687/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.20233597/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================

GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.28308632/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Tax"}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.20233597/click HTTP/1.1
Accept: application/json, image/png
Content-Length: 2
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.11297860/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.42711464/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.37076589/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.43078913/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.66839947/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Workstream"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.45326617/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Not Installed"}

==========================================

GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.47577364/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.28561251/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"N/A"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.469528/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"False"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.38031802/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"DataScan"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.60677108/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"Installed"}

==========================================
GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.15898735/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================

GET /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.12729171/text HTTP/1.1
Accept: application/json, image/png
Host: 127.0.0.1:4723

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

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":"R2020-3.4"}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element HTTP/1.1
Accept: application/json, image/png
Content-Length: 53
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"accessibility id","value":"checkboxheader"}
HTTP/1.1 200 OK
Content-Length: 102
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":{"ELEMENT":"7.15428.31644779"}}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.31644779/clear HTTP/1.1
Accept: application/json, image/png
Content-Length: 2
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element/7.15428.31644779/value HTTP/1.1
Accept: application/json, image/png
Content-Length: 20
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"value":["337337"]}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element HTTP/1.1
Accept: application/json, image/png
Content-Length: 36
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"name","value":"Uninstall"}
HTTP/1.1 200 OK
Content-Length: 102
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0,"value":{"ELEMENT":"7.15428.17649112"}}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.17649112"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/moveto HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"7.15428.17649112"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================
POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/click HTTP/1.1
Accept: application/json, image/png
Content-Length: 12
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"button":0}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"4773D617-CE04-4068-959E-4C5182FAFDE4","status":0}

==========================================

POST /session/4773D617-CE04-4068-959E-4C5182FAFDE4/element HTTP/1.1
Accept: application/json, image/png
Content-Length: 36
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"using":"name","value":"Uninstall"}
HTTP/1.1 400 Bad Request
Content-Length: 102
Content-Type: application/json

{"status":23,"value":{"error":"no such window","message":"Currently selected window has been closed"}}

All 9 comments

Create a desktop session, wait for a few seconds and send keyboard keys like escape or enter.

is there away to send keyboard keys like enter using session only ? as i
mentioned the pop up window is identified using desktop session but non of
the keys buttons are found. can you share an example please

On Thu, Jan 7, 2021 at 3:14 AM Naeem Akram notifications@github.com wrote:

Create a desktop session, wait for a few seconds and send keyboard keys
like escape or enter.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WinAppDriver/issues/1409#issuecomment-755988799,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL5W3SKSIQLZK3CB57RP4UTSYV3PPANCNFSM4VYGK33Q
.

Which language binding are you using?

In C#
session.keyboard.sendkeys(Keys.Escape)

In java:
Actions action = new Actions(session);
action.sendKeys(Keys.ESCAPE);

In python:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

webdriver.ActionChains(driver).send_keys(Keys.ESCAPE).perform()

In C#
session.keyboard.sendkeys(Keys.Escape)

Code for c# is obsolete. More correct code for c#:

var action = new Actions(session);
action.SendKeys(Keys.Escape);

Hi @anunay1 , here is my code : its works fine to close the popup but i'm getting no such element exception. Can you help me out. Thanks in advance.

public void Acc() throws MalformedURLException {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(
"app", "C:\Programs\A.EXE");
desiredCapabilities.setCapability(
"appWorkingDir", "C:\data01\acc\"

    );

    desiredCapabilities.setCapability(
            "platformName", "Windows"

    );
    desiredCapabilities.setCapability("platformVersion", "10");
    desiredCapabilities.setCapability(
            "deviceName", "WindowsPC"

    );

    driver = new WindowsDriver<WindowsElement>(new URL("http://localhost:4723"), desiredCapabilities);
    Assert.assertNotNull(driver);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}

public void verify_Login_Invalid_UserID() throws InterruptedException, IOException {
Thread.sleep(3000);
Actions action = new Actions(driver);
action.sendKeys(Keys.ESCAPE);
action.build().perform();

    loginObjects = new LoginObjects();
    WebElement userName = loginObjects.userName();
    userName.click();
    userName.sendKeys("ABC");
    loginObjects.clickLoginButton();
    String expectedErrorMsg = "Invalid UserID specified; check spelling and try again.";
    WebElement alertErrorMsg = loginObjects.alertErrorMsg();
    String actualErrorMsg = SeleniumFunctions.getAttribute(alertErrorMsg, "Name");

    Assert.assertEqualsIgnoreCase(actualErrorMsg, expectedErrorMsg, "Error message is not pop up");
    loginObjects.okButton().click();
    Reporter.log("login functionality with an Invalid UserId is verified", true);
}

Error log:
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Itest-2019-PGS0', ip: '10.0.0.30', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {app: C:\Abacus\v23\Programs\Abac..., appWorkingDir: C:\Abacus\v23\data01\accoun..., javascriptEnabled: true, platform: WINDOWS, platformName: Windows}
Session ID: 463AA8C9-E04C-4392-ACB9-DBED01576C68
* Element info: {Using=accessibility id, value=1}

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
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:41)
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.findElement(RemoteWebDriver.java:323)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:61)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.findElement(WindowsDriver.java:1)
at io.appium.java_client.FindsByAccessibilityId.findElementByAccessibilityId(FindsByAccessibilityId.java:37)
at framework.utils.SeleniumFunctions.findElementByAccessibilityID(SeleniumFunctions.java:142)
at pageObjects.LoginObjects.userName(LoginObjects.java:21)
at testCases.LoginTest.verify_Login_Invalid_UserID(LoginTest.java:98)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:766)
at org.testng.TestRunner.run(TestRunner.java:587)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

Hi @anunay1 , thanks for showing a way of using window handles. I followed as you mentioned, but still I'm unable to send keys, it just clicking on login buttons and even its clicked on username text box but its not Sending keys. Is there any way to handle such issues ???

public void verify_Login_Invalid_UserID() throws InterruptedException, IOException {
Thread.sleep(3000);
Actions action = new Actions(driver);
action.sendKeys(Keys.ESCAPE);
action.build().perform();

Set windowHandles = driver.getWindowHandles();
System.out.println("windowHandles : " + windowHandles);
Iterator<String> currentWindow = windowHandles.iterator();
final WebDriver window = driver.switchTo().window(currentWindow.next());
System.out.println(driver.getTitle());

Reporter.log("Verifying Error_Msg of login with an Invalid UserId", true);
loginObjects = new LoginObjects();

WebElement userName = loginObjects.userName();
userName.click();
userName.sendKeys(Keys.SHIFT,"abc");
action.moveToElement(userName).keyDown(userName, Keys.SHIFT)
        .sendKeys(userName, "hello")
        .keyUp(userName, Keys.SHIFT)
        .build().perform();
// userName.sendKeys("ABC");

}

Can you try the clipboard class and copy paste the text.

Hi @anunay1 , I just resolved the issues. i used send keys keys.backspaces , then sending keys is worked fine.

Was this page helpful?
0 / 5 - 0 ratings