0
我该如何编写一个xpath,它会给我以下元素:<span class="ng-binding ng-scope" ng-if="sideData.orderRequestType == 'import'"> ORI - 643 </span>
?需要在页面上定位元素的帮助
谢谢!
我该如何编写一个xpath,它会给我以下元素:<span class="ng-binding ng-scope" ng-if="sideData.orderRequestType == 'import'"> ORI - 643 </span>
?需要在页面上定位元素的帮助
谢谢!
您应该考虑元素的哪部分不会改变。 例如,如果class
参数始终是一样的,你可以根据class
建设的XPath:
//span[@class='ng-binding ng-scope']
你应该问你的问题太多精确...但是回答这个问题,这是例子的XPath://'跨度[@ class ='ng-binding ng-scope']' – kotoj
这也是正确的xpath:'// span',和this:'// *'。我不知道你的问题是什么:) – kotoj
谢谢!我错过了“跨度”部分! – Tudor