Skip to content

Commit d31812d

Browse files
authored
Merge branch 'master' into use-client-config
2 parents ce1f243 + e4f06ab commit d31812d

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.7.2
4+
rev: v0.8.1
55
hooks:
66
# Run the linter.
77
- id: ruff

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pre-commit = "~=3.5"
1010
pytest = "~=8.3"
1111
pytest-cov = "~=5.0"
1212
python-dateutil = "~=2.9"
13-
ruff = "~=0.7.4"
13+
ruff = "~=0.8.1"
1414
tox = "~=4.23"
1515
types-python-dateutil = "~=2.9"
1616

1717
[packages]
18-
selenium = "==4.27.0"
18+
selenium = "==4.27.1"
1919
typing-extensions = "~=4.12.2"

appium/webdriver/common/appiumby.py

Lines changed: 19 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,20 @@ 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+
39+
ByType = Literal[
40+
'-ios predicate string',
41+
'-ios class chain',
42+
'-android uiautomator',
43+
'-android viewtag',
44+
'-android datamatcher',
45+
'-android viewmatcher',
46+
'accessibility id',
47+
'-image',
48+
'-custom',
49+
'-flutter semantics label',
50+
'-flutter type',
51+
'-flutter key',
52+
'-flutter text containing',
53+
]

appium/webdriver/extensions/flutter_integration/flutter_finder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from typing import Tuple
18+
from typing import Tuple, Union
19+
20+
from selenium.webdriver.common.by import ByType as SeleniumByType
1921

2022
from appium.webdriver.common.appiumby import AppiumBy
23+
from appium.webdriver.common.appiumby import ByType as AppiumByType
2124

2225

2326
class FlutterFinder:
24-
def __init__(self, using: str, value: str) -> None:
27+
def __init__(self, using: Union[SeleniumByType, AppiumByType], value: str) -> None:
2528
self.using = using
2629
self.value = value
2730

0 commit comments

Comments
 (0)