Open AmitVerma4HP opened 6 years ago
We got 2 workarounds to make this work. 1) Click on OneNote text surface and then go for Ctrl + P if option1 does not work then
2) Minimize and maximize OneNote app then OneNote session gets all elements control and works fine.
All I am trying to do is to open OneNote (cloud instance) then go to "More" (3 dots on the top right corner) and then click on "Print"
This code opens OneNote just fine public static RemoteWebDriver OpenOneNoteApp(String device_name)throws MalformedURLException, InterruptedException {
Then "More" option throws 404.
Appium Log - [WinAppDriver] [STDOUT] {"sessionId":"0BB54A2A-893F-4909-AE8C-6F32ED287626","status":0} [debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"0BB54A2A-893F-4909-AE8C-6F32ED287626","status":0} [JSONWP Proxy] Replacing sessionId 0BB54A2A-893F-4909-AE8C-6F32ED287626 with 5bb7912b-a369-4f34-9aa5-b879f1f1a8c4 [HTTP] <-- POST /wd/hub/session/5bb7912b-a369-4f34-9aa5-b879f1f1a8c4/window/current/maximize 200 20 ms - 63 [HTTP] --> POST /wd/hub/session/5bb7912b-a369-4f34-9aa5-b879f1f1a8c4/element {"using":"name","value":"More"} [MJSONWP] Driver proxy active, passing request on via HTTP proxy [debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/5bb7912b-a369-4f34-9aa5-b879f1f1a8c4/element] to [POST http://127.0.0.1:4731/wd/hub/session/0BB54A2A-893F-4909-AE8C-6F32ED287626/element] with body: {"using":"name","value":"More"} [WinAppDriver] [STDOUT] [WinAppDriver] [STDOUT] [WinAppDriver] [STDOUT] ========================================== [WinAppDriver] [STDOUT] POST /wd/hub/session/0BB54A2A-893F-4909-AE8C-6F32ED287626/element HTTP/1.1 [WinAppDriver] [STDOUT] Accept: / [WinAppDriver] [STDOUT] Connection: keep-alive [WinAppDriver] [STDOUT] Content-Length: 31 [WinAppDriver] [STDOUT] Content-Type: application/json [WinAppDriver] [STDOUT] Host: 127.0.0.1:4731 [WinAppDriver] [STDOUT] User-Agent: appium [WinAppDriver] [STDOUT] [WinAppDriver] [STDOUT] {"using":"name","value":"More"} [WinAppDriver] [STDOUT] HTTP/1.1 404 Not Found [WinAppDriver] [STDOUT] Content-Length: 139 [WinAppDriver] [STDOUT] Content-Type: application/json [WinAppDriver] [STDOUT] [WinAppDriver] [STDOUT] {"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}} [MJSONWP] Encountered internal error running command: {"w3cStatus":400,"jsonwp":{"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}} ProxyRequestError: Could not proxy command to remote server. Original error: 404 - {"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}
1) I tried all methods mentioned here , thinking I may not have correct window handle but it didnt help.
2) Also printed all handles when OneNote opens it only shows oneWindows handle (which was currenthandle)
3) Also tried to open OneNote and then attached Session to it
In all above cases , I couldn't get to click on any option on OneNote.
Inspect for More option
More option on OneNote