I'm writing a protractor test that check the value of an input type field.
Code in the Test Page:
expect(logPage.logFileSizeField.getAttribute('value')).toBe(logFileSizeDeafault)
Object Page code:
this.logFileSizeField = element(by.css('input[name="logFileSizeField"]'));
The test run correct localy (so I'm sure the element is found) but when it runs on jenkins it fails because the value returned from the getAttribute('value'); is empty.
Error from jenkins:
Error Message
Expected '' to be '1048576'.
Stacktrace
Error: Failed expectation
at [object Object].<anonymous>(/usr/src/app/tests/e2e/log/log.spec.js:43:64)
at /usr/local/lib/node_modules/protractor/node_modules/jasminewd/index.js:94:14