guille
05/08/2018, 12:13 PMnightmare
.goto('http://...')
.evaluate(()=> {
return (document.querySelectorAll('.has-error').length > 0);
})
.then((has_error)=> {
if (has_error) {
return nightmare
.insert('input.name', false)
.insert('input.name', 'Lorem ipsum');
} else {
return nightmare;
}
})
.click('button')
.etc
Is there anyway to do the same with chromeless?