Skip to content

Commit

Permalink
Merge branch 'master' into use-client-config
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa authored Nov 29, 2024
2 parents ce1f243 + e4f06ab commit d31812d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
rev: v0.8.1
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ pre-commit = "~=3.5"
pytest = "~=8.3"
pytest-cov = "~=5.0"
python-dateutil = "~=2.9"
ruff = "~=0.7.4"
ruff = "~=0.8.1"
tox = "~=4.23"
types-python-dateutil = "~=2.9"

[packages]
selenium = "==4.27.0"
selenium = "==4.27.1"
typing-extensions = "~=4.12.2"
19 changes: 19 additions & 0 deletions appium/webdriver/common/appiumby.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -32,3 +34,20 @@ 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',
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
# specific language governing permissions and limitations
# under the License.

from typing import Tuple
from typing import Tuple, Union

from selenium.webdriver.common.by import ByType as SeleniumByType

from appium.webdriver.common.appiumby import AppiumBy
from appium.webdriver.common.appiumby import ByType as AppiumByType


class FlutterFinder:
def __init__(self, using: str, value: str) -> None:
def __init__(self, using: Union[SeleniumByType, AppiumByType], value: str) -> None:
self.using = using
self.value = value

Expand Down

0 comments on commit d31812d

Please sign in to comment.