nightwatch-docs
nightwatch-docs copied to clipboard
Document Available Page Commands
Taken from https://github.com/nightwatchjs/nightwatch/issues/605
From the examples in the documentation, it's clear that 'click', 'setValue', and 'assert' are available on the page object, but 'pause' is not ( being available at this.api.pause
). The other commands available on a Page are not clear without looking through the source code and finding that everything in api/element-commands is loaded onto the page object, and everything in api/client-commands is not.
I think the docs should either
- list all the element commands in the page documentation
or
- specify this distinction under the page documentation ( "Element commands are loaded onto the page object, client commands are not" ) and then label each method under the "Commands API Reference" as 'element' or 'client' level.
The first seems simpler, but I could see an argument for the second as well, especially if the distinction between element and page commands might matter for other modules in the future.
+1
so true.. :+1: