python_selenium:xptah高级使用

1.使用多个条件组合查询://*/div[@class='' and @id = '']

2.使用container包含://*/span[contains(@class,'xxxxxxxxxxxxx') and @title='']

解释:span标签的class包含了"xxxxxxxxxxx"则可这样用

3.使用文字定位://*/span[text()='ahsjkq']

4.父节点://*/div[@class='qwqw']/../..

5.注意:span节点无法进行点击操作

原文地址:https://www.cnblogs.com/jinziguang/p/14666234.html