无法使用Appium在Mac中运行自动化测试用例

时间:2018-08-06 14:37:56

标签: java ios xcode macos appium-ios

我试图在Mac上运行appium脚本,但是在运行脚本时遇到问题。详细信息如下:

配置:

OS: 10.13.6
xcode: 9.4.1
Simulator : iPhone 7
Java_client jar = 6.1.0
Okhttp jar = 3.9.1
httpclient jar = 4.5.3
appium server = 1.8.1

步骤: 我在脚本中添加了以下所需功能:

  DesiredCapabilities capabilities = new DesiredCapabilities();
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 7");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
capabilities.setCapability(MobileCapabilityType.APP, "/Users/synerzip/Desktop/emulator/Concishare Provider.app");
  capabilities.setCapability("usePrebuiltWDA", false);
 capabilities.setCapability("clearSystemFiles", true);
  capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "iOS");
 capabilities.setCapability(MobileCapabilityType.AUTO_WEBVIEW, true);
        IOSDriver driver = new IOSDriver(new URL("http://0.0.0.:4723/wd/hub"), capabilities);

错误:

当我尝试运行它时,它显示以下错误:

Exception in thread "main" org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:03.216Z'
System info: host: 'syn-macmini-03.synerzipune.local', ip: '2001:df0:d300:212:a155:8262:1823:7137%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_171'
Driver info: driver.version: IOSDriver

我添加了版本为“ 5.0.0”的Java客户端jar,但仍然收到相同的错误

0 个答案:

没有答案