From 19feaaa7a4e6441d0ade879918123e72d07f93cc Mon Sep 17 00:00:00 2001 From: Brijesh Date: Fri, 29 Nov 2024 00:34:51 +0530 Subject: [PATCH] feat: Added typing for AppiumBy types --- appium/webdriver/common/appiumby.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/appium/webdriver/common/appiumby.py b/appium/webdriver/common/appiumby.py index b269bb0f..146f27a9 100644 --- a/appium/webdriver/common/appiumby.py +++ b/appium/webdriver/common/appiumby.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import Literal + from selenium.webdriver.common.by import By @@ -32,3 +34,19 @@ class AppiumBy(By): FLUTTER_INTEGRATION_KEY = '-flutter key' FLUTTER_INTEGRATION_TEXT = '-flutter text' FLUTTER_INTEGRATION_TEXT_CONTAINING = '-flutter text containing' + +ByType = Literal[ + "-ios predicate string", + "-ios class chain", + "-android uiautomator", + "-android viewtag", + "-android datamatcher", + "-android viewmatcher", + "accessibility id", + "-image", + "-custom", + "-flutter semantics label", + "-flutter type", + "-flutter key", + "-flutter text containing", +]