还未发布过话题
  • 楼主,

    @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