diff --git a/lib/tags/usage.js b/lib/tags/usage.js index ce8cf1eb57e..297c444c61b 100644 --- a/lib/tags/usage.js +++ b/lib/tags/usage.js @@ -33,6 +33,10 @@ module.exports = function usageOptions (hexo, args) { return 'Serially click multiple elements' } + const withinSubject = () => { + return 'Element to search for children in. If null, search begins from root-level DOM element' + } + switch (opt) { case 'log': return log() @@ -42,6 +46,8 @@ module.exports = function usageOptions (hexo, args) { return multiple() case 'timeout': return timeout() + case 'withinSubject': + return withinSubject() default: // error when an invalid usage option was provided throw new Error(`{% usage_options %} tag helper was provided an invalid option: ${opt}`) diff --git a/source/api/commands/get.md b/source/api/commands/get.md index bc91e680698..f1d4d017f2e 100644 --- a/source/api/commands/get.md +++ b/source/api/commands/get.md @@ -51,6 +51,7 @@ Pass in an options object to change the default behavior of `cy.get()`. | --------- | -------------------------------------------------------- | ---------------------------------- | | `log` | `true` | {% usage_options log %} | | `timeout` | {% url `defaultCommandTimeout` configuration#Timeouts %} | {% usage_options timeout cy.get %} | +| 'withinSubject' | null | {% usage_options withinSubject %} | ## Yields {% helper_icon yields %}