1
我要選擇這個元素:量角器:語法選擇基於HTML元素屬性
<span class="required" ng-class="{'disabled': saveInProgress}"
input-control="{okCallback:setFieldValue, params:['firstName'],
title:'First Name', value: person.firstName,
validate:{length:100},empty:false}">
<span hs-placeholder="Type First Name" class="ng-binding"></span>
</span>
而這一個了:
<span class="required" ng-class="{'disabled': saveInProgress}"
input-control="{okCallback:setFieldValue, params:['lastName'],
title:'Last Name', value: person.lastName, validate:{length:100}}">
<span hs-placeholder="Type Last Name" class="ng-binding">
</span>
</span>
我試圖這樣做使用
var input = element(by.css('span.required span.ng-binding'));
browser.actions().mouseMove(input).click().perform();
但它一直只是調用第一個名稱元素。有任何想法嗎?請:)
太棒了!謝謝 :) – user3400351