nightwatch-docs icon indicating copy to clipboard operation
nightwatch-docs copied to clipboard

Document Available Page Commands

Open iabw opened this issue 9 years ago • 2 comments

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.

iabw avatar Sep 23 '15 13:09 iabw

+1

IndraniBiswas avatar Feb 03 '16 21:02 IndraniBiswas

so true.. :+1:

davidlinse avatar Jul 06 '16 19:07 davidlinse