harmony重启应用、重新安装应用回放

hz_1122
yineng.huang 2025-05-07 14:41:14 +08:00
parent b1e29fd073
commit 16a86df98e
4 changed files with 11 additions and 8 deletions

View File

@ -50,12 +50,12 @@ public abstract class AbstractDebuggerService implements DebuggerService {
@Override
public boolean removeApp(String deviceId, String appPackage) {
return false;
return deviceHandleHelper.removeApp(deviceId,appPackage);
}
@Override
public boolean installApp(String deviceId, String appPath, String appPackage) {
return false;
public boolean installApp(String deviceId, String appPath) {
return deviceHandleHelper.installApp(deviceId,appPath);
}
@Override
@ -94,7 +94,7 @@ public abstract class AbstractDebuggerService implements DebuggerService {
@Override
public boolean activeApp(String deviceId, String appPackage) {
return false;
return deviceHandleHelper.activateApp(deviceId,appPackage);
}
protected String regularSub(String xml, String reg, String target) {

View File

@ -27,6 +27,7 @@ import net.northking.cctp.upperComputer.exception.ParamMistakeException;
import net.northking.cctp.upperComputer.service.thread.AndroidDeviceAllInfoThread;
import net.northking.cctp.upperComputer.service.thread.AndroidDeviceInfoByPackageThread;
import net.northking.cctp.upperComputer.utils.HttpUtils;
import net.northking.cctp.upperComputer.utils.deviceHepler.android.AndroidDeviceHelper;
import net.northking.cctp.upperComputer.webSocket.entity.CatchParam;
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.WebElement;
@ -88,6 +89,10 @@ public class AndroidDebuggerServiceImpl extends AbstractDebuggerService {
@Value("${appium.server.contextPath:/wd/hub}")
private String appiumContextPath;
public AndroidDebuggerServiceImpl() {
this.deviceHandleHelper = new AndroidDeviceHelper();
}
@Autowired
@Override
public void setMobileProperty(MobileProperty mobileProperty) {

View File

@ -38,6 +38,8 @@ public interface DebuggerService {
boolean removeApp(String deviceId, String appPackage);
boolean installApp(String deviceId, String appPath);
boolean installApp(String deviceId, String appPath, String appPackage);
String execShellWaitResult(String shell ,String dir, Map<String,String> envMap,boolean isWaitOrNot);

View File

@ -276,10 +276,6 @@ public class IosDebuggerServiceImpl extends AbstractDebuggerService {
return deviceHandleHelper.isAppInstalled(deviceId, appPackage);
}
@Override
public boolean removeApp(String deviceId, String appPackage) {
return deviceHandleHelper.removeApp(deviceId, appPackage);
}
/**