{
  "doc": {
    "id": "api/commands/invoke",
    "title": "invoke | Cypress Documentation",
    "description": "Invoke a function on the previously yielded subject in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/invoke.md",
    "version": "48b03b5502f7aea1d0454750cce208f775403542",
    "updated_at": "2026-05-20T19:00:20.270Z",
    "headings": [
      {
        "id": "api/commands/invoke#invoke",
        "text": "invoke",
        "level": 1
      },
      {
        "id": "api/commands/invoke#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/invoke#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/invoke#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/invoke#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/invoke#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/invoke#function",
        "text": "Function",
        "level": 3
      },
      {
        "id": "api/commands/invoke#assert-on-a-functions-return-value",
        "text": "Assert on a function's return value",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-invoke-to-test-html-content",
        "text": "Use .invoke() to test HTML content",
        "level": 4
      },
      {
        "id": "api/commands/invoke#properties-that-are-functions-are-invoked",
        "text": "Properties that are functions are invoked",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-invoke-show-and-invoke-trigger",
        "text": "Use .invoke('show') and .invoke('trigger')",
        "level": 4
      },
      {
        "id": "api/commands/invoke#function-with-arguments",
        "text": "Function with Arguments",
        "level": 3
      },
      {
        "id": "api/commands/invoke#send-specific-arguments-to-the-function",
        "text": "Send specific arguments to the function",
        "level": 4
      },
      {
        "id": "api/commands/invoke#use-cy-invoke-removeattr-target-to-get-around-new-tab",
        "text": "Use cy.invoke('removeAttr', 'target') to get around new tab",
        "level": 4
      },
      {
        "id": "api/commands/invoke#arguments-are-automatically-forwarded-to-the-function",
        "text": "Arguments are automatically forwarded to the function",
        "level": 4
      },
      {
        "id": "api/commands/invoke#arrays",
        "text": "Arrays",
        "level": 3
      },
      {
        "id": "api/commands/invoke#jquery-method",
        "text": "jQuery method",
        "level": 3
      },
      {
        "id": "api/commands/invoke#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/invoke#third-party-plugins",
        "text": "Third Party Plugins",
        "level": 3
      },
      {
        "id": "api/commands/invoke#using-a-kendo-dropdown",
        "text": "Using a Kendo DropDown",
        "level": 4
      },
      {
        "id": "api/commands/invoke#retries",
        "text": "Retries",
        "level": 3
      },
      {
        "id": "api/commands/invoke#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/invoke#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/invoke#assertions-learn-about-assertions",
        "text": "Assertions Learn about assertions",
        "level": 3
      },
      {
        "id": "api/commands/invoke#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/invoke#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/invoke#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/invoke#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/invoke#syntax",
      "doc_id": "api/commands/invoke",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.invoke(functionName).invoke(options, functionName).invoke(functionName, args...).invoke(options, functionName, args...)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('.input').invoke('val').should('eq', 'foo') // Invoke the 'val' functioncy.get('.modal').invoke('show') // Invoke the jQuery 'show' functioncy.wrap({ animate: fn }).invoke('animate') // Invoke the 'animate' function\n```\n\n**Incorrect Usage**\n\n```\ncy.invoke('convert') // Errors, cannot be chained off 'cy'cy.wrap({ name: 'Jane' }).invoke('name') // Errors, 'name' is not a functioncy.wrap({ animate: fn })  .invoke('animate')  .then(() => {}) // 'animate' will be called multiple times\n```\n\n### Arguments\n\n**functionName _(String, Number)_**\n\nName of function to be invoked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.invoke()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.invoke()` to resolve before [timing out](#Timeouts) |\n\nargs...\\*\\*\n\nAdditional arguments to be given to the function call. There is no limit to the number of arguments.\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.invoke()` yields the return value of the method.\n*   `.invoke()` is a query, and it is _safe_ to chain further commands.\n*   If you chain additional commands off of `.invoke()`, the function will be called multiple times!\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 271
    },
    {
      "id": "api/commands/invoke#usage",
      "doc_id": "api/commands/invoke",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('.input').invoke('val').should('eq', 'foo') // Invoke the 'val' functioncy.get('.modal').invoke('show') // Invoke the jQuery 'show' functioncy.wrap({ animate: fn }).invoke('animate') // Invoke the 'animate' function\n```\n\n**Incorrect Usage**\n\n```\ncy.invoke('convert') // Errors, cannot be chained off 'cy'cy.wrap({ name: 'Jane' }).invoke('name') // Errors, 'name' is not a functioncy.wrap({ animate: fn })  .invoke('animate')  .then(() => {}) // 'animate' will be called multiple times\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 84
    },
    {
      "id": "api/commands/invoke#arguments",
      "doc_id": "api/commands/invoke",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**functionName _(String, Number)_**\n\nName of function to be invoked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.invoke()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.invoke()` to resolve before [timing out](#Timeouts) |\n\nargs...\\*\\*\n\nAdditional arguments to be given to the function call. There is no limit to the number of arguments.\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 116
    },
    {
      "id": "api/commands/invoke#yields-learn-about-subject-management",
      "doc_id": "api/commands/invoke",
      "heading": "Yields Learn about subject management",
      "heading_level": 3,
      "content_markdown": "### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.invoke()` yields the return value of the method.\n*   `.invoke()` is a query, and it is _safe_ to chain further commands.\n*   If you chain additional commands off of `.invoke()`, the function will be called multiple times!\n",
      "section": "api",
      "anchors": [
        "yields-learn-about-subject-management"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 59
    },
    {
      "id": "api/commands/invoke#examples",
      "doc_id": "api/commands/invoke",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Function\n\n#### Assert on a function's return value\n\n```\nconst fn = () => {  return 'bar'}cy.wrap({ foo: fn }).invoke('foo').should('eq', 'bar') // true\n```\n\n#### Use `.invoke()` to test HTML content\n\n[Check out our example recipe where we use `cy.invoke('text')` to test against HTML content in 'Bootstrapping your App'](/llm/markdown/app/references/recipes.md#Server-Communication)\n\n#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')  .should('be.hidden') // element is hidden  .invoke('show') // call jquery method 'show' on the '.container'  .should('be.visible') // element is visible now  .find('input') // drill down into a child \"input\" element  .type('Cypress is great') // and type text\n```\n\n#### Use `.invoke('show')` and `.invoke('trigger')`\n\n[Check out our example recipe where we use `cy.invoke('show')` and `cy.invoke('trigger')` to click an element that is only visible on hover](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n### Function with Arguments\n\n#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {  return a + b + c}cy.wrap({ sum: fn })  .invoke('sum', 2, 4, 6)  .should('be.gt', 10) // true  .and('be.lt', 20) // true\n```\n\n#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n#### Arguments are automatically forwarded to the function\n\n```\ncy.get('img').invoke('attr', 'src').should('include', 'myLogo')\n```\n\n### Arrays\n\nIn the above examples, the subject was an object, but `cy.invoke` also works on arrays and allows using numerical index to pick a function to run.\n\n```\nconst reverse = (s) => Cypress._.reverse(s)const double = (n) => n * n// picks function with index 1 and calls it with argument 4cy.wrap([reverse, double]).invoke(1, 4).should('eq', 16)\n```\n\n### jQuery method\n\nIf the parent command yields a jQuery element, we can invoke a jQuery method, like `attr`, `text`, or `val`. To confirm the element's `id` attribute for example:\n\n```\n<div id=\"code-snippet\">The code example</div>\n```\n\n```\ncy.contains('The code example')  .invoke('attr', 'id')  .should('equal', 'code-snippet')\n```\n\n**Tip:** Cypress has a built-in Chai-jQuery assertion to confirm the attribute. The above example can be written simply as:\n\n```\ncy.contains('The code example').should('have.attr', 'id', 'code-snippet')\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 483
    },
    {
      "id": "api/commands/invoke#function",
      "doc_id": "api/commands/invoke",
      "heading": "Function",
      "heading_level": 3,
      "content_markdown": "### Function\n\n#### Assert on a function's return value\n\n```\nconst fn = () => {  return 'bar'}cy.wrap({ foo: fn }).invoke('foo').should('eq', 'bar') // true\n```\n\n#### Use `.invoke()` to test HTML content\n\n[Check out our example recipe where we use `cy.invoke('text')` to test against HTML content in 'Bootstrapping your App'](/llm/markdown/app/references/recipes.md#Server-Communication)\n\n#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')  .should('be.hidden') // element is hidden  .invoke('show') // call jquery method 'show' on the '.container'  .should('be.visible') // element is visible now  .find('input') // drill down into a child \"input\" element  .type('Cypress is great') // and type text\n```\n\n#### Use `.invoke('show')` and `.invoke('trigger')`\n\n[Check out our example recipe where we use `cy.invoke('show')` and `cy.invoke('trigger')` to click an element that is only visible on hover](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n",
      "section": "api",
      "anchors": [
        "function"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 195
    },
    {
      "id": "api/commands/invoke#properties-that-are-functions-are-invoked",
      "doc_id": "api/commands/invoke",
      "heading": "Properties that are functions are invoked",
      "heading_level": 4,
      "content_markdown": "#### Properties that are functions are invoked\n\nIn the example below, we use `.invoke()` to force a hidden div to be `'display: block'` so we can interact with its children elements.\n\n```\ncy.get('div.container')  .should('be.hidden') // element is hidden  .invoke('show') // call jquery method 'show' on the '.container'  .should('be.visible') // element is visible now  .find('input') // drill down into a child \"input\" element  .type('Cypress is great') // and type text\n```\n",
      "section": "api",
      "anchors": [
        "properties-that-are-functions-are-invoked"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 93
    },
    {
      "id": "api/commands/invoke#function-with-arguments",
      "doc_id": "api/commands/invoke",
      "heading": "Function with Arguments",
      "heading_level": 3,
      "content_markdown": "### Function with Arguments\n\n#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {  return a + b + c}cy.wrap({ sum: fn })  .invoke('sum', 2, 4, 6)  .should('be.gt', 10) // true  .and('be.lt', 20) // true\n```\n\n#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n\n#### Arguments are automatically forwarded to the function\n\n```\ncy.get('img').invoke('attr', 'src').should('include', 'myLogo')\n```\n",
      "section": "api",
      "anchors": [
        "function-with-arguments"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 115
    },
    {
      "id": "api/commands/invoke#send-specific-arguments-to-the-function",
      "doc_id": "api/commands/invoke",
      "heading": "Send specific arguments to the function",
      "heading_level": 4,
      "content_markdown": "#### Send specific arguments to the function\n\n```\nconst fn = (a, b, c) => {  return a + b + c}cy.wrap({ sum: fn })  .invoke('sum', 2, 4, 6)  .should('be.gt', 10) // true  .and('be.lt', 20) // true\n```\n",
      "section": "api",
      "anchors": [
        "send-specific-arguments-to-the-function"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/invoke#use-cy-invoke-removeattr-target-to-get-around-new-tab",
      "doc_id": "api/commands/invoke",
      "heading": "Use cy.invoke('removeAttr', 'target') to get around new tab",
      "heading_level": 4,
      "content_markdown": "#### Use `cy.invoke('removeAttr', 'target')` to get around new tab\n\n[Check out our example recipe where we use `cy.invoke('removeAttr', 'target')` to test clicking on a link without opening in a new tab](/llm/markdown/app/references/recipes.md#Testing-the-DOM)\n",
      "section": "api",
      "anchors": [
        "use-cy-invoke-removeattr-target-to-get-around-new-tab"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 41
    },
    {
      "id": "api/commands/invoke#arrays",
      "doc_id": "api/commands/invoke",
      "heading": "Arrays",
      "heading_level": 3,
      "content_markdown": "### Arrays\n\nIn the above examples, the subject was an object, but `cy.invoke` also works on arrays and allows using numerical index to pick a function to run.\n\n```\nconst reverse = (s) => Cypress._.reverse(s)const double = (n) => n * n// picks function with index 1 and calls it with argument 4cy.wrap([reverse, double]).invoke(1, 4).should('eq', 16)\n```\n",
      "section": "api",
      "anchors": [
        "arrays"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/invoke#jquery-method",
      "doc_id": "api/commands/invoke",
      "heading": "jQuery method",
      "heading_level": 3,
      "content_markdown": "### jQuery method\n\nIf the parent command yields a jQuery element, we can invoke a jQuery method, like `attr`, `text`, or `val`. To confirm the element's `id` attribute for example:\n\n```\n<div id=\"code-snippet\">The code example</div>\n```\n\n```\ncy.contains('The code example')  .invoke('attr', 'id')  .should('equal', 'code-snippet')\n```\n\n**Tip:** Cypress has a built-in Chai-jQuery assertion to confirm the attribute. The above example can be written simply as:\n\n```\ncy.contains('The code example').should('have.attr', 'id', 'code-snippet')\n```\n",
      "section": "api",
      "anchors": [
        "jquery-method"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 95
    },
    {
      "id": "api/commands/invoke#notes",
      "doc_id": "api/commands/invoke",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Third Party Plugins\n\n#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .then((dropDownList) => {    // yields the return of $input.getKendoDropDownList()    return dropDownList.select('apples')  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .invoke('select', 'apples')  .invoke('val')  .should('match', /apples/)\n```\n\n### Retries\n\n`.invoke()` automatically retries invoking the specified method until the returned value satisfies the attached assertions. The example below passes after 1 second.\n\n```\nlet message = 'hello'const english = {  greeting() {    return message  },}setTimeout(() => {  message = 'bye'}, 1000)// initially the english.greeting() returns \"hello\" failing the assertion.// .invoke('greeting') tries again and again until after 1 second// the returned message becomes \"bye\" and the assertion passescy.wrap(english).invoke('greeting').should('equal', 'bye')\n```\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 191
    },
    {
      "id": "api/commands/invoke#third-party-plugins",
      "doc_id": "api/commands/invoke",
      "heading": "Third Party Plugins",
      "heading_level": 3,
      "content_markdown": "### Third Party Plugins\n\n#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .then((dropDownList) => {    // yields the return of $input.getKendoDropDownList()    return dropDownList.select('apples')  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .invoke('select', 'apples')  .invoke('val')  .should('match', /apples/)\n```\n",
      "section": "api",
      "anchors": [
        "third-party-plugins"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 93
    },
    {
      "id": "api/commands/invoke#using-a-kendo-dropdown",
      "doc_id": "api/commands/invoke",
      "heading": "Using a Kendo DropDown",
      "heading_level": 4,
      "content_markdown": "#### Using a Kendo DropDown\n\nIf you are using `jQuery` then the `jQuery` wrapped elements will automatically have your 3rd party plugins available to be called.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .then((dropDownList) => {    // yields the return of $input.getKendoDropDownList()    return dropDownList.select('apples')  })\n```\n\nWe can rewrite the previous example in a more terse way and add an assertion.\n\n```\ncy.get('input')  .invoke('getKendoDropDownList')  .invoke('select', 'apples')  .invoke('val')  .should('match', /apples/)\n```\n",
      "section": "api",
      "anchors": [
        "using-a-kendo-dropdown"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 88
    },
    {
      "id": "api/commands/invoke#retries",
      "doc_id": "api/commands/invoke",
      "heading": "Retries",
      "heading_level": 3,
      "content_markdown": "### Retries\n\n`.invoke()` automatically retries invoking the specified method until the returned value satisfies the attached assertions. The example below passes after 1 second.\n\n```\nlet message = 'hello'const english = {  greeting() {    return message  },}setTimeout(() => {  message = 'bye'}, 1000)// initially the english.greeting() returns \"hello\" failing the assertion.// .invoke('greeting') tries again and again until after 1 second// the returned message becomes \"bye\" and the assertion passescy.wrap(english).invoke('greeting').should('equal', 'bye')\n```\n",
      "section": "api",
      "anchors": [
        "retries"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 95
    },
    {
      "id": "api/commands/invoke#rules",
      "doc_id": "api/commands/invoke",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements [Learn about chaining commands](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Chains-of-Commands)\n\n*   `.invoke()` requires being chained off a previous command.\n\n### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `.invoke()` will wait for the `function` to exist on the subject before running.\n*   `.invoke()` will throw an error if the invoked `function` returns a promise. If you want to invoke a function that returns a promise, use [`.then()`](/llm/markdown/api/commands/then.md) instead.\n*   `.invoke()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.invoke()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 121
    },
    {
      "id": "api/commands/invoke#assertions-learn-about-assertions",
      "doc_id": "api/commands/invoke",
      "heading": "Assertions Learn about assertions",
      "heading_level": 3,
      "content_markdown": "### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `.invoke()` will wait for the `function` to exist on the subject before running.\n*   `.invoke()` will throw an error if the invoked `function` returns a promise. If you want to invoke a function that returns a promise, use [`.then()`](/llm/markdown/api/commands/then.md) instead.\n*   `.invoke()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n",
      "section": "api",
      "anchors": [
        "assertions-learn-about-assertions"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/invoke#command-log",
      "doc_id": "api/commands/invoke",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Invoke jQuery show method on element_**\n\n```\ncy.get('.connectors-div')  .should('be.hidden')  .invoke('show')  .should('be.visible')\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `invoke` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/invoke#history",
      "doc_id": "api/commands/invoke",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [12.0.0](/llm/markdown/app/references/changelog.md#12-0-0) | `.invoke()` no longer supports promises or async functions |\n| [3.8.0](/llm/markdown/app/references/changelog.md#3-8-0) | Added support for `options` argument |\n| [3.7.0](/llm/markdown/app/references/changelog.md#3-7-0) | Added support for arguments of type Number for `functionName` |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/invoke.json",
      "token_estimate": 61
    }
  ]
}