I recently utilized the snaptest.io chrome extension for recording and automating a basic test involving navigating to Google and performing a search. The test works smoothly when using the Snaptest chrome extension, generating NightwatchJS code in the process.
However, I encountered an issue when attempting to use the generated NightwatchJS code as a homepage.js file within the Nightwatch NPM framework.
The following is the code generated by the Snaptest chrome extension:
const TIMEOUT = 10000;
// Other variables declared here
module.exports = {
"Unnamed test": function(browser) {
// Test steps defined here
}
};
// Helper functions and auto-generated code follows
/*
* Components
*/
function bindComponents(browser) {
// Code for binding components
}
/*
* Auto-Generated helper code
*/
function bindHelpers(browser) {
// Code for binding helpers
}
// More helper functions included
An error was reported while running the test via the nightwatch command prompt ::
Error details displayed here
It seems there may be a syntax problem or error causing issues with deploying the Snaptest generated test in the Nightwatch Test Framework. Any suggestions or advice on how to make it work seamlessly would be greatly appreciated!
I am currently using selenium standalone server 3.9.0 along with chromewebdriver.
Your input and guidance are highly valued. Thank you!