我正在尝试比较我的标签ng-reflect-model,但是量角器返回null。为什么呢?
我的HTML代码:
**Input Tag code**:
<input class="form-control ng-datepicker-input ng-valid ng-touched ng-dirty" maxlength="10" name="viewValue" oncopy="return false" onpaste="return false" onkeypress="return event.charCode > = 48 && event.charCode <= 57" type="text" ng-reflect-name="viewValue" ng-reflect-model="12/03/4567">
我的测试代码:
it('Deve verificar se o campo de Fim Vigência só aceita numeros', function()
{
var fimVigencia = element(by.xpath('/html/body/application/auth-
container/layout/div/main-content/div/norma-
cadastro/div/form/div[7]/datapicker/form/div[1]/input'));
fimVigencia.sendKeys('abcdefghijlmnopqrstuvxz123456789');
element(by.buttonText('Salvar')).click();
expect(fimVigencia.getAttribute('ng-reflect-
model')).toBe('123456789');
});
错误:预计null为'1234567'。