I have two input fields, Username and Password and a spinner button. When i click on this spinner button these two input fields get disabled and I am redirected to another page. I am writing an end-to-end testing to check whether these input fields are disabled.
element(by.model('username')).sendKeys('rabi');
element(by.model('password')).sendKeys('rabi');
/* click on spin button */
spinBtn = element(by.className('call-to-action'));
spinBtn.click();
/* check if input is disabled */
var loginInput = element(by.id('login-username'));
expect(loginInput.isEnabled()).toBe(false);
isEnabled()
is the correct way to do it. It should be lower caseI
though, so the correct line would beexpect(loginInput.isEnabled()).toBe([true|false])
. See the docs for more information. – Arnaldo