Skip to content

Commit

Permalink
3.155
Browse files Browse the repository at this point in the history
  • Loading branch information
rev1si0n committed May 20, 2023
1 parent c5b3c5b commit 0fba1cd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.155
* 支持 tab 键遍历界面元素
* 支持在远程桌面输入英文字符
* 支持远程桌面触摸

3.153
* 修复部分场景截图失败的问题
* 次要更改
Expand Down
2 changes: 1 addition & 1 deletion lamda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Distributed under MIT license.
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
__version__ = "3.153"
__version__ = "3.155"
8 changes: 4 additions & 4 deletions lamda/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,12 @@ def press_key(self, key):
req = protos.PressKeyRequest(key=key)
r = self.stub.pressKey(req)
return r.value
def press_keycode(self, code):
def press_keycode(self, code, meta=0):
"""
通过 Keycode(整数)按下未定义的按键
ref: https://developer.android.com/reference/android/view/KeyEvent
"""
req = protos.PressKeyRequest(code=code)
req = protos.PressKeyRequest(code=code, meta=meta)
r = self.stub.pressKeyCode(req)
return r.value
def take_screenshot(self, quality, bound=None):
Expand Down Expand Up @@ -1767,8 +1767,8 @@ def set_orientation(self, orien=Orientation.ORIEN_NATURE):
return self.stub("UiAutomator").set_orientation(orien)
def press_key(self, key):
return self.stub("UiAutomator").press_key(key)
def press_keycode(self, code):
return self.stub("UiAutomator").press_keycode(code)
def press_keycode(self, code, meta=0):
return self.stub("UiAutomator").press_keycode(code, meta)
def take_screenshot(self, quality=100, bound=None):
return self.stub("UiAutomator").take_screenshot(quality, bound=bound)
def screenshot(self, quality=100, bound=None):
Expand Down
1 change: 1 addition & 0 deletions lamda/rpc/uiautomator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ message OrientationRequest {
message PressKeyRequest {
Key key = 1;
uint32 code = 2;
uint32 meta = 3;
}

message TakeScreenshotRequest {
Expand Down

0 comments on commit 0fba1cd

Please sign in to comment.