My test calls my page object and then attempts to call the method .navigate() but an error is returned on that line that says 'undefined is not a function'.
for reference: I am using nightwatch 0.7.9. Here is what my test looks like:
//homeTest.js*
module.exports = {
'demoGoogle' : function (client) {
var google = client.page.home();
google.navigate()
client.end();
}
}
//home.js*
*this is pretty much exactly how the examples provided are using it, am I missing something obvious?
folder structure:
- pages
- main
- home.js
- project
- project.js
- tests
- main
- homeTest.js
- nightwatch.json
//nightwatch.json (snippet)
{
"src_folders" : ["tests"],
"output_folder" : "reports/nightwatch_junitXML",
"custom_commands_path" : "custom_commands",
"custom_assertions_path" : "",
"page_objects_path" : ["pages/main", "pages/project"],
"globals_path" : "globals/globalsModule.js",
},