{
  "doc": {
    "id": "api/commands/and",
    "title": "and | Cypress Documentation",
    "description": "Create an assertion. Assertions are automatically retried as part of the previous command until they pass or time out.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/and.md",
    "version": "3cf5b86b3403f604bdf7f3e35025c3bc3865e02c",
    "updated_at": "2026-05-07T17:44:31.931Z",
    "headings": [
      {
        "id": "api/commands/and#and",
        "text": "and",
        "level": 1
      },
      {
        "id": "api/commands/and#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/and#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/and#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/and#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/and#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/and#chainers",
        "text": "Chainers",
        "level": 3
      },
      {
        "id": "api/commands/and#chain-assertions-on-the-same-subject",
        "text": "Chain assertions on the same subject",
        "level": 4
      },
      {
        "id": "api/commands/and#value",
        "text": "Value",
        "level": 3
      },
      {
        "id": "api/commands/and#chain-assertions-when-yield-changes",
        "text": "Chain assertions when yield changes",
        "level": 4
      },
      {
        "id": "api/commands/and#method-and-value",
        "text": "Method and Value",
        "level": 3
      },
      {
        "id": "api/commands/and#assert-the-href-is-equal-to-users",
        "text": "Assert the href is equal to '/users'",
        "level": 4
      },
      {
        "id": "api/commands/and#function",
        "text": "Function",
        "level": 3
      },
      {
        "id": "api/commands/and#verify-length-content-and-classes-from-multiple-p",
        "text": "Verify length, content, and classes from multiple <p>",
        "level": 4
      },
      {
        "id": "api/commands/and#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/and#chai",
        "text": "Chai",
        "level": 3
      },
      {
        "id": "api/commands/and#similarities-to-chai",
        "text": "Similarities to Chai",
        "level": 4
      },
      {
        "id": "api/commands/and#subjects",
        "text": "Subjects",
        "level": 3
      },
      {
        "id": "api/commands/and#how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same",
        "text": "How do I know which assertions change the subject and which keep it the same?",
        "level": 4
      },
      {
        "id": "api/commands/and#using-a-callback-function-will-not-change-what-is-yielded",
        "text": "Using a callback function will not change what is yielded",
        "level": 4
      },
      {
        "id": "api/commands/and#differences",
        "text": "Differences",
        "level": 3
      },
      {
        "id": "api/commands/and#whats-the-difference-between-then-and-should-and",
        "text": "What's the difference between .then() and .should()/.and()?",
        "level": 3
      },
      {
        "id": "api/commands/and#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/and#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/and#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/and#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/and#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/and#syntax",
      "doc_id": "api/commands/and",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.and(chainers).and(chainers, value).and(chainers, method, value).and(callbackFn)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('.err').should('be.empty').and('be.hidden') // Assert '.err' is empty & hiddency.contains('Login').and('be.visible') // Assert el is visiblecy.wrap({ foo: 'bar' })  .should('have.property', 'foo') // Assert 'foo' property exists  .and('eq', 'bar') // Assert 'foo' property is 'bar'\n```\n\n**Incorrect Usage**\n\n```\ncy.and('eq', '42') // Can not be chained off 'cy'cy.get('button').click().and('be.focused') // Should not be chained off// action commands that may update the DOM\n```\n\n### Arguments\n\n**chainers _(String)_**\n\nAny valid chainer that comes from [Chai](/llm/markdown/app/references/assertions.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/assertions.md#Chai-jQuery) or [Sinon-Chai](/llm/markdown/app/references/assertions.md#Sinon-Chai).\n\n**value _(String)_**\n\nValue to assert against chainer.\n\n**method _(String)_**\n\nA method to be called on the chainer.\n\n**callbackFn _(Function)_**\n\nPass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   In most cases, `.and()` yields the same subject it was given.\n*   `.and()` is an assertion, and it is _safe_ to chain further commands that use the subject.\n\n```\ncy.get('nav') // yields <nav>  .should('be.visible') // yields <nav>  .and('have.class', 'open') // yields <nav>\n```\n\nHowever, some chainers change the subject. In the example below, `.and()` yields the string `sans-serif` because the chainer `have.css, 'font-family'` changes the subject.\n\n```\ncy.get('nav') // yields <nav>  .should('be.visible') // yields <nav>  .and('have.css', 'font-family') // yields 'sans-serif'  .and('match', /serif/) // yields 'sans-serif'\n```\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 295
    },
    {
      "id": "api/commands/and#usage",
      "doc_id": "api/commands/and",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('.err').should('be.empty').and('be.hidden') // Assert '.err' is empty & hiddency.contains('Login').and('be.visible') // Assert el is visiblecy.wrap({ foo: 'bar' })  .should('have.property', 'foo') // Assert 'foo' property exists  .and('eq', 'bar') // Assert 'foo' property is 'bar'\n```\n\n**Incorrect Usage**\n\n```\ncy.and('eq', '42') // Can not be chained off 'cy'cy.get('button').click().and('be.focused') // Should not be chained off// action commands that may update the DOM\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 84
    },
    {
      "id": "api/commands/and#arguments",
      "doc_id": "api/commands/and",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**chainers _(String)_**\n\nAny valid chainer that comes from [Chai](/llm/markdown/app/references/assertions.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/assertions.md#Chai-jQuery) or [Sinon-Chai](/llm/markdown/app/references/assertions.md#Sinon-Chai).\n\n**value _(String)_**\n\nValue to assert against chainer.\n\n**method _(String)_**\n\nA method to be called on the chainer.\n\n**callbackFn _(Function)_**\n\nPass a function that can have any number of explicit assertions within it. Whatever was passed to the function is what is yielded.\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/and#yields-learn-about-subject-management",
      "doc_id": "api/commands/and",
      "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*   In most cases, `.and()` yields the same subject it was given.\n*   `.and()` is an assertion, and it is _safe_ to chain further commands that use the subject.\n\n```\ncy.get('nav') // yields <nav>  .should('be.visible') // yields <nav>  .and('have.class', 'open') // yields <nav>\n```\n\nHowever, some chainers change the subject. In the example below, `.and()` yields the string `sans-serif` because the chainer `have.css, 'font-family'` changes the subject.\n\n```\ncy.get('nav') // yields <nav>  .should('be.visible') // yields <nav>  .and('have.css', 'font-family') // yields 'sans-serif'  .and('match', /serif/) // yields 'sans-serif'\n```\n",
      "section": "api",
      "anchors": [
        "yields-learn-about-subject-management"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 124
    },
    {
      "id": "api/commands/and#examples",
      "doc_id": "api/commands/and",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Chainers\n\n#### Chain assertions on the same subject\n\n```\ncy.get('button').should('have.class', 'active').and('not.be.disabled')\n```\n\n### Value\n\n#### Chain assertions when yield changes\n\n```\n{/* App Code */}<ul>  <li>    <a href=\"users/123/edit\">Edit User</a>  </li></ul>\n```\n\n```\ncy.get('a')  .should('contain', 'Edit User') // yields <a>  .and('have.attr', 'href') // yields string value of href  .and('match', /users/) // yields string value of href  .and('not.include', '#') // yields string value of href\n```\n\n### Method and Value\n\n#### Assert the href is equal to '/users'\n\n```\ncy.get('#header a')  .should('have.class', 'active')  .and('have.attr', 'href', '/users')\n```\n\n### Function\n\n#### Verify length, content, and classes from multiple `<p>`\n\nPassing a function to `.and()` enables you to assert on the yielded subject. This gives you the opportunity to _massage_ what you'd like to assert.\n\nBe sure _not_ to include any code that has side effects in your callback function.\n\nThe callback function will be retried over and over again until no assertions within it throw.\n\n```\n<div>  <p class=\"text-primary\">Hello World</p>  <p class=\"text-danger\">You have an error</p>  <p class=\"text-default\">Try again later</p></div>\n```\n\n```\ncy.get('p')  .should('not.be.empty')  .and(($p) => {    // should have found 3 elements    expect($p).to.have.length(3)    // make sure the first contains some text content    expect($p.first()).to.contain('Hello World')    // use jquery's map to grab all of their classes    // jquery's map returns a new jquery object    const classes = $p.map((i, el) => {      return Cypress.$(el).attr('class')    })    // call classes.get() to make this a plain array    expect(classes.get()).to.deep.eq([      'text-primary',      'text-danger',      'text-default',    ])  })\n```\n\nUsing a callback function [will not change the subject](#Subjects)\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 329
    },
    {
      "id": "api/commands/and#value",
      "doc_id": "api/commands/and",
      "heading": "Value",
      "heading_level": 3,
      "content_markdown": "### Value\n\n#### Chain assertions when yield changes\n\n```\n{/* App Code */}<ul>  <li>    <a href=\"users/123/edit\">Edit User</a>  </li></ul>\n```\n\n```\ncy.get('a')  .should('contain', 'Edit User') // yields <a>  .and('have.attr', 'href') // yields string value of href  .and('match', /users/) // yields string value of href  .and('not.include', '#') // yields string value of href\n```\n",
      "section": "api",
      "anchors": [
        "value"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 69
    },
    {
      "id": "api/commands/and#chain-assertions-when-yield-changes",
      "doc_id": "api/commands/and",
      "heading": "Chain assertions when yield changes",
      "heading_level": 4,
      "content_markdown": "#### Chain assertions when yield changes\n\n```\n{/* App Code */}<ul>  <li>    <a href=\"users/123/edit\">Edit User</a>  </li></ul>\n```\n\n```\ncy.get('a')  .should('contain', 'Edit User') // yields <a>  .and('have.attr', 'href') // yields string value of href  .and('match', /users/) // yields string value of href  .and('not.include', '#') // yields string value of href\n```\n",
      "section": "api",
      "anchors": [
        "chain-assertions-when-yield-changes"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 67
    },
    {
      "id": "api/commands/and#function",
      "doc_id": "api/commands/and",
      "heading": "Function",
      "heading_level": 3,
      "content_markdown": "### Function\n\n#### Verify length, content, and classes from multiple `<p>`\n\nPassing a function to `.and()` enables you to assert on the yielded subject. This gives you the opportunity to _massage_ what you'd like to assert.\n\nBe sure _not_ to include any code that has side effects in your callback function.\n\nThe callback function will be retried over and over again until no assertions within it throw.\n\n```\n<div>  <p class=\"text-primary\">Hello World</p>  <p class=\"text-danger\">You have an error</p>  <p class=\"text-default\">Try again later</p></div>\n```\n\n```\ncy.get('p')  .should('not.be.empty')  .and(($p) => {    // should have found 3 elements    expect($p).to.have.length(3)    // make sure the first contains some text content    expect($p.first()).to.contain('Hello World')    // use jquery's map to grab all of their classes    // jquery's map returns a new jquery object    const classes = $p.map((i, el) => {      return Cypress.$(el).attr('class')    })    // call classes.get() to make this a plain array    expect(classes.get()).to.deep.eq([      'text-primary',      'text-danger',      'text-default',    ])  })\n```\n\nUsing a callback function [will not change the subject](#Subjects)\n",
      "section": "api",
      "anchors": [
        "function"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 212
    },
    {
      "id": "api/commands/and#verify-length-content-and-classes-from-multiple-p",
      "doc_id": "api/commands/and",
      "heading": "Verify length, content, and classes from multiple <p>",
      "heading_level": 4,
      "content_markdown": "#### Verify length, content, and classes from multiple `<p>`\n\nPassing a function to `.and()` enables you to assert on the yielded subject. This gives you the opportunity to _massage_ what you'd like to assert.\n\nBe sure _not_ to include any code that has side effects in your callback function.\n\nThe callback function will be retried over and over again until no assertions within it throw.\n\n```\n<div>  <p class=\"text-primary\">Hello World</p>  <p class=\"text-danger\">You have an error</p>  <p class=\"text-default\">Try again later</p></div>\n```\n\n```\ncy.get('p')  .should('not.be.empty')  .and(($p) => {    // should have found 3 elements    expect($p).to.have.length(3)    // make sure the first contains some text content    expect($p.first()).to.contain('Hello World')    // use jquery's map to grab all of their classes    // jquery's map returns a new jquery object    const classes = $p.map((i, el) => {      return Cypress.$(el).attr('class')    })    // call classes.get() to make this a plain array    expect(classes.get()).to.deep.eq([      'text-primary',      'text-danger',      'text-default',    ])  })\n```\n\nUsing a callback function [will not change the subject](#Subjects)\n",
      "section": "api",
      "anchors": [
        "verify-length-content-and-classes-from-multiple-p"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 209
    },
    {
      "id": "api/commands/and#notes",
      "doc_id": "api/commands/and",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Chai\n\n#### Similarities to Chai\n\nIf you've worked in [Chai](http://chaijs.com/) before, you will recognize that `.and()` matches the same fluent assertion syntax.\n\nTake this _explicit_ assertion for example:\n\n```\nexpect({ foo: 'bar' }).to.have.property('foo').and.eq('bar')\n```\n\n`.and()` reproduces this same assertion behavior.\n\n### Subjects\n\n#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n\n#### Using a callback function will not change what is yielded\n\nWhenever you use a callback function, its return value is always ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')  .should('be.active')  .and(($button) => {    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })    return { foo: 'bar' } // return is ignored, .and() yields <button>  })  .then(($button) => {    // do anything we want with <button>  })\n```\n\n### Differences\n\n### What's the difference between `.then()` and `.should()`/`.and()`?\n\nUsing `.then()` allows you to use the yielded subject in a callback function and should be used when you need to manipulate some values or do some actions.\n\nWhen using a callback function with `.should()` or `.and()`, on the other hand, there is special logic to rerun the callback function until no assertions throw within it. You should be careful of side affects in a `.should()` or `.and()` callback function that you would not want performed multiple times.\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 328
    },
    {
      "id": "api/commands/and#chai",
      "doc_id": "api/commands/and",
      "heading": "Chai",
      "heading_level": 3,
      "content_markdown": "### Chai\n\n#### Similarities to Chai\n\nIf you've worked in [Chai](http://chaijs.com/) before, you will recognize that `.and()` matches the same fluent assertion syntax.\n\nTake this _explicit_ assertion for example:\n\n```\nexpect({ foo: 'bar' }).to.have.property('foo').and.eq('bar')\n```\n\n`.and()` reproduces this same assertion behavior.\n",
      "section": "api",
      "anchors": [
        "chai"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 55
    },
    {
      "id": "api/commands/and#similarities-to-chai",
      "doc_id": "api/commands/and",
      "heading": "Similarities to Chai",
      "heading_level": 4,
      "content_markdown": "#### Similarities to Chai\n\nIf you've worked in [Chai](http://chaijs.com/) before, you will recognize that `.and()` matches the same fluent assertion syntax.\n\nTake this _explicit_ assertion for example:\n\n```\nexpect({ foo: 'bar' }).to.have.property('foo').and.eq('bar')\n```\n\n`.and()` reproduces this same assertion behavior.\n",
      "section": "api",
      "anchors": [
        "similarities-to-chai"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 52
    },
    {
      "id": "api/commands/and#subjects",
      "doc_id": "api/commands/and",
      "heading": "Subjects",
      "heading_level": 3,
      "content_markdown": "### Subjects\n\n#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n\n#### Using a callback function will not change what is yielded\n\nWhenever you use a callback function, its return value is always ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')  .should('be.active')  .and(($button) => {    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })    return { foo: 'bar' } // return is ignored, .and() yields <button>  })  .then(($button) => {    // do anything we want with <button>  })\n```\n",
      "section": "api",
      "anchors": [
        "subjects"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 153
    },
    {
      "id": "api/commands/and#how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same",
      "doc_id": "api/commands/and",
      "heading": "How do I know which assertions change the subject and which keep it the same?",
      "heading_level": 4,
      "content_markdown": "#### How do I know which assertions change the subject and which keep it the same?\n\nThe chainers that come from [Chai](/llm/markdown/app/references/bundled-libraries.md#Chai) or [Chai-jQuery](/llm/markdown/app/references/bundled-libraries.md#Chai-jQuery) will always document what they return.\n",
      "section": "api",
      "anchors": [
        "how-do-i-know-which-assertions-change-the-subject-and-which-keep-it-the-same"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/and#using-a-callback-function-will-not-change-what-is-yielded",
      "doc_id": "api/commands/and",
      "heading": "Using a callback function will not change what is yielded",
      "heading_level": 4,
      "content_markdown": "#### Using a callback function will not change what is yielded\n\nWhenever you use a callback function, its return value is always ignored. Cypress always forces the command to yield the value from the previous cy command's yield (which in the example below is `<button>`)\n\n```\ncy.get('button')  .should('be.active')  .and(($button) => {    expect({ foo: 'bar' }).to.deep.eq({ foo: 'bar' })    return { foo: 'bar' } // return is ignored, .and() yields <button>  })  .then(($button) => {    // do anything we want with <button>  })\n```\n",
      "section": "api",
      "anchors": [
        "using-a-callback-function-will-not-change-what-is-yielded"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 111
    },
    {
      "id": "api/commands/and#whats-the-difference-between-then-and-should-and",
      "doc_id": "api/commands/and",
      "heading": "What's the difference between .then() and .should()/.and()?",
      "heading_level": 3,
      "content_markdown": "### What's the difference between `.then()` and `.should()`/`.and()`?\n\nUsing `.then()` allows you to use the yielded subject in a callback function and should be used when you need to manipulate some values or do some actions.\n\nWhen using a callback function with `.should()` or `.and()`, on the other hand, there is special logic to rerun the callback function until no assertions throw within it. You should be careful of side affects in a `.should()` or `.and()` callback function that you would not want performed multiple times.\n",
      "section": "api",
      "anchors": [
        "whats-the-difference-between-then-and-should-and"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 115
    },
    {
      "id": "api/commands/and#rules",
      "doc_id": "api/commands/and",
      "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*   `.and()` requires being chained off a previous command.\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.and()` will continue to [retry](/llm/markdown/app/core-concepts/retry-ability.md) its specified assertions until it times out.\n\n```\n// timeout here will be passed down to the '.and()'// and it will retry for up to 10 secscy.get('input', { timeout: 10000 })  .should('have.value', '10')  .and('have.class', 'error')\n```\n\n```\n// timeout here will be passed down to the '.and()'// unless an assertion throws earlier,// ALL of the assertions will retry for up to 10 secscy.get('input', { timeout: 10000 })  .should('have.value', 'US')  .and(($input) => {    expect($input).to.not.be('disabled')    expect($input).to.not.have.class('error')  })\n```\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 139
    },
    {
      "id": "api/commands/and#timeouts-learn-about-timeouts",
      "doc_id": "api/commands/and",
      "heading": "Timeouts Learn about timeouts",
      "heading_level": 3,
      "content_markdown": "### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.and()` will continue to [retry](/llm/markdown/app/core-concepts/retry-ability.md) its specified assertions until it times out.\n\n```\n// timeout here will be passed down to the '.and()'// and it will retry for up to 10 secscy.get('input', { timeout: 10000 })  .should('have.value', '10')  .and('have.class', 'error')\n```\n\n```\n// timeout here will be passed down to the '.and()'// unless an assertion throws earlier,// ALL of the assertions will retry for up to 10 secscy.get('input', { timeout: 10000 })  .should('have.value', 'US')  .and(($input) => {    expect($input).to.not.be('disabled')    expect($input).to.not.have.class('error')  })\n```\n",
      "section": "api",
      "anchors": [
        "timeouts-learn-about-timeouts"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 116
    },
    {
      "id": "api/commands/and#command-log",
      "doc_id": "api/commands/and",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**Chain assertions on the same subject**\n\n```\ncy.get('.list')  .find('input[type=\"checkbox\"]')  .should('be.checked')  .and('not.be.disabled')\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `assert` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/and.json",
      "token_estimate": 51
    }
  ]
}