修复控制功能
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -5,7 +5,8 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="eceeff5e-51c1-459c-a911-d21ec090a423" name="Changes" comment="20250904-初步功能已完成">
|
<list default="true" id="eceeff5e-51c1-459c-a911-d21ec090a423" name="Changes" comment="20250904-初步功能已完成">
|
||||||
<change beforePath="$PROJECT_DIR$/Module/DeviceInfo.py" beforeDir="false" afterPath="$PROJECT_DIR$/Module/DeviceInfo.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Module/FlaskService.py" beforeDir="false" afterPath="$PROJECT_DIR$/Module/FlaskService.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from Entity.ResultData import ResultData
|
|||||||
from Utils.ControlUtils import ControlUtils
|
from Utils.ControlUtils import ControlUtils
|
||||||
from Utils.ThreadManager import ThreadManager
|
from Utils.ThreadManager import ThreadManager
|
||||||
from script.ScriptManager import ScriptManager
|
from script.ScriptManager import ScriptManager
|
||||||
from Entity.Variables import addModelToAnchorList
|
from Entity.Variables import addModelToAnchorList, wdaFunctionPort
|
||||||
import Entity.Variables as ev
|
import Entity.Variables as ev
|
||||||
from Utils.JsonUtils import JsonUtils
|
from Utils.JsonUtils import JsonUtils
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ def launchApp():
|
|||||||
def toHome():
|
def toHome():
|
||||||
body = request.get_json()
|
body = request.get_json()
|
||||||
udid = body.get("udid")
|
udid = body.get("udid")
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid, wdaFunctionPort)
|
||||||
client.home()
|
client.home()
|
||||||
return ResultData(data="").toJson()
|
return ResultData(data="").toJson()
|
||||||
|
|
||||||
@@ -195,7 +195,10 @@ def toHome():
|
|||||||
def tapAction():
|
def tapAction():
|
||||||
body = request.get_json()
|
body = request.get_json()
|
||||||
udid = body.get("udid")
|
udid = body.get("udid")
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid, wdaFunctionPort)
|
||||||
|
print("-----------------------")
|
||||||
|
print(client)
|
||||||
|
print("-----------------------")
|
||||||
session = client.session()
|
session = client.session()
|
||||||
session.appium_settings({"snapshotMaxDepth": 0})
|
session.appium_settings({"snapshotMaxDepth": 0})
|
||||||
x = body.get("x")
|
x = body.get("x")
|
||||||
@@ -210,7 +213,7 @@ def swipeAction():
|
|||||||
body = request.get_json()
|
body = request.get_json()
|
||||||
udid = body.get("udid")
|
udid = body.get("udid")
|
||||||
direction = body.get("direction")
|
direction = body.get("direction")
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid, wdaFunctionPort)
|
||||||
session = client.session()
|
session = client.session()
|
||||||
session.appium_settings({"snapshotMaxDepth": 0})
|
session.appium_settings({"snapshotMaxDepth": 0})
|
||||||
|
|
||||||
@@ -232,7 +235,7 @@ def longPressAction():
|
|||||||
udid = body.get("udid")
|
udid = body.get("udid")
|
||||||
x = body.get("x")
|
x = body.get("x")
|
||||||
y = body.get("y")
|
y = body.get("y")
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid, wdaFunctionPort)
|
||||||
session = client.session()
|
session = client.session()
|
||||||
session.appium_settings({"snapshotMaxDepth": 5})
|
session.appium_settings({"snapshotMaxDepth": 5})
|
||||||
session.tap_hold(x, y, 1.0)
|
session.tap_hold(x, y, 1.0)
|
||||||
@@ -375,7 +378,7 @@ def addTempAnchorData():
|
|||||||
def getChatTextInfo():
|
def getChatTextInfo():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
udid = data.get("udid")
|
udid = data.get("udid")
|
||||||
client = wda.USBClient(udid)
|
client = wda.USBClient(udid, wdaFunctionPort)
|
||||||
session = client.session()
|
session = client.session()
|
||||||
xml = session.source()
|
xml = session.source()
|
||||||
try:
|
try:
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user