• 楼主,

    @Lihuazhang @iSteven @visionary

    对于xpath的定位web元素我有一个问题:

    使用chrome打开web,开发者工具中,右键,可以复制出来xpath,

    例如,/html/body/div[7]/div/div[2]/div/ng-transclude/div[2]/div[1]/i;

    但是这个路径在Python + ride 编辑使用:xpath=/html/body/div[7]/div/div[2]/div/ng-transclude/div[2]/div[1]/i,运行直接报错。

    我的这个路径是一个web向右滑出之后的图片,没有文字,appium inspector无法直接获取xpath;

    请问下,该如何改进xpath,可以定位到图片?

  • #136楼 @softblank 请问你这个问题如何解决了;
    2017-02-03 10:47:42.914060 XCTRunner[244:4940] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740e3a00> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only

    我现在启动真机就是黑屏,终端报错
    [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740eff80> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only
    2017-02-20 16:24:55.354716 XCTRunner[249:5672] Built at Feb 20 2017 14:04:52
    2017-02-20 16:24:55.434906 XCTRunner[249:5672] ServerURLHere->http://10.88.29.132:8100<-ServerURLHere
    2017-02-20 16:24:55.436862 XCTRunner[249:5672] Listening on USB
    在Safari中无法打开http://10.88.29.132:8100