我在Appium
1.7.2上运行并在11.2.5操作系统上使用iPhone
6s。我正在尝试创建一个简单的测试来定位真实的iOS
设备与模拟器,但每次运行代码Appium
/ xCode
都会打开模拟器并使用它来代替真实设备
如何获得使用真实设备的appium。我试过没有运气就提供设备的UUID。
谢谢,
摇篮
compile group: 'io.appium', name: 'java-client', version:'6.0.0-BETA2'
compile group: 'org.seleniumhq.selenium', name: 'selenium-server', version:'3.8.1'
compile group: 'org.seleniumhq.selenium', name: 'selenium-remote-driver', version:'3.8.1'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:'3.8.1'
Java代码
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("deviceName", "iPhone 6s");
capabilities.setCapability("platformVersion", "11.2");
//capabilities.setCapability("app", "https://s3.amazonaws.com/appium/TestApp8.4.app.zip");
capabilities.setCapability("browserName", "Safari");
capabilities.setCapability("uuid", "26deaa8eb5003b3d56a561ada2fcff2174b00df1");
capabilities.setCapability("deviceOrientation", "portrait");
capabilities.setCapability("browserName", "safari");
capabilities.setCapability("automationName", "XCUITest");
答案 0 :(得分:1)
如果您想在真实设备上运行Appium / XCUITest,请按照guideline
进行操作 appium采用模拟器的原因是你没有提供xcodeOrgId
& xcodeSigningId
能力:
{
"xcodeOrgId": "<Team ID in apple dev account>",
"xcodeSigningId": "iPhone Developer"
}
您可能会遇到XCUITest xcodebuild exited with code '65'
,因此请按照指南/在stackoverflow上搜索如何手动修复设置。
答案 1 :(得分:0)
要测试ios真实设备,需要以下功能
app=${app}
version=${version}
platform=${platform}
deviceName=${deviceName}
udid=${udid}
platformName=${platformName}
newCommandTimeout=2500
name=${name}
automationName=${automationName}
xcodeOrgId=${xcodeOrgId}
xcodeSigningId=${xcodeSigningId}
usePrebuiltWDA=${usePrebuiltWDA}