• 不用 xcodebuild tools,而从 gui 到 xcode 里运行测试的话,报错如下,说明还没有到运行 bootstrap 的程度,payload 就挂了。

  • dyld: Library not loaded: @rpath/XCTest.framework/XCTest
    github 上有人提了这个 issue,但是被关闭了,说升级到 1.6.4 可以。但是我这不行啊。
    https://github.com/Carthage/Carthage/issues/756
    dyld: Library not loaded: @rpath/XCTest.framework/XCTest
    Referenced from: /var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/XCTRunner
    Reason: no suitable image found. Did find:

    另外,这个路径我也打不开啊
    /var/containers/
    这两个我倒是能找到,这个 bundle 到底有什么用啊?
    state->old_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b52998ac4571334a6ce75968a8a691a2/e01d730b625c83ad877fb699701bc35ea3e800ec/WebDriverAgentRunner-Runner.app
    state->new_bundle: /Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app

  • 在进行下面操作的时候一直报错。
    OSX:10.12.3
    Xcode:8.2.1
    iPhone:10.0.2
    试过把 appium-server 从 1.6.3 更新到 1.6.4@beta,问题依旧存在。
    在 appium-desktop 1.0.0@beta3 上也是。
    @codeskyblue,请问有什么解决办法?
    谢谢!

    # 运行测试
    xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "$UDID" test
    

    log 如下:

    === BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
    
    Check dependencies
    
    MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
    state->old_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b52998ac4571334a6ce75968a8a691a2/e01d730b625c83ad877fb699701bc35ea3e800ec/WebDriverAgentRunner-Runner.app
    state->new_bundle: /Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
    state->dst_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
        dst_ipa: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa
    __MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
    writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
    dyld: Library not loaded: @rpath/XCTest.framework/XCTest
      Referenced from: /var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/XCTRunner
      Reason: no suitable image found.  Did find:
        /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
        /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    2017-03-15 11:18:27.561 xcodebuild[1602:8414] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
    
    Testing failed:
        Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
    ** TEST FAILED **
    
  • 请问,你这个问题解决了吗?

  • 遇到一样的问题,请问解决了吗?

  • 运行到 13 步的时候报错,怎么解决?
    各种 google 没找到办法,求帮助。
    OSX 系统:10.12.3
    手机 iOS:10.0.2
    Xcode:8.2.1

    2017-03-15 11:18:10.856 xcodebuild[1602:8419]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
    /Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/E0B90FF5-E45B-45B5-B610-965D5247106A/Session-WebDriverAgentRunner-2017-03-15_111810-MU8njH.log
    2017-03-15 11:18:10.857 xcodebuild[1602:8414] [MT] IDETestOperationsObserverDebug: (52DEA282-9FC3-4890-9EF9-40E21DE6A28D) Beginning test session WebDriverAgentRunner-52DEA282-9FC3-4890-9EF9-40E21DE6A28D at 2017-03-15 11:18:10.855 with Xcode 8C1002 on target <DVTiOSDevice: 0x7ff4067782b0> {
            deviceSerialNumber:         F18xxxxxxxMQ
            identifier:                 xxxxxxxxxxxxxxx
            deviceClass:                iPhone
            deviceName:                 iPhone 6
            deviceIdentifier:           xxxxxxxxxxxx
            productVersion:             10.0.2
            buildVersion:               14A456
            deviceSoftwareVersion:      10.0.2 (14A456)
            deviceArchitecture:         arm64
            deviceTotalCapacity:        11968585728
            deviceAvailableCapacity:    6633230336
            deviceIsTransient:          NO
            ignored:                    NO
            deviceIsBusy:               NO
            deviceIsActivated:          YES
            deviceActivationState:      Activated
            deviceType:                 <DVTDeviceType:0x7ff406612120 Xcode.DeviceType.iPhone>
            supportedDeviceFamilies:    (
        1
    )
            applications:              (null)
            provisioningProfiles:      (null)
            activityProgress:          -2
            activityTitle:
            hasInternalSupport:        NO
            isSupportedOS:             YES
            developerDiskMountError:   (null)
    (null)
        } (10.0.2 (14A456))
    === BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
    
    Check dependencies
    
    === BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
    
    Check dependencies
    
    MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
    state->old_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b52998ac4571334a6ce75968a8a691a2/e01d730b625c83ad877fb699701bc35ea3e800ec/WebDriverAgentRunner-Runner.app
    state->new_bundle: /Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
    state->dst_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
        dst_ipa: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa
    __MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
    writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
    dyld: Library not loaded: @rpath/XCTest.framework/XCTest
      Referenced from: /var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/XCTRunner
      Reason: no suitable image found.  Did find:
        /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
        /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    2017-03-15 11:18:27.561 xcodebuild[1602:8414] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
    
    Testing failed:
        Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
    ** TEST FAILED **
    

    @appium_test

  • 学习了

  • 我的环境和你一样,遇到的问题也和你一样,你这个解决了吗?

     Referenced from: /var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/XCTRunner
      Reason: no suitable image found.  Did find:
        /private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
        /private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    2017-03-14 14:12:33.688 xcodebuild[21705:136533] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
    
    Testing failed:
        Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
    ** TEST FAILED **
    
  • 居然不在社区群里。
    祝愿社区原来越好!

  • @codeskyblue
    希望有帮助😀

    import os
    import glob
    import unittest
    from time import sleep
    
    from appium import webdriver
    
    # Returns abs path relative to this file and not cwd
    PATH = lambda p: os.path.abspath(
        os.path.join(os.path.dirname(__file__), p)
    )
    
    class AndroidWebViewTests(unittest.TestCase):
    
        def setUp(self):
            desired_caps = {}
            desired_caps['app'] = PATH('../apps/webview.apk')
            desired_caps['platformName'] = 'Android'
            desired_caps['platformVersion'] = '4.4.4'
            desired_caps['deviceName'] = '274b3f06'
            desired_caps['noSign'] = 'true'
            desired_caps['unicodeKeyboard'] = 'true'
            desired_caps['resetKeyboard'] = 'true'
            desired_caps['noReset'] = 'false'
    
            self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
    
        def tearDown(self):
            # end the session
            self.driver.quit()
    
        def test_webview(self):
            self.driver.switch_to.context('WEBVIEW_com.testerhome.webview')
    
            input_field = self.driver.find_element_by_name('word')
            searchButton = self.driver.find_element_by_id('index-bn')
            sleep(1)
            input_field.clear()
            input_field.send_keys('Appium User')
            searchButton.click()
            sleep(2)
    
            source = self.driver.page_source
            self.assertNotEqual(1, source.find('"TesterHome"'))
    
    if __name__ == '__main__':
        suite = unittest.TestLoader().loadTestsFromTestCase(AndroidWebViewTests)
        unittest.TextTestRunner(verbosity=2).run(suite)
    
    
  • 成都 Appium Girls 活动之行 at 2016年07月25日

    赞 赞 赞
    @tobytang 其实应该介绍下社区 ID😂
    感谢@momoyue 的精心组织和 Thoughtworks 的支持。

  • 感谢 UCloud 助力 TesterHome at 2016年07月07日

    👍

  • @vividly
    laiyuncong8404@163.com,红米 note3,Android 5.0.2,谢谢!

  • laiyuncong8404@163.com,已报名和领取任务,谢谢!

  • 我也正考虑用 js 来搞了,没招了

  • #3 楼 @lihuazhang
    我最初也是这么怀疑的,因为
    增加显示属性后,Debug 图片的 size 显示是 0,无解了

    <li>
        <div ng-click="bindDevice()" style="display: block"><img src="../img/add.PNG" />
        </div>
        <p>
            添加设备
        </p>
    </li>
    
    [7] pry(main)> addBtn = find_element(:css, 'ul > li img')
    #<Selenium::WebDriver::Element:0x..f81060ccc id="0.47901470004580915-1">
    [8] pry(main)> addBtn.displayed?
    false
    [9] pry(main)> addBtn.size
    {
         :width => 0,
        :height => 0
    }
    
  • #1 楼 @lihuazhang
    我脚本里其实已经做了 sleep 延时等待,但是结果依旧。

    而如果用 wait.until { find_element(:css, 'ul > li img').displayed? },
    结果则是等待 30s 后超时,元素仍旧没有 displayed。

  • Facebook/atc 环境搭建总结 at 2016年02月23日

    #52 楼 @doctorq
    dhcpd 和 hostapd 服务安装好了,两个工具的 conf 也配置了,但是执行

    sudo hostapd -B /etc/hostapd/hostapd.conf
    

    提示找不到设备
    有什么遗漏了吗?

  • Facebook/atc 环境搭建总结 at 2016年02月23日

    @luis @doctorq
    我买的水星(Mercury)MW150U 150M 无线 USB 网卡(免驱版),hostd 和 dhcpd 服务安装成功,
    配置了 hostapd.conf 和 dpcpd.conf,然后启动 hostapd 服务的时候报错了。

    atc_server@ATCServer:~$ sudo hostapd -B /etc/hostapd/hostapd.conf 
    Configuration file: /etc/hostapd/hostapd.conf 
    Could not read interface wlan0 flags: No such device 
    nl80211: Driver does not support authentication/association or connect commands 
    Could not read interface wlan0 flags: No such device 
    nl80211 driver initialization failed. 
    hostapd_free_hapd_data: Interface wlan0 wasn't started
    

    查看 USB 网卡信息

    atc_server@ATCServer:~$ lsusb
    Bus 001 Device 002: ID 148f:2878 Ralink Technology, Corp. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
    Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    
    atc_server@ATCServer:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0c:29:57:5d:08  
              inet addr:192.168.7.133  Bcast:192.168.7.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe57:5d08/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1122 errors:0 dropped:0 overruns:0 frame:0
              TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:77782 (77.7 KB)  TX bytes:12870 (12.8 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:171 errors:0 dropped:0 overruns:0 frame:0
              TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:12253 (12.2 KB)  TX bytes:12253 (12.2 KB)
    
    atc_server@ATCServer:~$ sudo ifconfig wlan0 192.168.0.1 netmask 255.255.255.0
    SIOCSIFADDR: No such device
    wlan0: ERROR while getting interface flags: No such device
    SIOCSIFNETMASK: No such device
    
    

    我觉得是无线网卡驱动没有真正装上,于是 Google
    http://ubuntuforums.org/showthread.php?t=2020237

    sudo apt-get install linux-firmware-nonfree
    

    重启虚拟机后然后再试,还是报 No such device

    求指教

  • 坐等完整报告,之前陆金所的报告好精彩。

  • 源姐提到的安全测试工具 at 2015年11月10日

    源姐提到的基本书怎么列出啊

  • 感谢 fir.im —— 结果公布 at 2015年11月02日

    API 自动化测试框架分享 +1,“陆金所” 之移动应用体检报告 +1

  • Appium python 框架 at 2015年10月13日

    #11 楼 @wusuowei
    请安装 VC++ 运行包或者 VS 2010 以上版本,应该可以解决。