How to choose an item in popup menu (windows)?

Hello!

After opening the menu, I can’t click a menu item.
DeepinScreenshot_select-area_20190715201033

How to click it? So I could then see similar menu next to the current menu on the right.

Code:
self.driver.find_elements_by_name(“Главное меню”)[1].click() // works
self.driver.find_element_by_name(“Файл”).click() // doesn’t work

Full code: https://pastebin.com/q2sQcKs2

Get an error:

python client:

WinAppDriver/Samples/Python$ python calculatortest.py 
test_addition (__main__.SimpleCalculatorTests) ... ERROR
test_initialize (__main__.SimpleCalculatorTests) ... ok

======================================================================
ERROR: test_addition (__main__.SimpleCalculatorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "calculatortest.py", line 68, in test_addition
    self.driver.find_element_by_name("Файл").click()
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
    raise wde
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 24, in check_response
    super(MobileErrorHandler, self).check_response(response)
  File "/home/i/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown error occurred in the remote end while processing the command.


----------------------------------------------------------------------
Ran 2 tests in 6.206s

FAILED (errors=1)

WinAppDriver:

Press ENTER to exit.


==========================================
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 249
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))

{"capabilities": {"firstMatch": [{"platformName": "Windows", "appium:deviceName": "WindowsPC", "appium:appTopLevelWindow": "00070334"}]}, "desiredCapabilities": {"platformName": "Windows", "deviceName": "WindowsPC", "appTopLevelWindow": "00070334"}}
HTTP/1.1 200 OK
Content-Length: 129
Content-Type: application/json




==========================================
POST /session/64287F4D-98C9-4804-99BF-2C2701C3F6D5/elements HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 150
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))

{"using": "name", "value": "\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e", "sessionId": "64287F4D-98C9-4804-99BF-2C2701C3F6D5"}
HTTP/1.1 200 OK
Content-Length: 149
Content-Type: application/json

{"sessionId":"64287F4D-98C9-4804-99BF-2C2701C3F6D5","status":0,"value":[{"ELEMENT":"42.459572.2.147198552.0"},{"ELEMENT":"42.459572.2.158686904.0"}]}


==========================================
POST /session/64287F4D-98C9-4804-99BF-2C2701C3F6D5/element/42.459572.2.158686904.0/click HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 86
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))

{"id": "42.459572.2.158686904.0", "sessionId": "64287F4D-98C9-4804-99BF-2C2701C3F6D5"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"64287F4D-98C9-4804-99BF-2C2701C3F6D5","status":0}


==========================================
POST /session/64287F4D-98C9-4804-99BF-2C2701C3F6D5/element HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 107
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))

{"using": "name", "value": "\u0424\u0430\u0439\u043b", "sessionId": "64287F4D-98C9-4804-99BF-2C2701C3F6D5"}
HTTP/1.1 200 OK
Content-Length: 109
Content-Type: application/json

{"sessionId":"64287F4D-98C9-4804-99BF-2C2701C3F6D5","status":0,"value":{"ELEMENT":"42.786962.2.158702840.0"}}


==========================================
POST /session/64287F4D-98C9-4804-99BF-2C2701C3F6D5/element/42.786962.2.158702840.0/click HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Length: 86
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))

{"id": "42.786962.2.158702840.0", "sessionId": "64287F4D-98C9-4804-99BF-2C2701C3F6D5"}
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."}}


==========================================
DELETE /session/64287F4D-98C9-4804-99BF-2C2701C3F6D5 HTTP/1.1
Accept: application/json
Accept-Encoding: identity
Connection: keep-alive
Content-Type: application/json;charset=UTF-8
Host: 116.202.1.50:4723
User-Agent: appium/python 0.46 (selenium/3.141.0 (python linux))


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

{"status":0}

Environment

  • Appium python client version: 0.46
  • Desktop OS/version used to run Appium: Ubuntu 18.04
  • Platform/version under test: Windows Server 2016
  • Real device or emulator/simulator: VPS
  • Server: WinAppDriver

Thanks!