-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update usbmux, remove deps requests,logzero,cached-property,simplejson
- Loading branch information
1 parent
3972b36
commit a5e477b
Showing
12 changed files
with
634 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import random | ||
import wdapy | ||
|
||
c = wdapy.AppiumUSBClient() | ||
w, h = c.window_size() | ||
# print(w, h) | ||
x = w//10 * random.randint(1, 9) | ||
print(x) | ||
sy = h//10*7 | ||
ey = h//10*2 | ||
|
||
steps = 10 | ||
step_size = (ey - sy) // steps | ||
ys = list(range(sy+step_size, ey, step_size)) + [ey] | ||
|
||
gestures = [] | ||
gestures.append(wdapy.Gesture("press", options={"x": x, "y": sy})) | ||
for y in ys: | ||
gestures.append(wdapy.Gesture("wait", options={"ms": 100})) | ||
gestures.append(wdapy.Gesture("moveTo", options={"x": x, "y": y})) | ||
gestures.append(wdapy.Gesture("wait", options={"ms": 100})) | ||
gestures.append(wdapy.Gesture("release")) | ||
|
||
|
||
for g in gestures: | ||
print(g.action, g.options) | ||
|
||
# c.debug = True | ||
c.appium_settings({"snapshotMaxDepth": 3}) | ||
c.touch_perform(gestures) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
requests>=2.9.1 | ||
Deprecated>=1.2.6 | ||
Pillow | ||
logzero | ||
cached-property | ||
simplejson | ||
retry | ||
construct>=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Created on Tue Mar 05 2024 10:18:09 by codeskyblue | ||
Copy from https://github.com/doronz88/pymobiledevice3 | ||
""" | ||
|
||
class NotPairedError(Exception): | ||
pass | ||
|
||
|
||
class MuxError(Exception): | ||
pass | ||
|
||
|
||
class MuxVersionError(MuxError): | ||
pass | ||
|
||
|
||
class BadCommandError(MuxError): | ||
pass | ||
|
||
|
||
class BadDevError(MuxError): | ||
pass | ||
|
||
|
||
class MuxConnectError(MuxError): | ||
pass | ||
|
||
|
||
class MuxConnectToUsbmuxdError(MuxConnectError): | ||
pass | ||
|
||
|
||
class ArgumentError(Exception): | ||
pass |
Oops, something went wrong.