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", +]