Appium版本1.4.13 xcode版本7.2 当我启动我的代码时,我在日志中出错。 ideviceinstaller是instaled。帮助我解决这个问题。
错误日志:错误:无法启动Appium会话,错误是:错误: 命令失败:/ bin / sh -c ideviceinstaller -u 9B2E5BE1-C31B-4484-B14C-73E2554F7887 -i /Users/Ark/Library/Developer/Xcode/DerivedData/Ark-bwydkfpusazddvfbasvrcjailpjv/Build/Products/QA-iphoneos/Ark.app
java代码:
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.junit.Before;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
/**
* Created by betbull on 1/29/16.
*/
public class Runing {
public static IOSDriver driver;
public static AppiumDriver wd;
public static void main(String[] args) throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "IOS");
capabilities.setCapability("platformVersion", "9.2");
capabilities.setCapability("deviceName", "iPhone6");
capabilities.setCapability("app", "/Users/Ark/Library/Developer/Xcode/DerivedData/Ark-bwydkfpusazddvfbasvrcjailpjv/Build/Products/QA-iphoneos/Ark.app");
driver= new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
}
}
答案 0 :(得分:0)
我相信您需要在使用Appium在iOS上执行自动化测试之前安装ideviceinstaller。引自here以下内容应有所帮助。尝试在终端上运行:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
//等待命令完成。
运行:brew install ideviceinstaller