Appium_iOS 配置
一、 iOS Driver 配置
options = AppiumOptions()
options.load_capabilities({
"platformName": "iOS",
"appium:automationName": "XCUITest",
"appium:deviceName": "TestiPhone7",
"appium:udid":"571a523ecb9d16bcbf404d4613576b28e4",
"appium:bundleId":"com.hello.world",
"appium:platformVersion": "15.8",
"appium:noReset": True,
# "appium:fullReset": False,
"appium:useNewWDA": False,
"appium:usePrebuiltWDA": True
})
driver = webdriver.Remote("http://127.0.0.1:4723", options=options)
options.load_capabilities({
"platformName": "iOS",
"appium:automationName": "XCUITest",
"appium:deviceName": "TestiPhone7",
"appium:udid":"571a523ecb9d16bcbf404d4613576b28e4",
"appium:bundleId":"com.hello.world",
"appium:platformVersion": "15.8",
"appium:noReset": True,
# "appium:fullReset": False,
"appium:useNewWDA": False,
"appium:usePrebuiltWDA": True
})
driver = webdriver.Remote("http://127.0.0.1:4723", options=options)
二、使用terminal 安装WebDriverAgent
2.1 首先使用xcode打开appium 下的WebDriverAgent.xcodeproj, 然后配置bundle id, 配置完成后使用命令行安装WebDriverAgent
2.2 xcodebuild build-for-testing test-without-building -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=udid'
2.3 在WebDriverAgent.xcodeproj 目录下创建了.xcconfig文件, 文件内容:
DEVELOPMENT_TEAM = <Team ID>
CODE_SIGN_IDENTITY = iPhone Developer