uiautodev 0.10.0__tar.gz → 0.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of uiautodev might be problematic. Click here for more details.
- {uiautodev-0.10.0 → uiautodev-0.11.0}/PKG-INFO +1 -1
- {uiautodev-0.10.0 → uiautodev-0.11.0}/pyproject.toml +1 -1
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/__init__.py +1 -1
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/command_proxy.py +10 -2
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/command_types.py +7 -1
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/android.py +8 -2
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/base_driver.py +8 -1
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/router/proxy.py +1 -2
- {uiautodev-0.10.0 → uiautodev-0.11.0}/LICENSE +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/README.md +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/__main__.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/app.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/appium_proxy.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/binaries/scrcpy_server.jar +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/case.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/cli.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/common.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/appium.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/harmony.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/ios.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/mock.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/testdata/layout.json +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/udt/appium-uiautomator2-v5.12.4-light.apk +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/udt/udt.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/exceptions.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/model.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/provider.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/remote/android_input.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/remote/harmony_mjpeg.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/remote/keycode.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/remote/scrcpy.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/remote/touch_controller.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/router/android.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/router/device.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/router/xml.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/static/demo.html +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/utils/common.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/utils/envutils.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/utils/exceptions.py +0 -0
- {uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/utils/usbmux.py +0 -0
|
@@ -13,7 +13,7 @@ from typing import Callable, Dict, List, Optional, Union
|
|
|
13
13
|
from pydantic import BaseModel
|
|
14
14
|
|
|
15
15
|
from uiautodev.command_types import AppLaunchRequest, AppTerminateRequest, By, Command, CurrentAppResponse, \
|
|
16
|
-
DumpResponse, FindElementRequest, FindElementResponse, InstallAppRequest, InstallAppResponse, TapRequest, \
|
|
16
|
+
DumpResponse, FindElementRequest, FindElementResponse, InstallAppRequest, InstallAppResponse, SendKeysRequest, TapRequest, \
|
|
17
17
|
WindowSizeResponse
|
|
18
18
|
from uiautodev.driver.base_driver import BaseDriver
|
|
19
19
|
from uiautodev.exceptions import ElementNotFoundError
|
|
@@ -39,7 +39,7 @@ def get_command_params_type(command: Command) -> Optional[BaseModel]:
|
|
|
39
39
|
return type_hints.get("params")
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def send_command(driver: BaseDriver, command:
|
|
42
|
+
def send_command(driver: BaseDriver, command: Command, params=None):
|
|
43
43
|
if command not in COMMANDS:
|
|
44
44
|
raise NotImplementedError(f"command {command} not implemented")
|
|
45
45
|
func = COMMANDS[command]
|
|
@@ -142,6 +142,14 @@ def dump(driver: BaseDriver) -> DumpResponse:
|
|
|
142
142
|
def wake_up(driver: BaseDriver):
|
|
143
143
|
driver.wake_up()
|
|
144
144
|
|
|
145
|
+
@register(Command.SEND_KEYS)
|
|
146
|
+
def send_keys(driver: BaseDriver, params: SendKeysRequest):
|
|
147
|
+
driver.send_keys(params.text)
|
|
148
|
+
|
|
149
|
+
@register(Command.CLEAR_TEXT)
|
|
150
|
+
def clear_text(driver: BaseDriver):
|
|
151
|
+
driver.clear_text()
|
|
152
|
+
|
|
145
153
|
|
|
146
154
|
def node_match(node: Node, by: By, value: str) -> bool:
|
|
147
155
|
if by == By.ID:
|
|
@@ -39,6 +39,8 @@ class Command(str, enum.Enum):
|
|
|
39
39
|
VOLUME_UP = "volumeUp"
|
|
40
40
|
VOLUME_DOWN = "volumeDown"
|
|
41
41
|
VOLUME_MUTE = "volumeMute"
|
|
42
|
+
SEND_KEYS = "sendKeys"
|
|
43
|
+
CLEAR_TEXT = "clearText"
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
class TapRequest(BaseModel):
|
|
@@ -94,4 +96,8 @@ class FindElementRequest(BaseModel):
|
|
|
94
96
|
|
|
95
97
|
class FindElementResponse(BaseModel):
|
|
96
98
|
count: int
|
|
97
|
-
value: List[Node]
|
|
99
|
+
value: List[Node]
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class SendKeysRequest(BaseModel):
|
|
103
|
+
text: str
|
|
@@ -127,7 +127,7 @@ class AndroidDriver(BaseDriver):
|
|
|
127
127
|
def volume_mute(self):
|
|
128
128
|
self.adb_device.keyevent("VOLUME_MUTE")
|
|
129
129
|
|
|
130
|
-
def get_app_version(self, package_name: str) ->
|
|
130
|
+
def get_app_version(self, package_name: str) -> dict:
|
|
131
131
|
"""
|
|
132
132
|
Get the version information of an app, including mainVersion and subVersion.
|
|
133
133
|
|
|
@@ -172,11 +172,17 @@ class AndroidDriver(BaseDriver):
|
|
|
172
172
|
|
|
173
173
|
def open_app_file(self, package: str) -> Iterator[bytes]:
|
|
174
174
|
line = self.adb_device.shell(f"pm path {package}")
|
|
175
|
+
assert isinstance(line, str)
|
|
175
176
|
if not line.startswith("package:"):
|
|
176
177
|
raise AndroidDriverException(f"Failed to get package path: {line}")
|
|
177
178
|
remote_path = line.split(':', 1)[1]
|
|
178
179
|
yield from self.adb_device.sync.iter_content(remote_path)
|
|
179
|
-
|
|
180
|
+
|
|
181
|
+
def send_keys(self, text: str):
|
|
182
|
+
self.ud.send_keys(text)
|
|
183
|
+
|
|
184
|
+
def clear_text(self):
|
|
185
|
+
self.ud.clear_text()
|
|
180
186
|
|
|
181
187
|
|
|
182
188
|
def parse_xml(xml_data: str, wsize: WindowSize, display_id: Optional[int] = None) -> Node:
|
|
@@ -102,4 +102,11 @@ class BaseDriver(abc.ABC):
|
|
|
102
102
|
def open_app_file(self, package: str) -> Iterator[bytes]:
|
|
103
103
|
""" open app file """
|
|
104
104
|
raise NotImplementedError()
|
|
105
|
-
|
|
105
|
+
|
|
106
|
+
def send_keys(self, text: str):
|
|
107
|
+
""" send keys to device """
|
|
108
|
+
raise NotImplementedError()
|
|
109
|
+
|
|
110
|
+
def clear_text(self):
|
|
111
|
+
""" clear text input on device """
|
|
112
|
+
raise NotImplementedError()
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import logging
|
|
2
3
|
|
|
3
4
|
import httpx
|
|
4
5
|
import websockets
|
|
5
6
|
from fastapi import APIRouter, HTTPException, Request, WebSocket, WebSocketDisconnect
|
|
6
7
|
from fastapi.responses import Response
|
|
7
|
-
import logging
|
|
8
|
-
|
|
9
8
|
|
|
10
9
|
logger = logging.getLogger(__name__)
|
|
11
10
|
router = APIRouter()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{uiautodev-0.10.0 → uiautodev-0.11.0}/uiautodev/driver/udt/appium-uiautomator2-v5.12.4-light.apk
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|