xpath获取当前节点的父节点,兄弟节点的方法

xpath=\"//XCUIElementTypeStaticText[@name='设置小组背景图']/../following-sibling::XCUIElementTypeCell[2]/XCUIElementTypeTextView\""

.. 表示当前节点的父节点

following-sibling::div[1] 表示当前节点的兄弟节点中的 第 1 个 div标签

转载于:https://www.jianshu.com/p/d3bbae526660

猜你喜欢

转载自blog.csdn.net/weixin_34090643/article/details/91175861