Hi, I have a chromeless question: In nightmarejs...
# orm-help
g
Hi, I have a chromeless question: In nightmarejs I used to do "conditional paths":
Copy code
nightmare
  .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?