• 也还没有,不过坐标值是怎么得到的呢

  • 嗯,明白了,已经用 findbys 返回的列表序号转化了,多谢

  • 3.通过元素的索引定位
    MobileBy.xpath("//className[index]")
    楼主,这种情况怎么看 index?比如我一个页面只有三个 value 值一样的 button 怎么定这个 index 呢?我这样写:@FindBy(xpath = "//XCUIElementTypeButton[@label = 'btn select n'][1]"),@FindBy(xpath = "//XCUIElementTypeButton[@label = 'btn select n'][2]"),只能定位到第一个

  • 果然是,多谢

  • iOSNsPredicateString 用法详解,期待楼主新的分享

  • Restrict where this project can be run 确认没有勾选么,或者 label 会不会重名呀

  • Mykola Mokhnach 的 xpath 怎么跟 iOS-inspector 不一样?是/AppiumAUT 开头的,代码定位不到元素。需要改造下么?

  • 👍 赞,之前一直用的 webElement,现在看来还是狭隘,以后用 iOSDriver,多谢

  • iOS 目前主要用 xpath 和 name,官方推荐用 AccessibilityId,感觉跟 name 一样。目前主要问题的 desktop 在没有 name 或 AccessibilityId 情况下,不能提供 xpath,app-inspector 又各种任性不稳定,焦虑😪

  • 没有 xpath 什么套路

  • 终于出来了,赞

  • 对,就是获取不到 xpath,纯 RN 页面就可以抓取到,不知题主有没有遇到过这种情况

  • 页面有 native 链接的话就会是一整块的,如果页面是纯 RN 或链接到的页面页面 RN 页面,就可以正常抓取

  • #1 楼 @chentest 好的 我试下 多谢

  • Check dependencies
    2017-01-04 15:31:49.002 xcodebuild[9050:831581] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/meiliu/Library/Developer/Xcode/DerivedData/WebDriverAgent-hdfgyfvxzzcnljgmksmzwafvohrd/Logs/Test/D451C4A1-B317-4C3A-8C3D-9C79A2B43685/Session-WebDriverAgentRunner-2017-01-04_153147-YM31XF.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/meiliu/Library/Developer/Xcode/DerivedData/WebDriverAgent-hdfgyfvxzzcnljgmksmzwafvohrd/Logs/Test/D451C4A1-B317-4C3A-8C3D-9C79A2B43685/Session-WebDriverAgentRunner-2017-01-04_153147-YM31XF.log}
    The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
    Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
    Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
    Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'

    Testing failed:
    Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
    Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
    ** TEST FAILED **

    The following build commands failed:
    Check dependencies
    (1 failure)

    编译通过,但运行 xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真机的 udid' test 时报错,不知@appium_test 有没有遇到过这种情况