0
<hs-details-item>
<hs-label>Location</hs-label>
<hs-value-block>
<hs>
<hs-text-box ng-class="{'disabled': isAmenityPosting }" class="required" input-control="{title:'Location', okCallback:setJobSite, value:jobSiteName,
autocomplete:{ values:getJobSiteList, reload: true }, ss:'location'}">
<i class="icon-room"></i><span hs-placeholder="Select Location" class="ng-binding"></span>
</hs-text-box>
</hs>
<hs>
<!-- ngIf: isBarcodeShow() --><hs-button ng-class="{'disabled': soCreating }" class="barcode-special-btn smaller ng-scope" ng-if="isBarcodeShow()" hs-gesture="{handler:startScan, param: onBarcodeScanCompleted}"><i class="icon-br-code"></i></hs-button><!-- end ngIf: isBarcodeShow() -->
</hs>
</hs-value-block>
</hs-details-item>
方案:点击“位置”栏... 什么是从上面的代码片段拿出在量角器命令,选择“位置”字段的最佳方法? 可以通过不使用Xpath来完成吗?在量角器选择现场
@ alecxe ...谢谢你这么多..它的工作.. – Kevin
@ alecxe,使用Xpath创建自动化脚本是否有缺点? – Kevin
@Kevin,[量角器风格指南](https://github.com/angular/protractor/blob/master/docs/style-guide.md#never-use-xpath)指示不使用XPath,但是,从我的观点是,这个陈述过于强硬,而应该是一个建议,因为在适当的情况下会有某些用例,就像这种情况一样。 – alecxe