             browser
               .waitForElementVisible     turnOnButtonSelector, 50000
               .click                     turnOnButtonSelector
-              .waitForElementNotVisible  modalSelector, 200000
+              .waitForElementNotPresent  modalSelector, 200000
               .waitForElementVisible     vmSelector, 20000
               .pause 10000

          if result.status is 0
            console.log '✔  VM is building, waiting to finish'
            browser
              .waitForElementNotVisible  modalSelector, 200000
              .waitForElementVisible     vmSelector, 20000
              .pause 10000


  browser.element 'css selector', vmSelector, (result) =>
    if result.status is 0
      console.log '✔  VM is running'
      browser.waitForElementNotPresent  modalSelector, 50000
    else
      console.log '✔  VM is not running'
      browser
