Skip to content

Commit 19feaaa

Browse files
feat: Added typing for AppiumBy types
1 parent ea61c2e commit 19feaaa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

appium/webdriver/common/appiumby.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from typing import Literal
16+
1517
from selenium.webdriver.common.by import By
1618

1719

@@ -32,3 +34,19 @@ class AppiumBy(By):
3234
FLUTTER_INTEGRATION_KEY = '-flutter key'
3335
FLUTTER_INTEGRATION_TEXT = '-flutter text'
3436
FLUTTER_INTEGRATION_TEXT_CONTAINING = '-flutter text containing'
37+
38+
ByType = Literal[
39+
"-ios predicate string",
40+
"-ios class chain",
41+
"-android uiautomator",
42+
"-android viewtag",
43+
"-android datamatcher",
44+
"-android viewmatcher",
45+
"accessibility id",
46+
"-image",
47+
"-custom",
48+
"-flutter semantics label",
49+
"-flutter type",
50+
"-flutter key",
51+
"-flutter text containing",
52+
]

0 commit comments

Comments
 (0)