nightwatch: JUnit XML report file is not generated when element is not present

TestCase is given below

module.exports = {
    'step one: navigate to google': function (browser) {
        browser
            .url('http://www.google.com')
            .waitForElementVisible('body', 1000)
            .setValue('input[type=text]', 'nightwatch')
            .waitForElementVisible('input[name=btn]', 1000)
    }
}

Reponse Log is

tarting ChromeDriver 2.44.609545 (c2f88692e98ce7233d2df7c724465ecacfe74df5) on port 9515
Only local connections are allowed.
before each...
Running:  step one: navigate to google

✔ Element <body> was visible after 52 milliseconds.
✖ Timed out while waiting for element <input[name=btn]> to be present for 1000 milliseconds. - expected "visible" but got: "not found"
    at Object.step one: navigate to google (someDirectory/Test.js:7:14)
    at process.internalTickCallback (internal/process/next_tick.js:77:7) 


FAILED: 1 assertions failed and  1 passed (3.27s)
after each...
_________________________________________________
Process finished with exit code 1

Report xml file is not Generating in this case. OS-- Mac Mojave

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (3 by maintainers)

Most upvoted comments

what about this? it just happened to me