如何从下拉列表中选择一个订单号。页面有一个类似的2多个下拉相同的 ng-repeat。当我试图选择一些文本,它选择匹配的文本从其他下拉。文本等于也失败。
HTML:-
<select ng-repeat="select in controller.getSelects() track by select.key" ng-attr-name="select-{{select.key}}" name="select-liftId">
<option value="ALL" ng-if="select.default" class="ng-scope">ORDER NUMBER</option>
<option ng-repeat="v in select.options" value="cdfd8775-1114-462b-8a47-bc7a93e0d6ab" ng-selected="v['_id'] === controller.values[select.key]" class="ng-binding ng-scope"> 3</option>
<option ng-repeat="v in select.options" value="4f790134-31ab-4212-b152-c5c4101fbe5c" ng-selected="v['_id'] === controller.values[select.key]" class="ng-binding ng-scope"> 2</option>
<option ng-repeat="v in select.options" value="8cfb28d3-955c-45b1-877f-56b67edad6ff" ng-selected="v['_id'] === controller.values[select.key]" class="ng-binding ng-scope"> 1</option>
目前为止,我尝试的是:
click element repeater=v in select.options@row[2]
click element xpath=//option[text() =${label})]
click element xpath=//option[contains(text(),'${label}')]
我会非常感激任何帮助..谢谢。
更新:这对我现在很有帮助...单击元素//选择[5]/选项[3]
2条答案
按热度按时间mkshixfv1#
单击元素xpath=//选择/选项[@value=“8 cfb 28 d3 - 955 c-45 b1 - 877 f-56 b67 edad 6 ff”]
isr3a4wc2#
您需要先使用get元素列出选项列表,然后使用index单击这些列表