I using nightwatch framework for running End-to-End test. I am able to run all the test cases successfully in chrome and IE but few tests fails for phantomjs. Test cases below error out
'Search' : function(browser) {
browser
.url('http://localhost:8001/index.html')
browser
.setValue('input[id=SearchInput-inner]', 'abc')
.click('button[id=nsnButton]')
.pause('1000')
.verify.attributeEquals('#nsnButton', 'disabled', 'true')
},
Error I get is
Testing if attribute disabled of <#nsnButton> equals "true". Element does not have a disabled attribute. - expected "true" but got: "null"
other test that fails is
.getCssProperty('#SearchInput-inner', 'border-color', function(result) {
this.verify.equal(result.value, '#ee0000');
})
Error I get is Failed [equal]: ('rgb(238, 0, 0)' == '#ee0000') - expected "#ee0000" but got: "rgb(238, 0, 0)"
How Can I handle this situation where same test works for ie and chrome but fails for phantomjs.
Thanks