1616
1717from typing import TYPE_CHECKING , List , TypeVar , Union
1818
19+ from appium .common .logger import logger
1920from appium .webdriver .common .mobileby import MobileBy
2021
2122from .base_search_context import BaseSearchContext
@@ -30,7 +31,7 @@ class WindowsSearchContext(BaseSearchContext):
3031 """Define search context for Windows"""
3132
3233 def find_element_by_windows_uiautomation (self : T , win_uiautomation : str ) -> 'WebElement' :
33- """Finds an element by windows uiautomation
34+ """[Deprecated] Finds an element by windows uiautomation
3435
3536 Args:
3637 win_uiautomation: The element name in the windows UIAutomation selector
@@ -42,10 +43,13 @@ def find_element_by_windows_uiautomation(self: T, win_uiautomation: str) -> 'Web
4243 `appium.webdriver.webelement.WebElement`: The found element
4344
4445 """
46+ logger .warning (
47+ "[Deprecated] '-windows uiautomation' selector is deprecated. Please use other locators like id."
48+ )
4549 return self .find_element (by = MobileBy .WINDOWS_UI_AUTOMATION , value = win_uiautomation )
4650
4751 def find_elements_by_windows_uiautomation (self : T , win_uiautomation : str ) -> List ['WebElement' ]:
48- """Finds elements by windows uiautomation
52+ """[Deprecated] Finds elements by windows uiautomation
4953
5054 Args:
5155 win_uiautomation: The element name in the windows UIAutomation selector
@@ -56,4 +60,7 @@ def find_elements_by_windows_uiautomation(self: T, win_uiautomation: str) -> Lis
5660 Returns:
5761 :obj:`list` of :obj:`appium.webdriver.webelement.WebElement`: The found elements
5862 """
63+ logger .warning (
64+ "[Deprecated] '-windows uiautomation' selector is deprecated. Please use other locators like id."
65+ )
5966 return self .find_elements (by = MobileBy .WINDOWS_UI_AUTOMATION , value = win_uiautomation )
0 commit comments