码迷,mamicode.com
首页 > 移动开发 > 详细

appium 1.6.3 + ios 10.2 + xcode 8.2.1 真机运行iphone app

时间:2017-01-20 14:34:36      阅读:493      评论:0      收藏:0      [点我收藏+]

标签:margin   except   try   add   session   etc   tcap   gen   generated   

appium命令行启动:

appium --address "127.0.0.1" --session-override --pre-launch --debug-log-spacing --log "/tmp/appium.log" --platform-version "10.2" --platform-name "iOS" --app "com.abc.abcdef" --udid "f9b87274e2a24b310399dd56dd80f8561d99fdac" --show-ios-log --device-name "iPhone 6s Plus"

 

testng用例代码:

        IOSDriver<MobileElement> driver = null;
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.2");
        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6s Plus");
        capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
        capabilities.setCapability(MobileCapabilityType.APP, "/Users/apptest/Downloads/abcdef.ipa");
        capabilities.setCapability(MobileCapabilityType.UDID, "f9b87274e2a24b310399dd56dd80f8561d99fdac");
        // capabilities.setCapability(MobileCapabilityType.,"f9b87274e2a24b310399dd56dd80f8561d99fdac");
        try {
            driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

            driver.findElementByName("个人中心").click();
            driver.findElementByName("首页").click();
    

 

appium 1.6.3 + ios 10.2 + xcode 8.2.1 真机运行iphone app

标签:margin   except   try   add   session   etc   tcap   gen   generated   

原文地址:http://www.cnblogs.com/testway/p/6322642.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!