mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 00:28:20 +08:00
Add: WSA solution on display 0 (experimental)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from lxml import etree
|
||||
|
||||
from module.device.method.adb import Adb
|
||||
from module.device.method.wsa import WSA
|
||||
from module.device.method.uiautomator_2 import Uiautomator2
|
||||
from module.device.method.utils import HierarchyButton
|
||||
from module.logger import logger
|
||||
|
||||
|
||||
class AppControl(Adb, Uiautomator2):
|
||||
class AppControl(Adb, WSA, Uiautomator2):
|
||||
hierarchy: etree._Element
|
||||
|
||||
def app_is_running(self) -> bool:
|
||||
@@ -24,8 +25,11 @@ class AppControl(Adb, Uiautomator2):
|
||||
def app_start(self):
|
||||
package = self.config.Emulator_PackageName
|
||||
method = self.config.Emulator_ControlMethod
|
||||
wsa = self.config.Emulator_WSA
|
||||
logger.info(f'App start: {package}')
|
||||
if method == 'uiautomator2' or method == 'minitouch':
|
||||
if wsa == "display_0":
|
||||
self.app_start_wsa_display_0(package)
|
||||
elif method == 'uiautomator2' or method == 'minitouch':
|
||||
self.app_start_uiautomator2(package)
|
||||
else:
|
||||
self.app_start_adb(package)
|
||||
|
||||
Reference in New Issue
Block a user