Skip to content

Commit 0fba1cd

Browse files
committed
3.155
1 parent c5b3c5b commit 0fba1cd

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.155
2+
* 支持 tab 键遍历界面元素
3+
* 支持在远程桌面输入英文字符
4+
* 支持远程桌面触摸
5+
16
3.153
27
* 修复部分场景截图失败的问题
38
* 次要更改

lamda/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# Distributed under MIT license.
44
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5-
__version__ = "3.153"
5+
__version__ = "3.155"

lamda/client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -803,12 +803,12 @@ def press_key(self, key):
803803
req = protos.PressKeyRequest(key=key)
804804
r = self.stub.pressKey(req)
805805
return r.value
806-
def press_keycode(self, code):
806+
def press_keycode(self, code, meta=0):
807807
"""
808808
通过 Keycode(整数)按下未定义的按键
809809
ref: https://developer.android.com/reference/android/view/KeyEvent
810810
"""
811-
req = protos.PressKeyRequest(code=code)
811+
req = protos.PressKeyRequest(code=code, meta=meta)
812812
r = self.stub.pressKeyCode(req)
813813
return r.value
814814
def take_screenshot(self, quality, bound=None):
@@ -1767,8 +1767,8 @@ def set_orientation(self, orien=Orientation.ORIEN_NATURE):
17671767
return self.stub("UiAutomator").set_orientation(orien)
17681768
def press_key(self, key):
17691769
return self.stub("UiAutomator").press_key(key)
1770-
def press_keycode(self, code):
1771-
return self.stub("UiAutomator").press_keycode(code)
1770+
def press_keycode(self, code, meta=0):
1771+
return self.stub("UiAutomator").press_keycode(code, meta)
17721772
def take_screenshot(self, quality=100, bound=None):
17731773
return self.stub("UiAutomator").take_screenshot(quality, bound=bound)
17741774
def screenshot(self, quality=100, bound=None):

lamda/rpc/uiautomator.proto

+1
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ message OrientationRequest {
543543
message PressKeyRequest {
544544
Key key = 1;
545545
uint32 code = 2;
546+
uint32 meta = 3;
546547
}
547548

548549
message TakeScreenshotRequest {

0 commit comments

Comments
 (0)