Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch_to_app 后 touch 无效 #70

Open
xxdzyyh opened this issue Feb 26, 2022 · 0 comments
Open

switch_to_app 后 touch 无效 #70

xxdzyyh opened this issue Feb 26, 2022 · 0 comments

Comments

@xxdzyyh
Copy link

xxdzyyh commented Feb 26, 2022

switch_to_app 切换到非FrontApp ,touch 无效。

手机信息 12.4 6s

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Entry</key>
	<string>simulate_touch.py</string>
	<key>FrontApp</key>
	<string>com.zjx.zxtouch</string>
	<key>Orientation</key>
	<string>1</string>
</dict>
</plist>
from zxtouch.client import zxtouch
from zxtouch.touchtypes import *
import time

device = zxtouch("127.0.0.1")

device.switch_to_app("com.feng.appinsight")

time.sleep(1.5)
device.touch(TOUCH_DOWN, 1, 400, 400)
time.sleep(1.5)
device.touch(TOUCH_MOVE, 1, 400, 600)
time.sleep(1.5)
device.touch(TOUCH_UP, 1, 400, 600)
time.sleep(1.5)

device.switch_to_app("com.apple.springboard") # return to home screen

device.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant