临时提交
This commit is contained in:
@@ -120,15 +120,14 @@ def toHome():
|
|||||||
def tapAction():
|
def tapAction():
|
||||||
body = request.get_json()
|
body = request.get_json()
|
||||||
udid = body.get("udid")
|
udid = body.get("udid")
|
||||||
x = body.get("x")
|
|
||||||
y = body.get("y")
|
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid)
|
||||||
session = client.session()
|
session = client.session()
|
||||||
session.appium_settings({"snapshotMaxDepth": 0})
|
session.appium_settings({"snapshotMaxDepth": 0})
|
||||||
print(client.window_size())
|
|
||||||
width = client.window_size()[0]
|
x = body.get("x")
|
||||||
height = client.window_size()[1]
|
y = body.get("y")
|
||||||
session.tap(x * width, y * height)
|
|
||||||
|
session.tap(x, y)
|
||||||
return ResultData(data="").toJson()
|
return ResultData(data="").toJson()
|
||||||
|
|
||||||
# 拖拽事件
|
# 拖拽事件
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ class Deviceinfo(object):
|
|||||||
lists = Usbmux().device_list()
|
lists = Usbmux().device_list()
|
||||||
# 添加设备逻辑
|
# 添加设备逻辑
|
||||||
for device in lists:
|
for device in lists:
|
||||||
print(device)
|
|
||||||
if device not in self.deviceArray:
|
if device not in self.deviceArray:
|
||||||
self.screenProxy += 1
|
self.screenProxy += 1
|
||||||
self.connectDevice(device.udid)
|
self.connectDevice(device.udid)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 899 KiB After Width: | Height: | Size: 1.6 MiB |
@@ -273,7 +273,8 @@ class ScriptManager():
|
|||||||
|
|
||||||
# 假装看几秒视频
|
# 假装看几秒视频
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
client.swipe_up()
|
if count != 0:
|
||||||
|
client.swipe_up()
|
||||||
|
|
||||||
# 右滑返回
|
# 右滑返回
|
||||||
client.swipe_right()
|
client.swipe_right()
|
||||||
|
|||||||
Reference in New Issue
Block a user