Skip to Main Content

Use Nightwatch for Automated Testing

Posted on 2.19.2014

If you're looking for a simpler way to conduct automated testing of browser-based apps and websites, look no further than NightWatch.js.

Written in Node.js and using the Selenium WebDriver API, developers can perform different commands and assertions on DOM elements. NightWatch features a rather straightforward syntax which uses only Javascript and CSS selectors, so there's no need to initialize other objects and classes - just write out the test specs and you're done. 

NightWatch works by sending HTTP requests to the Selenium server with the parameters and then interprets the response. There are instances when NightWatch needs to send at least two requests to the Selenium server in order to perform a command or assertion - the first being the request to locate an element given a CSS selector (or Xpath expression) and the next to perform the actual command/assertion on the given element.

Leave Your Comment

Login to Comment

Become a Member

Not already a part of our community?
Sign up to participate in the discussion. It's free and quick.

Sign Up

 

Leave a comment
    Load more comments
    New code

  • Unlimited potential. Unlimited names. .COM's just $9.99 each!

    5 Next-Generation Supplier Strategies

    Tipalti