lamda 7.55__tar.gz → 7.57__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {lamda-7.55 → lamda-7.57}/PKG-INFO +1 -1
- {lamda-7.55 → lamda-7.57}/lamda/__init__.py +1 -1
- {lamda-7.55 → lamda-7.57}/lamda/client.py +20 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/services.proto +1 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/uiautomator.proto +17 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/PKG-INFO +1 -1
- {lamda-7.55 → lamda-7.57}/README.md +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/bcast.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/const.py +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/exceptions.py +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/any.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/api.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/compiler/plugin.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/descriptor.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/duration.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/empty.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/field_mask.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/source_context.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/struct.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/timestamp.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/type.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/wrappers.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/application.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/debug.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/file.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/policy.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/proxy.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/settings.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/shell.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/status.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/storage.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/types.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/util.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/rpc/wifi.proto +0 -0
- {lamda-7.55 → lamda-7.57}/lamda/types.py +0 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/SOURCES.txt +0 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/dependency_links.txt +0 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/not-zip-safe +0 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/requires.txt +0 -0
- {lamda-7.55 → lamda-7.57}/lamda.egg-info/top_level.txt +0 -0
- {lamda-7.55 → lamda-7.57}/setup.cfg +0 -0
- {lamda-7.55 → lamda-7.57}/setup.py +0 -0
@@ -242,6 +242,8 @@ TouchSequence.__iter__ = touchSequenceIter
|
|
242
242
|
Bound.width = property(width)
|
243
243
|
Bound.height = property(height)
|
244
244
|
|
245
|
+
FindImageMethod = protos.FindImageMethod
|
246
|
+
|
245
247
|
Bound.center = center
|
246
248
|
Bound.corner = corner
|
247
249
|
|
@@ -853,6 +855,19 @@ class UiAutomatorStub(BaseServiceStub):
|
|
853
855
|
"""
|
854
856
|
r = self.stub.getClipboard(protos.Empty())
|
855
857
|
return r.value
|
858
|
+
def find_similar_image(self, data, threshold=0,
|
859
|
+
max_distance=0, bound=None,
|
860
|
+
method=FindImageMethod.FI_TEMPLATE):
|
861
|
+
"""
|
862
|
+
根据提供的目标图片从屏幕中获取相似图片位置
|
863
|
+
"""
|
864
|
+
req = protos.FindImageRequest(bound=bound)
|
865
|
+
req.method = method
|
866
|
+
req.max_distance = max_distance
|
867
|
+
req.threshold = threshold
|
868
|
+
req.partial = data
|
869
|
+
r = self.stub.findSimilarImage(req)
|
870
|
+
return r.bounds
|
856
871
|
def freeze_rotation(self, freeze=True):
|
857
872
|
"""
|
858
873
|
锁定屏幕旋转
|
@@ -2022,6 +2037,11 @@ class Device(object):
|
|
2022
2037
|
return self.stub("UiAutomator").wait_for_idle(timeout)
|
2023
2038
|
def get_last_toast(self):
|
2024
2039
|
return self.stub("UiAutomator").get_last_toast()
|
2040
|
+
def find_similar_image(self, data, threshold=0,
|
2041
|
+
max_distance=0, bound=None,
|
2042
|
+
method=FindImageMethod.FI_TEMPLATE):
|
2043
|
+
return self.stub("UiAutomator").find_similar_image(data, threshold=threshold,
|
2044
|
+
max_distance=max_distance, bound=bound, method=method)
|
2025
2045
|
# watcher
|
2026
2046
|
def remove_all_watchers(self):
|
2027
2047
|
return self.stub("UiAutomator").remove_all_watchers()
|
@@ -186,6 +186,7 @@ service UiAutomator {
|
|
186
186
|
rpc registerClickUiObjectWatcher(WatcherRegistRequest) returns (Boolean) {}
|
187
187
|
rpc registerPressKeysWatcher(WatcherRegistRequest) returns (Boolean) {}
|
188
188
|
rpc registerNoneOpWatcher(WatcherRegistRequest) returns (Boolean) {}
|
189
|
+
rpc findSimilarImage(FindImageRequest) returns (FindImageResponse) {}
|
189
190
|
}
|
190
191
|
|
191
192
|
service Wifi {
|
@@ -554,3 +554,20 @@ message WatcherRegistRequest {
|
|
554
554
|
Key key = 4;
|
555
555
|
}
|
556
556
|
}
|
557
|
+
|
558
|
+
enum FindImageMethod {
|
559
|
+
FI_TEMPLATE = 0;
|
560
|
+
FI_FEATURE_POINT = 1;
|
561
|
+
}
|
562
|
+
|
563
|
+
message FindImageRequest {
|
564
|
+
FindImageMethod method = 1;
|
565
|
+
Bound bound = 2;
|
566
|
+
bytes partial = 3;
|
567
|
+
uint32 max_distance = 4;
|
568
|
+
float threshold = 5;
|
569
|
+
}
|
570
|
+
|
571
|
+
message FindImageResponse {
|
572
|
+
repeated Bound bounds = 1;
|
573
|
+
}
|
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
|
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
|