Xpath method to get the current node's parent, sibling nodes

xpath = \ "// XCUIElementTypeStaticText [@ name = 'group provided background'] /../ following-sibling :: XCUIElementTypeCell [2] / XCUIElementTypeTextView \" "

.. indicates the parent of the current node

following-sibling :: div [1] indicates that the current node sibling nodes in  a first one  div tag

Reproduced in: https: //www.jianshu.com/p/d3bbae526660

Guess you like

Origin blog.csdn.net/weixin_34090643/article/details/91175861