我开始学习使用Appium工具进行自动化测试(基于macOS系统下使用eclipse IDE的java代码)我想我已经完成了教程中找到的所有必需配置但是当我执行程序时,appium正在安装我应该测试的应用程序,但它正在启动WebDriverAgent Xcode项目中存在的integration.app,我不明白为什么实际上它会在手机中安装 WebDriverAgent 以及我需要测试的应用程序和集成应用程序(WebDriverAgent 项目中的默认应用程序),并在我的设备中启动integration.app这是小代码 DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("platformName", "iOS"); capabilities.setCapability("deviceName", "iPhone de Administrateur"); capabilities.setCapability("platformVersion", "12.2"); capabilities.setCapability("app","path/app.ipa"); capabilities.setCapability(MobileCapabilityType.NO_RESET, true); capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME,"XCUITest"); capabilities.setCapability("useNewWDA", false); capabilities.setCapability("xcodeOrgId", "Haithem Kefi"); capabilities.setCapability("xcodeSigningId", "iPhone Developer"); capabilities.setCapability("bundleId",`"bundle"); capabilities.setCapability("udid", "did"); IOSDriver driver = new IOSDriver(url, capabilities); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.launchApp();
1 回答
蛊毒传说
TA贡献1895条经验 获得超3个赞
首先:
IOSDriver driver = new IOSDriver(url, capabilities); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
足以启动您的应用程序,无需调用driver.launchApp();
其次:尝试使用capabilities.setCapability("fullReset", true);
而不是capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
添加回答
举报
0/150
提交
取消