Repository navigation
feat: restore Windows UI Automation locator for WinCore - #1380
Conversation
mykola-mokhnach
left a comment
There was a problem hiding this comment.
- No blocking issues. The new constant and
ByTypeentry are consistent with the existing locators. The unit test checks the wire payload, and WinCore does support-windows uiautomation,new PropertyCondition(...)and theAutomationIdattribute.
| @@ -0,0 +1,16 @@ | |||
| from appium import webdriver | |||
There was a problem hiding this comment.
[nit] Missing the Apache license header that the sibling functional tests carry (e.g. test/functional/mac/webelement_test.py).
There was a problem hiding this comment.
Added the same Apache license header as the sibling functional tests in 3e1d288.
| from appium.webdriver.common.appiumby import AppiumBy | ||
| from test.helpers.constants import SERVER_URL_BASE | ||
|
|
||
|
|
There was a problem hiding this comment.
[minor] Does WinCore expand %SystemRoot% in appium:app? I couldn't find env-var expansion in the driver sources. If it doesn't, session creation fails, and that failure is unrelated to the locator under test. Consider the literal C:\Windows\System32\charmap.exe, or confirm the new job is green.
There was a problem hiding this comment.
In 3e1d288 the test reads SYSTEMROOT on the Windows runner and passes the absolute path to appium:app, so WinCore receives a fully resolved path. The upstream WinCore test also opens Character Map and uses the same font selector (AutomationId 105).
| - https://www.selenium.dev/documentation/webdriver/actions_api/ | ||
| - https://www.youtube.com/watch?v=oAJ7jwMNFVU | ||
| - Deprecated `AppiumBy.WINDOWS_UI_AUTOMATION`, which has no usage right now. | ||
| - Removed `AppiumBy.WINDOWS_UI_AUTOMATION` in v4. The locator was later restored for the WinCore driver. |
There was a problem hiding this comment.
[nit] "Removed in v4 … later restored" has no release number, and it sits in the v3→v4 migration list. Name the release that brings the locator back, or move the note out of the v4 removal list.
There was a problem hiding this comment.
Moved the WinCore usage note to the README’s Usage section in 3e1d288. The v3→v4 migration entry now covers only the removal in v4.
mykola-mokhnach
left a comment
There was a problem hiding this comment.
I've compiled a detailed guide for the new/old locator type: appium/appium-wincore-driver#158
We may also consider waiting until it's merged and then supply the docs link in the driver, since the locator is custom and it's not very clear how to build it w/o detailed tutorial
Restore
AppiumBy.WINDOWS_UI_AUTOMATIONfor WinCore's-windows uiautomationlocator. This follows up on the locator discussion in #1376 and works independently of #1369.The regression test checks that the client sends the strategy and condition unchanged. All 274 unit tests passed locally. Ruff and mypy passed. Windows end-to-end behavior was not tested.