我正在嘗試使用量角器測試ui-select。在這個ui-選擇我有一個國家的名單。 我的HTML看起來像:使用ui-select使用量角器測試
<ui-select ng-model="datiAnagrafici.countryOfBirth" name="countryOfBirth" theme="bootstrap" reset-search-input="true" append-to-body="true" required blur>
<ui-select-match placeholder="paese di nascita">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="country.code as country in countries | filter: {name:$select.search}">
<span ng-bind-html="country.name"></span>
</ui-select-choices>
</ui-select>
我的頁面對象的樣子:
this.country = element(by.model('datiAnagrafici.countryOfBirth'));
this.fillForm = function(){
this.country.sendKeys('IT');
}
在我的規格文件我有:
it('should fill the form', function() {
form.fillForm();
})
但是當我運行我的測試中NG-模型沒有填寫發送的數據。 你有任何提示嗎? 感謝
你應該將此標記爲答案:) –
這是否適用於phantomjs? – rave