> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Interaction options, written as tests

> Short procedures that each vary one option for clicking, typing, dragging, uploading, working in iframes, swiping, waiting, or checking links, in every supported format.

Each example on this page varies one setting in a short procedure, shown as prose, detected tests, inline tests, and a standalone spec. For what each tab holds, see [Navigation and interaction](/reference/docs-as-tests/navigation-interaction).

Detected variants carry a `step` statement for the varied step when default detection can't produce it. They also carry a `goTo` statement, so they still open the page with detection off.

## `click` permutations

Each example clicks a button that counts its clicks by button, then checks the count. See [`click`](/docs/actions/click).

### `click: "Count clicks"`

**Varies:** `click` · **Value:** `"Count clicks"` · **Effect:** the step left-clicks the element whose text, selector, or accessible name matches the string.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Click a button by its text

. Go to http://localhost:8092/find-click.html[the click counter page].
. Click *Count clicks*.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button by its text</title></head>
<body>
<h1>Click a button by its text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Click a button by its text
==========================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Click **Count clicks**.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-string">
  <title>Click a button by its text</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-string","detectSteps":true} -->

# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-string","detectSteps":true} */}

# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Click a button by its text

// (test {"testId":"nav-click-string","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
. Click *Count clicks*.
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button by its text</title></head>
<body>
<!-- test {"testId":"nav-click-string","detectSteps":true} -->
<h1>Click a button by its text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Click a button by its text
==========================

.. test {"testId":"nav-click-string","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Click **Count clicks**.
#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-string">
  <title>Click a button by its text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-string","detectSteps":false} -->

# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Click **Count clicks**.
   <!-- step {"click":"Count clicks"} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-string","detectSteps":false} */}

# Click a button by its text

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Click **Count clicks**.
   {/* step {"click":"Count clicks"} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Click a button by its text

// (test {"testId":"nav-click-string","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Click *Count clicks*.
+
// (step {"click":"Count clicks"})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button by its text</title></head>
<body>
<!-- test {"testId":"nav-click-string","detectSteps":false} -->
<h1>Click a button by its text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Click <strong>Count clicks</strong>.
    <!-- step {"click":"Count clicks"} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Click a button by its text
==========================

.. test {"testId":"nav-click-string","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Click **Count clicks**.

   .. step {"click":"Count clicks"}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-string">
  <title>Click a button by its text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":"Count clicks"}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": "Count clicks"
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-left": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-string
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click: Count clicks
      - find:
          selector: "#counter"
          elementAttribute:
            data-left: "1"
```

### `click: { elementText }`

**Varies:** `click` · **Value:** `{ "elementText": "Count clicks" }` · **Effect:** the step left-clicks the element that matches every locator field in the object.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Click **Count clicks**.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Click a button described by an object

. Go to http://localhost:8092/find-click.html[the click counter page].
. Click *Count clicks*.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button described by an object</title></head>
<body>
<h1>Click a button described by an object</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Click a button described by an object
=====================================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Click **Count clicks**.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-object">
  <title>Click a button described by an object</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-object","detectSteps":true} -->

# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Click **Count clicks**.
   <!-- step {"click":{"elementText":"Count clicks"}} -->
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-object","detectSteps":true} */}

# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Click **Count clicks**.
   {/* step {"click":{"elementText":"Count clicks"}} */}
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Click a button described by an object

// (test {"testId":"nav-click-object","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Click *Count clicks*.
+
// (step {"click":{"elementText":"Count clicks"}})
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button described by an object</title></head>
<body>
<!-- test {"testId":"nav-click-object","detectSteps":true} -->
<h1>Click a button described by an object</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Click <strong>Count clicks</strong>.
    <!-- step {"click":{"elementText":"Count clicks"}} --></li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Click a button described by an object
=====================================

.. test {"testId":"nav-click-object","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Click **Count clicks**.

   .. step {"click":{"elementText":"Count clicks"}}

#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-object">
  <title>Click a button described by an object</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-object","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Count clicks"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-object","detectSteps":false} -->

# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Click **Count clicks**.
   <!-- step {"click":{"elementText":"Count clicks"}} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-object","detectSteps":false} */}

# Click a button described by an object

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Click **Count clicks**.
   {/* step {"click":{"elementText":"Count clicks"}} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Click a button described by an object

// (test {"testId":"nav-click-object","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Click *Count clicks*.
+
// (step {"click":{"elementText":"Count clicks"}})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Click a button described by an object</title></head>
<body>
<!-- test {"testId":"nav-click-object","detectSteps":false} -->
<h1>Click a button described by an object</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Click <strong>Count clicks</strong>.
    <!-- step {"click":{"elementText":"Count clicks"}} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Click a button described by an object
=====================================

.. test {"testId":"nav-click-object","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Click **Count clicks**.

   .. step {"click":{"elementText":"Count clicks"}}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-object">
  <title>Click a button described by an object</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-object","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Count clicks"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-object",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": {
            "elementText": "Count clicks"
          }
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-left": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-object
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click:
          elementText: Count clicks
      - find:
          selector: "#counter"
          elementAttribute:
            data-left: "1"
```

### `button: "left"`

**Varies:** `click.button` · **Value:** `"left"` · **Effect:** the step clicks with the primary button, the same as leaving `button` out.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Left-click **Count clicks**.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Left-click **Count clicks**.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Left-click a button

. Go to http://localhost:8092/find-click.html[the click counter page].
. Left-click *Count clicks*.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Left-click a button</title></head>
<body>
<h1>Left-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Left-click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Left-click a button
===================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Left-click **Count clicks**.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-left">
  <title>Left-click a button</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Left-click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-button-left","detectSteps":true} -->

# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Left-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"left"}} -->
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-button-left","detectSteps":true} */}

# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Left-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"left"}} */}
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Left-click a button

// (test {"testId":"nav-click-button-left","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Left-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"left"}})
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Left-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-left","detectSteps":true} -->
<h1>Left-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Left-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"left"}} --></li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Left-click a button
===================

.. test {"testId":"nav-click-button-left","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Left-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"left"}}

#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-left">
  <title>Left-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-left","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Left-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"left"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-button-left","detectSteps":false} -->

# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Left-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"left"}} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-button-left","detectSteps":false} */}

# Left-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Left-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"left"}} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Left-click a button

// (test {"testId":"nav-click-button-left","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Left-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"left"}})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Left-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-left","detectSteps":false} -->
<h1>Left-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Left-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"left"}} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Left-click a button
===================

.. test {"testId":"nav-click-button-left","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Left-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"left"}}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-left">
  <title>Left-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-left","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Left-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"left"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-button-left",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": {
            "selector": "#counter",
            "button": "left"
          }
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-left": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-button-left
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click:
          selector: "#counter"
          button: left
      - find:
          selector: "#counter"
          elementAttribute:
            data-left: "1"
```

### `button: "right"`

**Varies:** `click.button` · **Value:** `"right"` · **Effect:** the step right-clicks the element.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Right-click **Count clicks**.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Right-click **Count clicks**.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Right-click a button

. Go to http://localhost:8092/find-click.html[the click counter page].
. Right-click *Count clicks*.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Right-click a button</title></head>
<body>
<h1>Right-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Right-click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Right-click a button
====================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Right-click **Count clicks**.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-right">
  <title>Right-click a button</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Right-click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-button-right","detectSteps":true} -->

# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Right-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"right"}} -->
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-button-right","detectSteps":true} */}

# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Right-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"right"}} */}
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Right-click a button

// (test {"testId":"nav-click-button-right","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Right-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"right"}})
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Right-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-right","detectSteps":true} -->
<h1>Right-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Right-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"right"}} --></li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Right-click a button
====================

.. test {"testId":"nav-click-button-right","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Right-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"right"}}

#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-right">
  <title>Right-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-right","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Right-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"right"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-button-right","detectSteps":false} -->

# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Right-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"right"}} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-button-right","detectSteps":false} */}

# Right-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Right-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"right"}} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Right-click a button

// (test {"testId":"nav-click-button-right","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Right-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"right"}})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Right-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-right","detectSteps":false} -->
<h1>Right-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Right-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"right"}} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Right-click a button
====================

.. test {"testId":"nav-click-button-right","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Right-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"right"}}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-right">
  <title>Right-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-right","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Right-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"right"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-right":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-button-right",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": {
            "selector": "#counter",
            "button": "right"
          }
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-right": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-button-right
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click:
          selector: "#counter"
          button: right
      - find:
          selector: "#counter"
          elementAttribute:
            data-right: "1"
```

### `button: "middle"`

**Varies:** `click.button` · **Value:** `"middle"` · **Effect:** the step middle-clicks the element.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Middle-click **Count clicks**.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Middle-click **Count clicks**.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Middle-click a button

. Go to http://localhost:8092/find-click.html[the click counter page].
. Middle-click *Count clicks*.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Middle-click a button</title></head>
<body>
<h1>Middle-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Middle-click <strong>Count clicks</strong>.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Middle-click a button
=====================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Middle-click **Count clicks**.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-middle">
  <title>Middle-click a button</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Middle-click <b>Count clicks</b>.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-button-middle","detectSteps":true} -->

# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Middle-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"middle"}} -->
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-button-middle","detectSteps":true} */}

# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Middle-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"middle"}} */}
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Middle-click a button

// (test {"testId":"nav-click-button-middle","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Middle-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"middle"}})
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Middle-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-middle","detectSteps":true} -->
<h1>Middle-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Middle-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"middle"}} --></li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Middle-click a button
=====================

.. test {"testId":"nav-click-button-middle","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Middle-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"middle"}}

#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-middle">
  <title>Middle-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-middle","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Middle-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"middle"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-button-middle","detectSteps":false} -->

# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Middle-click **Count clicks**.
   <!-- step {"click":{"selector":"#counter","button":"middle"}} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-button-middle","detectSteps":false} */}

# Middle-click a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Middle-click **Count clicks**.
   {/* step {"click":{"selector":"#counter","button":"middle"}} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Middle-click a button

// (test {"testId":"nav-click-button-middle","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Middle-click *Count clicks*.
+
// (step {"click":{"selector":"#counter","button":"middle"}})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Middle-click a button</title></head>
<body>
<!-- test {"testId":"nav-click-button-middle","detectSteps":false} -->
<h1>Middle-click a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Middle-click <strong>Count clicks</strong>.
    <!-- step {"click":{"selector":"#counter","button":"middle"}} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Middle-click a button
=====================

.. test {"testId":"nav-click-button-middle","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Middle-click **Count clicks**.

   .. step {"click":{"selector":"#counter","button":"middle"}}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-button-middle">
  <title>Middle-click a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-button-middle","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Middle-click <b>Count clicks</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","button":"middle"}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-middle":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-button-middle",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": {
            "selector": "#counter",
            "button": "middle"
          }
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-middle": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-button-middle
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click:
          selector: "#counter"
          button: middle
      - find:
          selector: "#counter"
          elementAttribute:
            data-middle: "1"
```

### `duration: 1000`

**Varies:** `click.duration` · **Value:** `1000` · **Effect:** the step holds the press for one second before it releases the button.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Press and hold **Count clicks** for one second.
3. Check that the button counted the click.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
2. Press and hold **Count clicks** for one second.
3. Check that the button counted the click.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Press and hold a button

. Go to http://localhost:8092/find-click.html[the click counter page].
. Press and hold *Count clicks* for one second.
. Check that the button counted the click.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press and hold a button</title></head>
<body>
<h1>Press and hold a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.</li>
  <li>Press and hold <strong>Count clicks</strong> for one second.</li>
  <li>Check that the button counted the click.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Press and hold a button
=======================

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.
#. Press and hold **Count clicks** for one second.
#. Check that the button counted the click.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-duration">
  <title>Press and hold a button</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd></step>
      <step><cmd>Press and hold <b>Count clicks</b> for one second.</cmd></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-click-duration","detectSteps":true} -->

# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Press and hold **Count clicks** for one second.
   <!-- step {"click":{"selector":"#counter","duration":1000}} -->
3. Check that the button counted the click.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-click-duration","detectSteps":true} */}

# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Press and hold **Count clicks** for one second.
   {/* step {"click":{"selector":"#counter","duration":1000}} */}
3. Check that the button counted the click.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Press and hold a button

// (test {"testId":"nav-click-duration","detectSteps":true})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Press and hold *Count clicks* for one second.
+
// (step {"click":{"selector":"#counter","duration":1000}})
. Check that the button counted the click.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press and hold a button</title></head>
<body>
<!-- test {"testId":"nav-click-duration","detectSteps":true} -->
<h1>Press and hold a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Press and hold <strong>Count clicks</strong> for one second.
    <!-- step {"click":{"selector":"#counter","duration":1000}} --></li>
  <li>Check that the button counted the click.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Press and hold a button
=======================

.. test {"testId":"nav-click-duration","detectSteps":true}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Press and hold **Count clicks** for one second.

   .. step {"click":{"selector":"#counter","duration":1000}}

#. Check that the button counted the click.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-duration">
  <title>Press and hold a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-duration","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Press and hold <b>Count clicks</b> for one second.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","duration":1000}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-click-duration","detectSteps":false} -->

# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   <!-- step {"goTo":"http://localhost:8092/find-click.html"} -->
2. Press and hold **Count clicks** for one second.
   <!-- step {"click":{"selector":"#counter","duration":1000}} -->
3. Check that the button counted the click.
   <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-click-duration","detectSteps":false} */}

# Press and hold a button

1. Go to [the click counter page](http://localhost:8092/find-click.html).
   {/* step {"goTo":"http://localhost:8092/find-click.html"} */}
2. Press and hold **Count clicks** for one second.
   {/* step {"click":{"selector":"#counter","duration":1000}} */}
3. Check that the button counted the click.
   {/* step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Press and hold a button

// (test {"testId":"nav-click-duration","detectSteps":false})

. Go to http://localhost:8092/find-click.html[the click counter page].
+
// (step {"goTo":"http://localhost:8092/find-click.html"})
. Press and hold *Count clicks* for one second.
+
// (step {"click":{"selector":"#counter","duration":1000}})
. Check that the button counted the click.
+
// (step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Press and hold a button</title></head>
<body>
<!-- test {"testId":"nav-click-duration","detectSteps":false} -->
<h1>Press and hold a button</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/find-click.html">the click counter page</a>.
    <!-- step {"goTo":"http://localhost:8092/find-click.html"} --></li>
  <li>Press and hold <strong>Count clicks</strong> for one second.
    <!-- step {"click":{"selector":"#counter","duration":1000}} --></li>
  <li>Check that the button counted the click.
    <!-- step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Press and hold a button
=======================

.. test {"testId":"nav-click-duration","detectSteps":false}

#. Go to `the click counter page <http://localhost:8092/find-click.html>`_.

   .. step {"goTo":"http://localhost:8092/find-click.html"}

#. Press and hold **Count clicks** for one second.

   .. step {"click":{"selector":"#counter","duration":1000}}

#. Check that the button counted the click.

   .. step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-click-duration">
  <title>Press and hold a button</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-click-duration","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/find-click.html" scope="external" format="html">the click counter page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-click.html"}'/></info></step>
      <step><cmd>Press and hold <b>Count clicks</b> for one second.</cmd>
        <info><data name="doc-detective" value='step {"click":{"selector":"#counter","duration":1000}}'/></info></step>
      <step><cmd>Check that the button counted the click.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#counter","elementAttribute":{"data-left":"1"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-click-duration",
      "steps": [
        {
          "goTo": "http://localhost:8092/find-click.html"
        },
        {
          "click": {
            "selector": "#counter",
            "duration": 1000
          }
        },
        {
          "find": {
            "selector": "#counter",
            "elementAttribute": {
              "data-left": "1"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-click-duration
    steps:
      - goTo: http://localhost:8092/find-click.html
      - click:
          selector: "#counter"
          duration: 1000
      - find:
          selector: "#counter"
          elementAttribute:
            data-left: "1"
```

## `type` permutations

Each example types into a field that echoes its value below it. See [`type`](/docs/actions/type).

### `type: "Hello"`

**Varies:** `type` · **Value:** `"Hello"` · **Effect:** the step types the text into the element that has focus.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello".
4. Check that the page shows **Hello** below the field.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello".
4. Check that the page shows **Hello** below the field.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Type text

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Click *Type here:*.
. Type "Hello".
. Check that the page shows *Hello* below the field.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text</title></head>
<body>
<h1>Type text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type "Hello".</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Type text
=========

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Click **Type here:**.
#. Type "Hello".
#. Check that the page shows **Hello** below the field.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-string">
  <title>Type text</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type "Hello".</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-type-string","detectSteps":true} -->

# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello".
4. Check that the page shows **Hello** below the field.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-type-string","detectSteps":true} */}

# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type "Hello".
4. Check that the page shows **Hello** below the field.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Type text

// (test {"testId":"nav-type-string","detectSteps":true})

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Click *Type here:*.
. Type "Hello".
. Check that the page shows *Hello* below the field.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text</title></head>
<body>
<!-- test {"testId":"nav-type-string","detectSteps":true} -->
<h1>Type text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type "Hello".</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Type text
=========

.. test {"testId":"nav-type-string","detectSteps":true}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Click **Type here:**.
#. Type "Hello".
#. Check that the page shows **Hello** below the field.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-string">
  <title>Type text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type "Hello".</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-type-string","detectSteps":false} -->

# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Click **Type here:**.
   <!-- step {"click":"Type here:"} -->
3. Type "Hello".
   <!-- step {"type":"Hello"} -->
4. Check that the page shows **Hello** below the field.
   <!-- step {"find":"Hello"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-type-string","detectSteps":false} */}

# Type text

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Click **Type here:**.
   {/* step {"click":"Type here:"} */}
3. Type "Hello".
   {/* step {"type":"Hello"} */}
4. Check that the page shows **Hello** below the field.
   {/* step {"find":"Hello"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Type text

// (test {"testId":"nav-type-string","detectSteps":false})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Click *Type here:*.
+
// (step {"click":"Type here:"})
. Type "Hello".
+
// (step {"type":"Hello"})
. Check that the page shows *Hello* below the field.
+
// (step {"find":"Hello"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text</title></head>
<body>
<!-- test {"testId":"nav-type-string","detectSteps":false} -->
<h1>Type text</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Click <strong>Type here:</strong>.
    <!-- step {"click":"Type here:"} --></li>
  <li>Type "Hello".
    <!-- step {"type":"Hello"} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.
    <!-- step {"find":"Hello"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Type text
=========

.. test {"testId":"nav-type-string","detectSteps":false}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Click **Type here:**.

   .. step {"click":"Type here:"}

#. Type "Hello".

   .. step {"type":"Hello"}

#. Check that the page shows **Hello** below the field.

   .. step {"find":"Hello"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-string">
  <title>Type text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Click <b>Type here:</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":"Type here:"}'/></info></step>
      <step><cmd>Type "Hello".</cmd>
        <info><data name="doc-detective" value='step {"type":"Hello"}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd>
        <info><data name="doc-detective" value='step {"find":"Hello"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-type-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "click": "Type here:"
        },
        {
          "type": "Hello"
        },
        {
          "find": "Hello"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-type-string
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - click: "Type here:"
      - type: Hello
      - find: Hello
```

### `type: ["Hello", "$ENTER$"]`

**Varies:** `type` · **Value:** `["Hello", "$ENTER$"]` · **Effect:** the step types each entry in order, and `$ENTER$` presses the Enter key.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type `Hello` and press Enter.
4. Check that the page shows **Hello** below the field.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type `Hello` and press Enter.
4. Check that the page shows **Hello** below the field.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Type text and press Enter

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Click *Type here:*.
. Type `Hello` and press Enter.
. Check that the page shows *Hello* below the field.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text and press Enter</title></head>
<body>
<h1>Type text and press Enter</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type <code>Hello</code> and press Enter.</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Type text and press Enter
=========================

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Click **Type here:**.
#. Type ``Hello`` and press Enter.
#. Check that the page shows **Hello** below the field.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-array-enter">
  <title>Type text and press Enter</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph> and press Enter.</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-type-array-enter","detectSteps":true} -->

# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Click **Type here:**.
3. Type `Hello` and press Enter.
   <!-- step {"type":["Hello","$ENTER$"]} -->
4. Check that the page shows **Hello** below the field.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-type-array-enter","detectSteps":true} */}

# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Click **Type here:**.
3. Type `Hello` and press Enter.
   {/* step {"type":["Hello","$ENTER$"]} */}
4. Check that the page shows **Hello** below the field.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Type text and press Enter

// (test {"testId":"nav-type-array-enter","detectSteps":true})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Click *Type here:*.
. Type `Hello` and press Enter.
+
// (step {"type":["Hello","$ENTER$"]})
. Check that the page shows *Hello* below the field.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text and press Enter</title></head>
<body>
<!-- test {"testId":"nav-type-array-enter","detectSteps":true} -->
<h1>Type text and press Enter</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type <code>Hello</code> and press Enter.
    <!-- step {"type":["Hello","$ENTER$"]} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Type text and press Enter
=========================

.. test {"testId":"nav-type-array-enter","detectSteps":true}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Click **Type here:**.
#. Type ``Hello`` and press Enter.

   .. step {"type":["Hello","$ENTER$"]}

#. Check that the page shows **Hello** below the field.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-array-enter">
  <title>Type text and press Enter</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-array-enter","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph> and press Enter.</cmd>
        <info><data name="doc-detective" value='step {"type":["Hello","$ENTER$"]}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-type-array-enter","detectSteps":false} -->

# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Click **Type here:**.
   <!-- step {"click":"Type here:"} -->
3. Type `Hello` and press Enter.
   <!-- step {"type":["Hello","$ENTER$"]} -->
4. Check that the page shows **Hello** below the field.
   <!-- step {"find":"Hello"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-type-array-enter","detectSteps":false} */}

# Type text and press Enter

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Click **Type here:**.
   {/* step {"click":"Type here:"} */}
3. Type `Hello` and press Enter.
   {/* step {"type":["Hello","$ENTER$"]} */}
4. Check that the page shows **Hello** below the field.
   {/* step {"find":"Hello"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Type text and press Enter

// (test {"testId":"nav-type-array-enter","detectSteps":false})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Click *Type here:*.
+
// (step {"click":"Type here:"})
. Type `Hello` and press Enter.
+
// (step {"type":["Hello","$ENTER$"]})
. Check that the page shows *Hello* below the field.
+
// (step {"find":"Hello"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type text and press Enter</title></head>
<body>
<!-- test {"testId":"nav-type-array-enter","detectSteps":false} -->
<h1>Type text and press Enter</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Click <strong>Type here:</strong>.
    <!-- step {"click":"Type here:"} --></li>
  <li>Type <code>Hello</code> and press Enter.
    <!-- step {"type":["Hello","$ENTER$"]} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.
    <!-- step {"find":"Hello"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Type text and press Enter
=========================

.. test {"testId":"nav-type-array-enter","detectSteps":false}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Click **Type here:**.

   .. step {"click":"Type here:"}

#. Type ``Hello`` and press Enter.

   .. step {"type":["Hello","$ENTER$"]}

#. Check that the page shows **Hello** below the field.

   .. step {"find":"Hello"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-array-enter">
  <title>Type text and press Enter</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-array-enter","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Click <b>Type here:</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":"Type here:"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph> and press Enter.</cmd>
        <info><data name="doc-detective" value='step {"type":["Hello","$ENTER$"]}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd>
        <info><data name="doc-detective" value='step {"find":"Hello"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-type-array-enter",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "click": "Type here:"
        },
        {
          "type": [
            "Hello",
            "$ENTER$"
          ]
        },
        {
          "find": "Hello"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-type-array-enter
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - click: "Type here:"
      - type:
          - Hello
          - $ENTER$
      - find: Hello
```

### `inputDelay: 200`

**Varies:** `type.inputDelay` · **Value:** `200` · **Effect:** the step waits 200 milliseconds between keys in a recording.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type `Hello`, one key at a time.
4. Check that the page shows **Hello** below the field.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Click **Type here:**.
3. Type `Hello`, one key at a time.
4. Check that the page shows **Hello** below the field.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Type slowly

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Click *Type here:*.
. Type `Hello`, one key at a time.
. Check that the page shows *Hello* below the field.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type slowly</title></head>
<body>
<h1>Type slowly</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type <code>Hello</code>, one key at a time.</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Type slowly
===========

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Click **Type here:**.
#. Type ``Hello``, one key at a time.
#. Check that the page shows **Hello** below the field.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-inputdelay">
  <title>Type slowly</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph>, one key at a time.</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-type-inputdelay","detectSteps":true} -->

# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Click **Type here:**.
3. Type `Hello`, one key at a time.
   <!-- step {"type":{"keys":"Hello","inputDelay":200}} -->
4. Check that the page shows **Hello** below the field.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-type-inputdelay","detectSteps":true} */}

# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Click **Type here:**.
3. Type `Hello`, one key at a time.
   {/* step {"type":{"keys":"Hello","inputDelay":200}} */}
4. Check that the page shows **Hello** below the field.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Type slowly

// (test {"testId":"nav-type-inputdelay","detectSteps":true})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Click *Type here:*.
. Type `Hello`, one key at a time.
+
// (step {"type":{"keys":"Hello","inputDelay":200}})
. Check that the page shows *Hello* below the field.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type slowly</title></head>
<body>
<!-- test {"testId":"nav-type-inputdelay","detectSteps":true} -->
<h1>Type slowly</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Click <strong>Type here:</strong>.</li>
  <li>Type <code>Hello</code>, one key at a time.
    <!-- step {"type":{"keys":"Hello","inputDelay":200}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Type slowly
===========

.. test {"testId":"nav-type-inputdelay","detectSteps":true}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Click **Type here:**.
#. Type ``Hello``, one key at a time.

   .. step {"type":{"keys":"Hello","inputDelay":200}}

#. Check that the page shows **Hello** below the field.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-inputdelay">
  <title>Type slowly</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-inputdelay","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Click <b>Type here:</b>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph>, one key at a time.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Hello","inputDelay":200}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-type-inputdelay","detectSteps":false} -->

# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Click **Type here:**.
   <!-- step {"click":"Type here:"} -->
3. Type `Hello`, one key at a time.
   <!-- step {"type":{"keys":"Hello","inputDelay":200}} -->
4. Check that the page shows **Hello** below the field.
   <!-- step {"find":"Hello"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-type-inputdelay","detectSteps":false} */}

# Type slowly

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Click **Type here:**.
   {/* step {"click":"Type here:"} */}
3. Type `Hello`, one key at a time.
   {/* step {"type":{"keys":"Hello","inputDelay":200}} */}
4. Check that the page shows **Hello** below the field.
   {/* step {"find":"Hello"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Type slowly

// (test {"testId":"nav-type-inputdelay","detectSteps":false})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Click *Type here:*.
+
// (step {"click":"Type here:"})
. Type `Hello`, one key at a time.
+
// (step {"type":{"keys":"Hello","inputDelay":200}})
. Check that the page shows *Hello* below the field.
+
// (step {"find":"Hello"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type slowly</title></head>
<body>
<!-- test {"testId":"nav-type-inputdelay","detectSteps":false} -->
<h1>Type slowly</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Click <strong>Type here:</strong>.
    <!-- step {"click":"Type here:"} --></li>
  <li>Type <code>Hello</code>, one key at a time.
    <!-- step {"type":{"keys":"Hello","inputDelay":200}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.
    <!-- step {"find":"Hello"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Type slowly
===========

.. test {"testId":"nav-type-inputdelay","detectSteps":false}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Click **Type here:**.

   .. step {"click":"Type here:"}

#. Type ``Hello``, one key at a time.

   .. step {"type":{"keys":"Hello","inputDelay":200}}

#. Check that the page shows **Hello** below the field.

   .. step {"find":"Hello"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-inputdelay">
  <title>Type slowly</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-inputdelay","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Click <b>Type here:</b>.</cmd>
        <info><data name="doc-detective" value='step {"click":"Type here:"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph>, one key at a time.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Hello","inputDelay":200}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd>
        <info><data name="doc-detective" value='step {"find":"Hello"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-type-inputdelay",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "click": "Type here:"
        },
        {
          "type": {
            "keys": "Hello",
            "inputDelay": 200
          }
        },
        {
          "find": "Hello"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-type-inputdelay
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - click: "Type here:"
      - type:
          keys: Hello
          inputDelay: 200
      - find: Hello
```

### `selector`

**Varies:** `type.selector` · **Value:** `"#type-input"` · **Effect:** the step finds the field by its selector and types into it, with no click first.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Type `Hello` into the **Type here:** field.
3. Check that the page shows **Hello** below the field.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Type `Hello` into the **Type here:** field.
3. Check that the page shows **Hello** below the field.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Type into a field by its selector

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Type `Hello` into the *Type here:* field.
. Check that the page shows *Hello* below the field.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its selector</title></head>
<body>
<h1>Type into a field by its selector</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Type into a field by its selector
=================================

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Type ``Hello`` into the **Type here:** field.
#. Check that the page shows **Hello** below the field.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-selector">
  <title>Type into a field by its selector</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-type-selector","detectSteps":true} -->

# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Type `Hello` into the **Type here:** field.
   <!-- step {"type":{"keys":"Hello","selector":"#type-input"}} -->
3. Check that the page shows **Hello** below the field.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-type-selector","detectSteps":true} */}

# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Type `Hello` into the **Type here:** field.
   {/* step {"type":{"keys":"Hello","selector":"#type-input"}} */}
3. Check that the page shows **Hello** below the field.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Type into a field by its selector

// (test {"testId":"nav-type-selector","detectSteps":true})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Type `Hello` into the *Type here:* field.
+
// (step {"type":{"keys":"Hello","selector":"#type-input"}})
. Check that the page shows *Hello* below the field.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its selector</title></head>
<body>
<!-- test {"testId":"nav-type-selector","detectSteps":true} -->
<h1>Type into a field by its selector</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.
    <!-- step {"type":{"keys":"Hello","selector":"#type-input"}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Type into a field by its selector
=================================

.. test {"testId":"nav-type-selector","detectSteps":true}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Type ``Hello`` into the **Type here:** field.

   .. step {"type":{"keys":"Hello","selector":"#type-input"}}

#. Check that the page shows **Hello** below the field.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-selector">
  <title>Type into a field by its selector</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-selector","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Hello","selector":"#type-input"}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-type-selector","detectSteps":false} -->

# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Type `Hello` into the **Type here:** field.
   <!-- step {"type":{"keys":"Hello","selector":"#type-input"}} -->
3. Check that the page shows **Hello** below the field.
   <!-- step {"find":"Hello"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-type-selector","detectSteps":false} */}

# Type into a field by its selector

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Type `Hello` into the **Type here:** field.
   {/* step {"type":{"keys":"Hello","selector":"#type-input"}} */}
3. Check that the page shows **Hello** below the field.
   {/* step {"find":"Hello"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Type into a field by its selector

// (test {"testId":"nav-type-selector","detectSteps":false})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Type `Hello` into the *Type here:* field.
+
// (step {"type":{"keys":"Hello","selector":"#type-input"}})
. Check that the page shows *Hello* below the field.
+
// (step {"find":"Hello"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its selector</title></head>
<body>
<!-- test {"testId":"nav-type-selector","detectSteps":false} -->
<h1>Type into a field by its selector</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.
    <!-- step {"type":{"keys":"Hello","selector":"#type-input"}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.
    <!-- step {"find":"Hello"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Type into a field by its selector
=================================

.. test {"testId":"nav-type-selector","detectSteps":false}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Type ``Hello`` into the **Type here:** field.

   .. step {"type":{"keys":"Hello","selector":"#type-input"}}

#. Check that the page shows **Hello** below the field.

   .. step {"find":"Hello"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-selector">
  <title>Type into a field by its selector</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-selector","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Hello","selector":"#type-input"}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd>
        <info><data name="doc-detective" value='step {"find":"Hello"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-type-selector",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "type": {
            "keys": "Hello",
            "selector": "#type-input"
          }
        },
        {
          "find": "Hello"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-type-selector
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - type:
          keys: Hello
          selector: "#type-input"
      - find: Hello
```

### `elementId`

**Varies:** `type.elementId` · **Value:** `"type-input"` · **Effect:** the step finds the field by its `id` and types into it.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Type `Hello` into the **Type here:** field.
3. Check that the page shows **Hello** below the field.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
2. Type `Hello` into the **Type here:** field.
3. Check that the page shows **Hello** below the field.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Type into a field by its ID

. Go to http://localhost:8092/type-echo.html[the type echo page].
. Type `Hello` into the *Type here:* field.
. Check that the page shows *Hello* below the field.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its ID</title></head>
<body>
<h1>Type into a field by its ID</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.</li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Type into a field by its ID
===========================

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.
#. Type ``Hello`` into the **Type here:** field.
#. Check that the page shows **Hello** below the field.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-elementid">
  <title>Type into a field by its ID</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-type-elementid","detectSteps":true} -->

# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Type `Hello` into the **Type here:** field.
   <!-- step {"type":{"keys":["Hello"],"elementId":"type-input"}} -->
3. Check that the page shows **Hello** below the field.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-type-elementid","detectSteps":true} */}

# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Type `Hello` into the **Type here:** field.
   {/* step {"type":{"keys":["Hello"],"elementId":"type-input"}} */}
3. Check that the page shows **Hello** below the field.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Type into a field by its ID

// (test {"testId":"nav-type-elementid","detectSteps":true})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Type `Hello` into the *Type here:* field.
+
// (step {"type":{"keys":["Hello"],"elementId":"type-input"}})
. Check that the page shows *Hello* below the field.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its ID</title></head>
<body>
<!-- test {"testId":"nav-type-elementid","detectSteps":true} -->
<h1>Type into a field by its ID</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.
    <!-- step {"type":{"keys":["Hello"],"elementId":"type-input"}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Type into a field by its ID
===========================

.. test {"testId":"nav-type-elementid","detectSteps":true}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Type ``Hello`` into the **Type here:** field.

   .. step {"type":{"keys":["Hello"],"elementId":"type-input"}}

#. Check that the page shows **Hello** below the field.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-elementid">
  <title>Type into a field by its ID</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-elementid","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":["Hello"],"elementId":"type-input"}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-type-elementid","detectSteps":false} -->

# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   <!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->
2. Type `Hello` into the **Type here:** field.
   <!-- step {"type":{"keys":["Hello"],"elementId":"type-input"}} -->
3. Check that the page shows **Hello** below the field.
   <!-- step {"find":"Hello"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-type-elementid","detectSteps":false} */}

# Type into a field by its ID

1. Go to [the type echo page](http://localhost:8092/type-echo.html).
   {/* step {"goTo":"http://localhost:8092/type-echo.html"} */}
2. Type `Hello` into the **Type here:** field.
   {/* step {"type":{"keys":["Hello"],"elementId":"type-input"}} */}
3. Check that the page shows **Hello** below the field.
   {/* step {"find":"Hello"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Type into a field by its ID

// (test {"testId":"nav-type-elementid","detectSteps":false})

. Go to http://localhost:8092/type-echo.html[the type echo page].
+
// (step {"goTo":"http://localhost:8092/type-echo.html"})
. Type `Hello` into the *Type here:* field.
+
// (step {"type":{"keys":["Hello"],"elementId":"type-input"}})
. Check that the page shows *Hello* below the field.
+
// (step {"find":"Hello"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Type into a field by its ID</title></head>
<body>
<!-- test {"testId":"nav-type-elementid","detectSteps":false} -->
<h1>Type into a field by its ID</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.
    <!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li>
  <li>Type <code>Hello</code> into the <strong>Type here:</strong> field.
    <!-- step {"type":{"keys":["Hello"],"elementId":"type-input"}} --></li>
  <li>Check that the page shows <strong>Hello</strong> below the field.
    <!-- step {"find":"Hello"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Type into a field by its ID
===========================

.. test {"testId":"nav-type-elementid","detectSteps":false}

#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.

   .. step {"goTo":"http://localhost:8092/type-echo.html"}

#. Type ``Hello`` into the **Type here:** field.

   .. step {"type":{"keys":["Hello"],"elementId":"type-input"}}

#. Check that the page shows **Hello** below the field.

   .. step {"find":"Hello"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-type-elementid">
  <title>Type into a field by its ID</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-type-elementid","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step>
      <step><cmd>Type <codeph>Hello</codeph> into the <b>Type here:</b> field.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":["Hello"],"elementId":"type-input"}}'/></info></step>
      <step><cmd>Check that the page shows <b>Hello</b> below the field.</cmd>
        <info><data name="doc-detective" value='step {"find":"Hello"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-type-elementid",
      "steps": [
        {
          "goTo": "http://localhost:8092/type-echo.html"
        },
        {
          "type": {
            "keys": [
              "Hello"
            ],
            "elementId": "type-input"
          }
        },
        {
          "find": "Hello"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-type-elementid
    steps:
      - goTo: http://localhost:8092/type-echo.html
      - type:
          keys:
            - Hello
          elementId: type-input
      - find: Hello
```

## `dragAndDrop` permutations

Each example drags a widget onto a drop zone. See [`dragAndDrop`](/docs/actions/draganddrop).

### `source: "Table"`

**Varies:** `dragAndDrop.source, dragAndDrop.target` · **Value:** `source "Table", target a selector string` · **Effect:** the step finds each element by its text or selector, the same way the `click` string form does.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
2. Drag **Table** onto **Drop Zone 1**.
3. Check that **Table (dropped)** appears in the drop zone.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
2. Drag **Table** onto **Drop Zone 1**.
3. Check that **Table (dropped)** appears in the drop zone.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Drag by text and selector strings

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
. Drag *Table* onto *Drop Zone 1*.
. Check that *Table (dropped)* appears in the drop zone.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by text and selector strings</title></head>
<body>
<h1>Drag by text and selector strings</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.</li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.</li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Drag by text and selector strings
=================================

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.
#. Drag **Table** onto **Drop Zone 1**.
#. Check that **Table (dropped)** appears in the drop zone.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-strings">
  <title>Drag by text and selector strings</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-draganddrop-strings","detectSteps":true} -->

# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} -->
2. Drag **Table** onto **Drop Zone 1**.
   <!-- step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} -->
3. Check that **Table (dropped)** appears in the drop zone.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-draganddrop-strings","detectSteps":true} */}

# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   {/* step {"goTo":"http://localhost:8092/drag-drop-test.html"} */}
2. Drag **Table** onto **Drop Zone 1**.
   {/* step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} */}
3. Check that **Table (dropped)** appears in the drop zone.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Drag by text and selector strings

// (test {"testId":"nav-draganddrop-strings","detectSteps":true})

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
+
// (step {"goTo":"http://localhost:8092/drag-drop-test.html"})
. Drag *Table* onto *Drop Zone 1*.
+
// (step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}})
. Check that *Table (dropped)* appears in the drop zone.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by text and selector strings</title></head>
<body>
<!-- test {"testId":"nav-draganddrop-strings","detectSteps":true} -->
<h1>Drag by text and selector strings</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.
    <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} --></li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.
    <!-- step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} --></li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Drag by text and selector strings
=================================

.. test {"testId":"nav-draganddrop-strings","detectSteps":true}

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.

   .. step {"goTo":"http://localhost:8092/drag-drop-test.html"}

#. Drag **Table** onto **Drop Zone 1**.

   .. step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}}

#. Check that **Table (dropped)** appears in the drop zone.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-strings">
  <title>Drag by text and selector strings</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-draganddrop-strings","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/drag-drop-test.html"}'/></info></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd>
        <info><data name="doc-detective" value='step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}}'/></info></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-draganddrop-strings","detectSteps":false} -->

# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} -->
2. Drag **Table** onto **Drop Zone 1**.
   <!-- step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} -->
3. Check that **Table (dropped)** appears in the drop zone.
   <!-- step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-draganddrop-strings","detectSteps":false} */}

# Drag by text and selector strings

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   {/* step {"goTo":"http://localhost:8092/drag-drop-test.html"} */}
2. Drag **Table** onto **Drop Zone 1**.
   {/* step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} */}
3. Check that **Table (dropped)** appears in the drop zone.
   {/* step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Drag by text and selector strings

// (test {"testId":"nav-draganddrop-strings","detectSteps":false})

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
+
// (step {"goTo":"http://localhost:8092/drag-drop-test.html"})
. Drag *Table* onto *Drop Zone 1*.
+
// (step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}})
. Check that *Table (dropped)* appears in the drop zone.
+
// (step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by text and selector strings</title></head>
<body>
<!-- test {"testId":"nav-draganddrop-strings","detectSteps":false} -->
<h1>Drag by text and selector strings</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.
    <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} --></li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.
    <!-- step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}} --></li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.
    <!-- step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Drag by text and selector strings
=================================

.. test {"testId":"nav-draganddrop-strings","detectSteps":false}

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.

   .. step {"goTo":"http://localhost:8092/drag-drop-test.html"}

#. Drag **Table** onto **Drop Zone 1**.

   .. step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}}

#. Check that **Table (dropped)** appears in the drop zone.

   .. step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-strings">
  <title>Drag by text and selector strings</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-draganddrop-strings","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/drag-drop-test.html"}'/></info></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd>
        <info><data name="doc-detective" value='step {"dragAndDrop":{"source":"Table","target":".drop-zone[data-drop=\"zone1\"]"}}'/></info></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-draganddrop-strings",
      "steps": [
        {
          "goTo": "http://localhost:8092/drag-drop-test.html"
        },
        {
          "dragAndDrop": {
            "source": "Table",
            "target": ".drop-zone[data-drop=\"zone1\"]"
          }
        },
        {
          "find": {
            "selector": ".drop-zone .dropped-item",
            "elementText": "Table (dropped)"
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-draganddrop-strings
    steps:
      - goTo: http://localhost:8092/drag-drop-test.html
      - dragAndDrop:
          source: Table
          target: .drop-zone[data-drop="zone1"]
      - find:
          selector: .drop-zone .dropped-item
          elementText: Table (dropped)
```

### `source: { selector, elementText }`

**Varies:** `dragAndDrop.source, dragAndDrop.target` · **Value:** `objects with selector and elementText` · **Effect:** the step finds each element by every locator field in its object.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
2. Drag **Table** onto **Drop Zone 1**.
3. Check that **Table (dropped)** appears in the drop zone.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
2. Drag **Table** onto **Drop Zone 1**.
3. Check that **Table (dropped)** appears in the drop zone.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Drag by element objects

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
. Drag *Table* onto *Drop Zone 1*.
. Check that *Table (dropped)* appears in the drop zone.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by element objects</title></head>
<body>
<h1>Drag by element objects</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.</li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.</li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Drag by element objects
=======================

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.
#. Drag **Table** onto **Drop Zone 1**.
#. Check that **Table (dropped)** appears in the drop zone.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-objects">
  <title>Drag by element objects</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-draganddrop-objects","detectSteps":true} -->

# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} -->
2. Drag **Table** onto **Drop Zone 1**.
   <!-- step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} -->
3. Check that **Table (dropped)** appears in the drop zone.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-draganddrop-objects","detectSteps":true} */}

# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   {/* step {"goTo":"http://localhost:8092/drag-drop-test.html"} */}
2. Drag **Table** onto **Drop Zone 1**.
   {/* step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} */}
3. Check that **Table (dropped)** appears in the drop zone.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Drag by element objects

// (test {"testId":"nav-draganddrop-objects","detectSteps":true})

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
+
// (step {"goTo":"http://localhost:8092/drag-drop-test.html"})
. Drag *Table* onto *Drop Zone 1*.
+
// (step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}})
. Check that *Table (dropped)* appears in the drop zone.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by element objects</title></head>
<body>
<!-- test {"testId":"nav-draganddrop-objects","detectSteps":true} -->
<h1>Drag by element objects</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.
    <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} --></li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.
    <!-- step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} --></li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Drag by element objects
=======================

.. test {"testId":"nav-draganddrop-objects","detectSteps":true}

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.

   .. step {"goTo":"http://localhost:8092/drag-drop-test.html"}

#. Drag **Table** onto **Drop Zone 1**.

   .. step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}}

#. Check that **Table (dropped)** appears in the drop zone.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-objects">
  <title>Drag by element objects</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-draganddrop-objects","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/drag-drop-test.html"}'/></info></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd>
        <info><data name="doc-detective" value='step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}}'/></info></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-draganddrop-objects","detectSteps":false} -->

# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} -->
2. Drag **Table** onto **Drop Zone 1**.
   <!-- step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} -->
3. Check that **Table (dropped)** appears in the drop zone.
   <!-- step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-draganddrop-objects","detectSteps":false} */}

# Drag by element objects

1. Go to [the drag and drop page](http://localhost:8092/drag-drop-test.html).
   {/* step {"goTo":"http://localhost:8092/drag-drop-test.html"} */}
2. Drag **Table** onto **Drop Zone 1**.
   {/* step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} */}
3. Check that **Table (dropped)** appears in the drop zone.
   {/* step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Drag by element objects

// (test {"testId":"nav-draganddrop-objects","detectSteps":false})

. Go to http://localhost:8092/drag-drop-test.html[the drag and drop page].
+
// (step {"goTo":"http://localhost:8092/drag-drop-test.html"})
. Drag *Table* onto *Drop Zone 1*.
+
// (step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}})
. Check that *Table (dropped)* appears in the drop zone.
+
// (step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Drag by element objects</title></head>
<body>
<!-- test {"testId":"nav-draganddrop-objects","detectSteps":false} -->
<h1>Drag by element objects</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/drag-drop-test.html">the drag and drop page</a>.
    <!-- step {"goTo":"http://localhost:8092/drag-drop-test.html"} --></li>
  <li>Drag <strong>Table</strong> onto <strong>Drop Zone 1</strong>.
    <!-- step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}} --></li>
  <li>Check that <strong>Table (dropped)</strong> appears in the drop zone.
    <!-- step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Drag by element objects
=======================

.. test {"testId":"nav-draganddrop-objects","detectSteps":false}

#. Go to `the drag and drop page <http://localhost:8092/drag-drop-test.html>`_.

   .. step {"goTo":"http://localhost:8092/drag-drop-test.html"}

#. Drag **Table** onto **Drop Zone 1**.

   .. step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}}

#. Check that **Table (dropped)** appears in the drop zone.

   .. step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-draganddrop-objects">
  <title>Drag by element objects</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-draganddrop-objects","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/drag-drop-test.html" scope="external" format="html">the drag and drop page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/drag-drop-test.html"}'/></info></step>
      <step><cmd>Drag <b>Table</b> onto <b>Drop Zone 1</b>.</cmd>
        <info><data name="doc-detective" value='step {"dragAndDrop":{"source":{"selector":".draggable","elementText":"Table"},"target":{"selector":".drop-zone[data-drop=\"zone1\"]"}}}'/></info></step>
      <step><cmd>Check that <b>Table (dropped)</b> appears in the drop zone.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":".drop-zone .dropped-item","elementText":"Table (dropped)"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-draganddrop-objects",
      "steps": [
        {
          "goTo": "http://localhost:8092/drag-drop-test.html"
        },
        {
          "dragAndDrop": {
            "source": {
              "selector": ".draggable",
              "elementText": "Table"
            },
            "target": {
              "selector": ".drop-zone[data-drop=\"zone1\"]"
            }
          }
        },
        {
          "find": {
            "selector": ".drop-zone .dropped-item",
            "elementText": "Table (dropped)"
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-draganddrop-objects
    steps:
      - goTo: http://localhost:8092/drag-drop-test.html
      - dragAndDrop:
          source:
            selector: .draggable
            elementText: Table
          target:
            selector: .drop-zone[data-drop="zone1"]
      - find:
          selector: .drop-zone .dropped-item
          elementText: Table (dropped)
```

## `upload` permutations

Each example sets the files of a file input, then checks that the page received them. The files sit next to the example. See [`upload`](/docs/actions/upload).

### `path: "receipt.txt"`

**Varies:** `upload.path` · **Value:** `"receipt.txt"` · **Effect:** the step sets one file on the input it finds by selector.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
2. For **Choose a file**, select the receipt file.
3. Check that **Got receipt.txt** appears.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
2. For **Choose a file**, select the receipt file.
3. Check that **Got receipt.txt** appears.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Choose one file

. Go to http://localhost:8092/upload.html[the upload page].
. For *Choose a file*, select the receipt file.
. Check that *Got receipt.txt* appears.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose one file</title></head>
<body>
<h1>Choose one file</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.</li>
  <li>For <strong>Choose a file</strong>, select the receipt file.</li>
  <li>Check that <strong>Got receipt.txt</strong> appears.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Choose one file
===============

#. Go to `the upload page <http://localhost:8092/upload.html>`_.
#. For **Choose a file**, select the receipt file.
#. Check that **Got receipt.txt** appears.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-string">
  <title>Choose one file</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd></step>
      <step><cmd>For <b>Choose a file</b>, select the receipt file.</cmd></step>
      <step><cmd>Check that <b>Got receipt.txt</b> appears.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-upload-string","detectSteps":true} -->

# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
   <!-- step {"goTo":"http://localhost:8092/upload.html"} -->
2. For **Choose a file**, select the receipt file.
   <!-- step {"upload":{"selector":"#single","path":"receipt.txt"}} -->
3. Check that **Got receipt.txt** appears.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-upload-string","detectSteps":true} */}

# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
   {/* step {"goTo":"http://localhost:8092/upload.html"} */}
2. For **Choose a file**, select the receipt file.
   {/* step {"upload":{"selector":"#single","path":"receipt.txt"}} */}
3. Check that **Got receipt.txt** appears.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Choose one file

// (test {"testId":"nav-upload-string","detectSteps":true})

. Go to http://localhost:8092/upload.html[the upload page].
+
// (step {"goTo":"http://localhost:8092/upload.html"})
. For *Choose a file*, select the receipt file.
+
// (step {"upload":{"selector":"#single","path":"receipt.txt"}})
. Check that *Got receipt.txt* appears.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose one file</title></head>
<body>
<!-- test {"testId":"nav-upload-string","detectSteps":true} -->
<h1>Choose one file</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.
    <!-- step {"goTo":"http://localhost:8092/upload.html"} --></li>
  <li>For <strong>Choose a file</strong>, select the receipt file.
    <!-- step {"upload":{"selector":"#single","path":"receipt.txt"}} --></li>
  <li>Check that <strong>Got receipt.txt</strong> appears.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Choose one file
===============

.. test {"testId":"nav-upload-string","detectSteps":true}

#. Go to `the upload page <http://localhost:8092/upload.html>`_.

   .. step {"goTo":"http://localhost:8092/upload.html"}

#. For **Choose a file**, select the receipt file.

   .. step {"upload":{"selector":"#single","path":"receipt.txt"}}

#. Check that **Got receipt.txt** appears.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-string">
  <title>Choose one file</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-upload-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/upload.html"}'/></info></step>
      <step><cmd>For <b>Choose a file</b>, select the receipt file.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#single","path":"receipt.txt"}}'/></info></step>
      <step><cmd>Check that <b>Got receipt.txt</b> appears.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-upload-string","detectSteps":false} -->

# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
   <!-- step {"goTo":"http://localhost:8092/upload.html"} -->
2. For **Choose a file**, select the receipt file.
   <!-- step {"upload":{"selector":"#single","path":"receipt.txt"}} -->
3. Check that **Got receipt.txt** appears.
   <!-- step {"find":"Got receipt.txt"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-upload-string","detectSteps":false} */}

# Choose one file

1. Go to [the upload page](http://localhost:8092/upload.html).
   {/* step {"goTo":"http://localhost:8092/upload.html"} */}
2. For **Choose a file**, select the receipt file.
   {/* step {"upload":{"selector":"#single","path":"receipt.txt"}} */}
3. Check that **Got receipt.txt** appears.
   {/* step {"find":"Got receipt.txt"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Choose one file

// (test {"testId":"nav-upload-string","detectSteps":false})

. Go to http://localhost:8092/upload.html[the upload page].
+
// (step {"goTo":"http://localhost:8092/upload.html"})
. For *Choose a file*, select the receipt file.
+
// (step {"upload":{"selector":"#single","path":"receipt.txt"}})
. Check that *Got receipt.txt* appears.
+
// (step {"find":"Got receipt.txt"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose one file</title></head>
<body>
<!-- test {"testId":"nav-upload-string","detectSteps":false} -->
<h1>Choose one file</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.
    <!-- step {"goTo":"http://localhost:8092/upload.html"} --></li>
  <li>For <strong>Choose a file</strong>, select the receipt file.
    <!-- step {"upload":{"selector":"#single","path":"receipt.txt"}} --></li>
  <li>Check that <strong>Got receipt.txt</strong> appears.
    <!-- step {"find":"Got receipt.txt"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Choose one file
===============

.. test {"testId":"nav-upload-string","detectSteps":false}

#. Go to `the upload page <http://localhost:8092/upload.html>`_.

   .. step {"goTo":"http://localhost:8092/upload.html"}

#. For **Choose a file**, select the receipt file.

   .. step {"upload":{"selector":"#single","path":"receipt.txt"}}

#. Check that **Got receipt.txt** appears.

   .. step {"find":"Got receipt.txt"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-string">
  <title>Choose one file</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-upload-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/upload.html"}'/></info></step>
      <step><cmd>For <b>Choose a file</b>, select the receipt file.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#single","path":"receipt.txt"}}'/></info></step>
      <step><cmd>Check that <b>Got receipt.txt</b> appears.</cmd>
        <info><data name="doc-detective" value='step {"find":"Got receipt.txt"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-upload-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/upload.html"
        },
        {
          "upload": {
            "selector": "#single",
            "path": "receipt.txt"
          }
        },
        {
          "find": "Got receipt.txt"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-upload-string
    steps:
      - goTo: http://localhost:8092/upload.html
      - upload:
          selector: "#single"
          path: receipt.txt
      - find: Got receipt.txt
```

### `path: ["receipt.txt", "invoice.txt"]`

**Varies:** `upload.path` · **Value:** `["receipt.txt", "invoice.txt"]` · **Effect:** the step sets both files, in order, on the input that belongs to the label it finds by text.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
2. For **Choose files**, select the receipt and the invoice.
3. Check that **Got receipt.txt and invoice.txt** appears.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
2. For **Choose files**, select the receipt and the invoice.
3. Check that **Got receipt.txt and invoice.txt** appears.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Choose several files

. Go to http://localhost:8092/upload.html[the upload page].
. For *Choose files*, select the receipt and the invoice.
. Check that *Got receipt.txt and invoice.txt* appears.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose several files</title></head>
<body>
<h1>Choose several files</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.</li>
  <li>For <strong>Choose files</strong>, select the receipt and the invoice.</li>
  <li>Check that <strong>Got receipt.txt and invoice.txt</strong> appears.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Choose several files
====================

#. Go to `the upload page <http://localhost:8092/upload.html>`_.
#. For **Choose files**, select the receipt and the invoice.
#. Check that **Got receipt.txt and invoice.txt** appears.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-array">
  <title>Choose several files</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd></step>
      <step><cmd>For <b>Choose files</b>, select the receipt and the invoice.</cmd></step>
      <step><cmd>Check that <b>Got receipt.txt and invoice.txt</b> appears.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-upload-array","detectSteps":true} -->

# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
   <!-- step {"goTo":"http://localhost:8092/upload.html"} -->
2. For **Choose files**, select the receipt and the invoice.
   <!-- step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} -->
3. Check that **Got receipt.txt and invoice.txt** appears.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-upload-array","detectSteps":true} */}

# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
   {/* step {"goTo":"http://localhost:8092/upload.html"} */}
2. For **Choose files**, select the receipt and the invoice.
   {/* step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} */}
3. Check that **Got receipt.txt and invoice.txt** appears.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Choose several files

// (test {"testId":"nav-upload-array","detectSteps":true})

. Go to http://localhost:8092/upload.html[the upload page].
+
// (step {"goTo":"http://localhost:8092/upload.html"})
. For *Choose files*, select the receipt and the invoice.
+
// (step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}})
. Check that *Got receipt.txt and invoice.txt* appears.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose several files</title></head>
<body>
<!-- test {"testId":"nav-upload-array","detectSteps":true} -->
<h1>Choose several files</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.
    <!-- step {"goTo":"http://localhost:8092/upload.html"} --></li>
  <li>For <strong>Choose files</strong>, select the receipt and the invoice.
    <!-- step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} --></li>
  <li>Check that <strong>Got receipt.txt and invoice.txt</strong> appears.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Choose several files
====================

.. test {"testId":"nav-upload-array","detectSteps":true}

#. Go to `the upload page <http://localhost:8092/upload.html>`_.

   .. step {"goTo":"http://localhost:8092/upload.html"}

#. For **Choose files**, select the receipt and the invoice.

   .. step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}}

#. Check that **Got receipt.txt and invoice.txt** appears.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-array">
  <title>Choose several files</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-upload-array","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/upload.html"}'/></info></step>
      <step><cmd>For <b>Choose files</b>, select the receipt and the invoice.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}}'/></info></step>
      <step><cmd>Check that <b>Got receipt.txt and invoice.txt</b> appears.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-upload-array","detectSteps":false} -->

# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
   <!-- step {"goTo":"http://localhost:8092/upload.html"} -->
2. For **Choose files**, select the receipt and the invoice.
   <!-- step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} -->
3. Check that **Got receipt.txt and invoice.txt** appears.
   <!-- step {"find":"Got receipt.txt and invoice.txt"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-upload-array","detectSteps":false} */}

# Choose several files

1. Go to [the upload page](http://localhost:8092/upload.html).
   {/* step {"goTo":"http://localhost:8092/upload.html"} */}
2. For **Choose files**, select the receipt and the invoice.
   {/* step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} */}
3. Check that **Got receipt.txt and invoice.txt** appears.
   {/* step {"find":"Got receipt.txt and invoice.txt"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Choose several files

// (test {"testId":"nav-upload-array","detectSteps":false})

. Go to http://localhost:8092/upload.html[the upload page].
+
// (step {"goTo":"http://localhost:8092/upload.html"})
. For *Choose files*, select the receipt and the invoice.
+
// (step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}})
. Check that *Got receipt.txt and invoice.txt* appears.
+
// (step {"find":"Got receipt.txt and invoice.txt"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Choose several files</title></head>
<body>
<!-- test {"testId":"nav-upload-array","detectSteps":false} -->
<h1>Choose several files</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/upload.html">the upload page</a>.
    <!-- step {"goTo":"http://localhost:8092/upload.html"} --></li>
  <li>For <strong>Choose files</strong>, select the receipt and the invoice.
    <!-- step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}} --></li>
  <li>Check that <strong>Got receipt.txt and invoice.txt</strong> appears.
    <!-- step {"find":"Got receipt.txt and invoice.txt"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Choose several files
====================

.. test {"testId":"nav-upload-array","detectSteps":false}

#. Go to `the upload page <http://localhost:8092/upload.html>`_.

   .. step {"goTo":"http://localhost:8092/upload.html"}

#. For **Choose files**, select the receipt and the invoice.

   .. step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}}

#. Check that **Got receipt.txt and invoice.txt** appears.

   .. step {"find":"Got receipt.txt and invoice.txt"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-upload-array">
  <title>Choose several files</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-upload-array","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/upload.html" scope="external" format="html">the upload page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/upload.html"}'/></info></step>
      <step><cmd>For <b>Choose files</b>, select the receipt and the invoice.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"elementText":"Choose files","path":["receipt.txt","invoice.txt"]}}'/></info></step>
      <step><cmd>Check that <b>Got receipt.txt and invoice.txt</b> appears.</cmd>
        <info><data name="doc-detective" value='step {"find":"Got receipt.txt and invoice.txt"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-upload-array",
      "steps": [
        {
          "goTo": "http://localhost:8092/upload.html"
        },
        {
          "upload": {
            "elementText": "Choose files",
            "path": [
              "receipt.txt",
              "invoice.txt"
            ]
          }
        },
        {
          "find": "Got receipt.txt and invoice.txt"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-upload-array
    steps:
      - goTo: http://localhost:8092/upload.html
      - upload:
          elementText: Choose files
          path:
            - receipt.txt
            - invoice.txt
      - find: Got receipt.txt and invoice.txt
```

## `frame` permutations

Each example acts on elements inside an iframe. `frame` applies to one step, so each step that needs it repeats it. Detection searches only the top page, so the detected variants annotate these steps. See [Elements inside an iframe](/docs/actions/find#elements-inside-an-iframe).

### `frame: "#checkout"`

**Varies:** `find.frame, click.frame, type.frame, upload.frame` · **Value:** `"#checkout"` · **Effect:** each step finds its element inside the iframe. The last step has no `frame`, so it checks the top page.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
2. In the payment form, enter 4242 as the card number.
3. Attach your receipt.
4. Click the form's pay button.
5. Check that the form shows your payment.
6. Check that **Top page not paid** still appears below the page's own button.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
2. In the payment form, enter 4242 as the card number.
3. Attach your receipt.
4. Click the form's pay button.
5. Check that the form shows your payment.
6. Check that **Top page not paid** still appears below the page's own button.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Pay in an embedded form

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
. In the payment form, enter 4242 as the card number.
. Attach your receipt.
. Click the form's pay button.
. Check that the form shows your payment.
. Check that *Top page not paid* still appears below the page's own button.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pay in an embedded form</title></head>
<body>
<h1>Pay in an embedded form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.</li>
  <li>In the payment form, enter 4242 as the card number.</li>
  <li>Attach your receipt.</li>
  <li>Click the form's pay button.</li>
  <li>Check that the form shows your payment.</li>
  <li>Check that <strong>Top page not paid</strong> still appears below the page's own button.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Pay in an embedded form
=======================

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.
#. In the payment form, enter 4242 as the card number.
#. Attach your receipt.
#. Click the form's pay button.
#. Check that the form shows your payment.
#. Check that **Top page not paid** still appears below the page's own button.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-string">
  <title>Pay in an embedded form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd></step>
      <step><cmd>In the payment form, enter 4242 as the card number.</cmd></step>
      <step><cmd>Attach your receipt.</cmd></step>
      <step><cmd>Click the form's pay button.</cmd></step>
      <step><cmd>Check that the form shows your payment.</cmd></step>
      <step><cmd>Check that <b>Top page not paid</b> still appears below the page's own button.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-frame-string","detectSteps":true} -->

# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} -->
2. In the payment form, enter 4242 as the card number.
   <!-- step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} -->
3. Attach your receipt.
   <!-- step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} -->
4. Click the form's pay button.
   <!-- step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} -->
5. Check that the form shows your payment.
   <!-- step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} -->
6. Check that **Top page not paid** still appears below the page's own button.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-frame-string","detectSteps":true} */}

# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   {/* step {"goTo":"http://localhost:8092/iframe-parent.html"} */}
2. In the payment form, enter 4242 as the card number.
   {/* step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} */}
3. Attach your receipt.
   {/* step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} */}
4. Click the form's pay button.
   {/* step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} */}
5. Check that the form shows your payment.
   {/* step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} */}
6. Check that **Top page not paid** still appears below the page's own button.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Pay in an embedded form

// (test {"testId":"nav-frame-string","detectSteps":true})

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
+
// (step {"goTo":"http://localhost:8092/iframe-parent.html"})
. In the payment form, enter 4242 as the card number.
+
// (step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}})
. Attach your receipt.
+
// (step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}})
. Click the form's pay button.
+
// (step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}})
. Check that the form shows your payment.
+
// (step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}})
. Check that *Top page not paid* still appears below the page's own button.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pay in an embedded form</title></head>
<body>
<!-- test {"testId":"nav-frame-string","detectSteps":true} -->
<h1>Pay in an embedded form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.
    <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} --></li>
  <li>In the payment form, enter 4242 as the card number.
    <!-- step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} --></li>
  <li>Attach your receipt.
    <!-- step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} --></li>
  <li>Click the form's pay button.
    <!-- step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} --></li>
  <li>Check that the form shows your payment.
    <!-- step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} --></li>
  <li>Check that <strong>Top page not paid</strong> still appears below the page's own button.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Pay in an embedded form
=======================

.. test {"testId":"nav-frame-string","detectSteps":true}

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.

   .. step {"goTo":"http://localhost:8092/iframe-parent.html"}

#. In the payment form, enter 4242 as the card number.

   .. step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}}

#. Attach your receipt.

   .. step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}}

#. Click the form's pay button.

   .. step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}}

#. Check that the form shows your payment.

   .. step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}}

#. Check that **Top page not paid** still appears below the page's own button.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-string">
  <title>Pay in an embedded form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-frame-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/iframe-parent.html"}'/></info></step>
      <step><cmd>In the payment form, enter 4242 as the card number.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}}'/></info></step>
      <step><cmd>Attach your receipt.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}}'/></info></step>
      <step><cmd>Click the form's pay button.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}}'/></info></step>
      <step><cmd>Check that the form shows your payment.</cmd>
        <info><data name="doc-detective" value='step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}}'/></info></step>
      <step><cmd>Check that <b>Top page not paid</b> still appears below the page's own button.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-frame-string","detectSteps":false} -->

# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} -->
2. In the payment form, enter 4242 as the card number.
   <!-- step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} -->
3. Attach your receipt.
   <!-- step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} -->
4. Click the form's pay button.
   <!-- step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} -->
5. Check that the form shows your payment.
   <!-- step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} -->
6. Check that **Top page not paid** still appears below the page's own button.
   <!-- step {"find":"Top page not paid"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-frame-string","detectSteps":false} */}

# Pay in an embedded form

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   {/* step {"goTo":"http://localhost:8092/iframe-parent.html"} */}
2. In the payment form, enter 4242 as the card number.
   {/* step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} */}
3. Attach your receipt.
   {/* step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} */}
4. Click the form's pay button.
   {/* step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} */}
5. Check that the form shows your payment.
   {/* step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} */}
6. Check that **Top page not paid** still appears below the page's own button.
   {/* step {"find":"Top page not paid"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Pay in an embedded form

// (test {"testId":"nav-frame-string","detectSteps":false})

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
+
// (step {"goTo":"http://localhost:8092/iframe-parent.html"})
. In the payment form, enter 4242 as the card number.
+
// (step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}})
. Attach your receipt.
+
// (step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}})
. Click the form's pay button.
+
// (step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}})
. Check that the form shows your payment.
+
// (step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}})
. Check that *Top page not paid* still appears below the page's own button.
+
// (step {"find":"Top page not paid"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pay in an embedded form</title></head>
<body>
<!-- test {"testId":"nav-frame-string","detectSteps":false} -->
<h1>Pay in an embedded form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.
    <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} --></li>
  <li>In the payment form, enter 4242 as the card number.
    <!-- step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}} --></li>
  <li>Attach your receipt.
    <!-- step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}} --></li>
  <li>Click the form's pay button.
    <!-- step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}} --></li>
  <li>Check that the form shows your payment.
    <!-- step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}} --></li>
  <li>Check that <strong>Top page not paid</strong> still appears below the page's own button.
    <!-- step {"find":"Top page not paid"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Pay in an embedded form
=======================

.. test {"testId":"nav-frame-string","detectSteps":false}

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.

   .. step {"goTo":"http://localhost:8092/iframe-parent.html"}

#. In the payment form, enter 4242 as the card number.

   .. step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}}

#. Attach your receipt.

   .. step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}}

#. Click the form's pay button.

   .. step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}}

#. Check that the form shows your payment.

   .. step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}}

#. Check that **Top page not paid** still appears below the page's own button.

   .. step {"find":"Top page not paid"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-string">
  <title>Pay in an embedded form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-frame-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/iframe-parent.html"}'/></info></step>
      <step><cmd>In the payment form, enter 4242 as the card number.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"4242","selector":"#card","frame":"#checkout"}}'/></info></step>
      <step><cmd>Attach your receipt.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#receipt","path":"receipt.txt","frame":"#checkout"}}'/></info></step>
      <step><cmd>Click the form's pay button.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Pay in the frame","frame":"#checkout"}}'/></info></step>
      <step><cmd>Check that the form shows your payment.</cmd>
        <info><data name="doc-detective" value='step {"find":{"elementText":"Paid in the frame","frame":"#checkout"}}'/></info></step>
      <step><cmd>Check that <b>Top page not paid</b> still appears below the page's own button.</cmd>
        <info><data name="doc-detective" value='step {"find":"Top page not paid"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-frame-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/iframe-parent.html"
        },
        {
          "type": {
            "keys": "4242",
            "selector": "#card",
            "frame": "#checkout"
          }
        },
        {
          "upload": {
            "selector": "#receipt",
            "path": "receipt.txt",
            "frame": "#checkout"
          }
        },
        {
          "click": {
            "elementText": "Pay in the frame",
            "frame": "#checkout"
          }
        },
        {
          "find": {
            "elementText": "Paid in the frame",
            "frame": "#checkout"
          }
        },
        {
          "find": "Top page not paid"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-frame-string
    steps:
      - goTo: http://localhost:8092/iframe-parent.html
      - type:
          keys: "4242"
          selector: "#card"
          frame: "#checkout"
      - upload:
          selector: "#receipt"
          path: receipt.txt
          frame: "#checkout"
      - click:
          elementText: Pay in the frame
          frame: "#checkout"
      - find:
          elementText: Paid in the frame
          frame: "#checkout"
      - find: Top page not paid
```

### `frame: ["#checkout", "iframe[name=inner]"]`

**Varies:** `find.frame, click.frame, type.frame, upload.frame` · **Value:** `["#checkout", "iframe[name=inner]"]` · **Effect:** each step goes into the first iframe, then into the one inside it.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
2. In the innermost frame, enter Thanks as the note.
3. Attach your receipt as proof.
4. Click the confirm button in the innermost frame.
5. Check that the innermost frame shows the confirmation.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
2. In the innermost frame, enter Thanks as the note.
3. Attach your receipt as proof.
4. Click the confirm button in the innermost frame.
5. Check that the innermost frame shows the confirmation.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Confirm in a nested frame

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
. In the innermost frame, enter Thanks as the note.
. Attach your receipt as proof.
. Click the confirm button in the innermost frame.
. Check that the innermost frame shows the confirmation.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Confirm in a nested frame</title></head>
<body>
<h1>Confirm in a nested frame</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.</li>
  <li>In the innermost frame, enter Thanks as the note.</li>
  <li>Attach your receipt as proof.</li>
  <li>Click the confirm button in the innermost frame.</li>
  <li>Check that the innermost frame shows the confirmation.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Confirm in a nested frame
=========================

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.
#. In the innermost frame, enter Thanks as the note.
#. Attach your receipt as proof.
#. Click the confirm button in the innermost frame.
#. Check that the innermost frame shows the confirmation.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-array">
  <title>Confirm in a nested frame</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd></step>
      <step><cmd>In the innermost frame, enter Thanks as the note.</cmd></step>
      <step><cmd>Attach your receipt as proof.</cmd></step>
      <step><cmd>Click the confirm button in the innermost frame.</cmd></step>
      <step><cmd>Check that the innermost frame shows the confirmation.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-frame-array","detectSteps":true} -->

# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} -->
2. In the innermost frame, enter Thanks as the note.
   <!-- step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} -->
3. Attach your receipt as proof.
   <!-- step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} -->
4. Click the confirm button in the innermost frame.
   <!-- step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} -->
5. Check that the innermost frame shows the confirmation.
   <!-- step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-frame-array","detectSteps":true} */}

# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   {/* step {"goTo":"http://localhost:8092/iframe-parent.html"} */}
2. In the innermost frame, enter Thanks as the note.
   {/* step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} */}
3. Attach your receipt as proof.
   {/* step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} */}
4. Click the confirm button in the innermost frame.
   {/* step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} */}
5. Check that the innermost frame shows the confirmation.
   {/* step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Confirm in a nested frame

// (test {"testId":"nav-frame-array","detectSteps":true})

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
+
// (step {"goTo":"http://localhost:8092/iframe-parent.html"})
. In the innermost frame, enter Thanks as the note.
+
// (step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}})
. Attach your receipt as proof.
+
// (step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}})
. Click the confirm button in the innermost frame.
+
// (step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}})
. Check that the innermost frame shows the confirmation.
+
// (step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Confirm in a nested frame</title></head>
<body>
<!-- test {"testId":"nav-frame-array","detectSteps":true} -->
<h1>Confirm in a nested frame</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.
    <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} --></li>
  <li>In the innermost frame, enter Thanks as the note.
    <!-- step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Attach your receipt as proof.
    <!-- step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Click the confirm button in the innermost frame.
    <!-- step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Check that the innermost frame shows the confirmation.
    <!-- step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Confirm in a nested frame
=========================

.. test {"testId":"nav-frame-array","detectSteps":true}

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.

   .. step {"goTo":"http://localhost:8092/iframe-parent.html"}

#. In the innermost frame, enter Thanks as the note.

   .. step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}}

#. Attach your receipt as proof.

   .. step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}}

#. Click the confirm button in the innermost frame.

   .. step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}}

#. Check that the innermost frame shows the confirmation.

   .. step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-array">
  <title>Confirm in a nested frame</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-frame-array","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/iframe-parent.html"}'/></info></step>
      <step><cmd>In the innermost frame, enter Thanks as the note.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Attach your receipt as proof.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Click the confirm button in the innermost frame.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Check that the innermost frame shows the confirmation.</cmd>
        <info><data name="doc-detective" value='step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-frame-array","detectSteps":false} -->

# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} -->
2. In the innermost frame, enter Thanks as the note.
   <!-- step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} -->
3. Attach your receipt as proof.
   <!-- step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} -->
4. Click the confirm button in the innermost frame.
   <!-- step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} -->
5. Check that the innermost frame shows the confirmation.
   <!-- step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-frame-array","detectSteps":false} */}

# Confirm in a nested frame

1. Go to [the checkout page](http://localhost:8092/iframe-parent.html).
   {/* step {"goTo":"http://localhost:8092/iframe-parent.html"} */}
2. In the innermost frame, enter Thanks as the note.
   {/* step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} */}
3. Attach your receipt as proof.
   {/* step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} */}
4. Click the confirm button in the innermost frame.
   {/* step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} */}
5. Check that the innermost frame shows the confirmation.
   {/* step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Confirm in a nested frame

// (test {"testId":"nav-frame-array","detectSteps":false})

. Go to http://localhost:8092/iframe-parent.html[the checkout page].
+
// (step {"goTo":"http://localhost:8092/iframe-parent.html"})
. In the innermost frame, enter Thanks as the note.
+
// (step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}})
. Attach your receipt as proof.
+
// (step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}})
. Click the confirm button in the innermost frame.
+
// (step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}})
. Check that the innermost frame shows the confirmation.
+
// (step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Confirm in a nested frame</title></head>
<body>
<!-- test {"testId":"nav-frame-array","detectSteps":false} -->
<h1>Confirm in a nested frame</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/iframe-parent.html">the checkout page</a>.
    <!-- step {"goTo":"http://localhost:8092/iframe-parent.html"} --></li>
  <li>In the innermost frame, enter Thanks as the note.
    <!-- step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Attach your receipt as proof.
    <!-- step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Click the confirm button in the innermost frame.
    <!-- step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}} --></li>
  <li>Check that the innermost frame shows the confirmation.
    <!-- step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Confirm in a nested frame
=========================

.. test {"testId":"nav-frame-array","detectSteps":false}

#. Go to `the checkout page <http://localhost:8092/iframe-parent.html>`_.

   .. step {"goTo":"http://localhost:8092/iframe-parent.html"}

#. In the innermost frame, enter Thanks as the note.

   .. step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}}

#. Attach your receipt as proof.

   .. step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}}

#. Click the confirm button in the innermost frame.

   .. step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}}

#. Check that the innermost frame shows the confirmation.

   .. step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-frame-array">
  <title>Confirm in a nested frame</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-frame-array","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/iframe-parent.html" scope="external" format="html">the checkout page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/iframe-parent.html"}'/></info></step>
      <step><cmd>In the innermost frame, enter Thanks as the note.</cmd>
        <info><data name="doc-detective" value='step {"type":{"keys":"Thanks","selector":"#note","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Attach your receipt as proof.</cmd>
        <info><data name="doc-detective" value='step {"upload":{"selector":"#proof","path":"receipt.txt","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Click the confirm button in the innermost frame.</cmd>
        <info><data name="doc-detective" value='step {"click":{"elementText":"Confirm in the inner frame","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
      <step><cmd>Check that the innermost frame shows the confirmation.</cmd>
        <info><data name="doc-detective" value='step {"find":{"elementText":"Confirmed in the inner frame","frame":["#checkout","iframe[name=inner]"]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-frame-array",
      "steps": [
        {
          "goTo": "http://localhost:8092/iframe-parent.html"
        },
        {
          "type": {
            "keys": "Thanks",
            "selector": "#note",
            "frame": [
              "#checkout",
              "iframe[name=inner]"
            ]
          }
        },
        {
          "upload": {
            "selector": "#proof",
            "path": "receipt.txt",
            "frame": [
              "#checkout",
              "iframe[name=inner]"
            ]
          }
        },
        {
          "click": {
            "elementText": "Confirm in the inner frame",
            "frame": [
              "#checkout",
              "iframe[name=inner]"
            ]
          }
        },
        {
          "find": {
            "elementText": "Confirmed in the inner frame",
            "frame": [
              "#checkout",
              "iframe[name=inner]"
            ]
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-frame-array
    steps:
      - goTo: http://localhost:8092/iframe-parent.html
      - type:
          keys: Thanks
          selector: "#note"
          frame:
            - "#checkout"
            - iframe[name=inner]
      - upload:
          selector: "#proof"
          path: receipt.txt
          frame:
            - "#checkout"
            - iframe[name=inner]
      - click:
          elementText: Confirm in the inner frame
          frame:
            - "#checkout"
            - iframe[name=inner]
      - find:
          elementText: Confirmed in the inner frame
          frame:
            - "#checkout"
            - iframe[name=inner]
```

## `swipe` permutations

Each example swipes a browser page, then checks that the page still responds. See [`swipe`](/docs/actions/swipe).

### `swipe: "up"`

**Varies:** `swipe` · **Value:** `"up"` · **Effect:** the finger moves up, which scrolls the page down by half the viewport.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe up on the page.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe up on the page.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe up

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe up on the page.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe up</title></head>
<body>
<h1>Swipe up</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe up on the page.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe up
========

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe up on the page.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-up">
  <title>Swipe up</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe up on the page.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-up","detectSteps":true} -->

# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe up on the page.
   <!-- step {"swipe":"up"} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-up","detectSteps":true} */}

# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe up on the page.
   {/* step {"swipe":"up"} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe up

// (test {"testId":"nav-swipe-up","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe up on the page.
+
// (step {"swipe":"up"})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe up</title></head>
<body>
<!-- test {"testId":"nav-swipe-up","detectSteps":true} -->
<h1>Swipe up</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe up on the page.
    <!-- step {"swipe":"up"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe up
========

.. test {"testId":"nav-swipe-up","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe up on the page.

   .. step {"swipe":"up"}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-up">
  <title>Swipe up</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-up","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe up on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"up"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-up","detectSteps":false} -->

# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe up on the page.
   <!-- step {"swipe":"up"} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-up","detectSteps":false} */}

# Swipe up

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe up on the page.
   {/* step {"swipe":"up"} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe up

// (test {"testId":"nav-swipe-up","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe up on the page.
+
// (step {"swipe":"up"})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe up</title></head>
<body>
<!-- test {"testId":"nav-swipe-up","detectSteps":false} -->
<h1>Swipe up</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe up on the page.
    <!-- step {"swipe":"up"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe up
========

.. test {"testId":"nav-swipe-up","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe up on the page.

   .. step {"swipe":"up"}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-up">
  <title>Swipe up</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-up","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe up on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"up"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-up",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": "up"
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-up
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe: up
      - find: Submit by ID
```

### `swipe: "down"`

**Varies:** `swipe` · **Value:** `"down"` · **Effect:** the finger moves down, which scrolls the page up by half the viewport.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe down on the page.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe down on the page.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe down

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe down on the page.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe down</title></head>
<body>
<h1>Swipe down</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe down on the page.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe down
==========

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe down on the page.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-down">
  <title>Swipe down</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe down on the page.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-down","detectSteps":true} -->

# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe down on the page.
   <!-- step {"swipe":"down"} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-down","detectSteps":true} */}

# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe down on the page.
   {/* step {"swipe":"down"} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe down

// (test {"testId":"nav-swipe-down","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe down on the page.
+
// (step {"swipe":"down"})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe down</title></head>
<body>
<!-- test {"testId":"nav-swipe-down","detectSteps":true} -->
<h1>Swipe down</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe down on the page.
    <!-- step {"swipe":"down"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe down
==========

.. test {"testId":"nav-swipe-down","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe down on the page.

   .. step {"swipe":"down"}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-down">
  <title>Swipe down</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-down","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe down on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"down"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-down","detectSteps":false} -->

# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe down on the page.
   <!-- step {"swipe":"down"} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-down","detectSteps":false} */}

# Swipe down

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe down on the page.
   {/* step {"swipe":"down"} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe down

// (test {"testId":"nav-swipe-down","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe down on the page.
+
// (step {"swipe":"down"})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe down</title></head>
<body>
<!-- test {"testId":"nav-swipe-down","detectSteps":false} -->
<h1>Swipe down</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe down on the page.
    <!-- step {"swipe":"down"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe down
==========

.. test {"testId":"nav-swipe-down","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe down on the page.

   .. step {"swipe":"down"}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-down">
  <title>Swipe down</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-down","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe down on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"down"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-down",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": "down"
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-down
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe: down
      - find: Submit by ID
```

### `swipe: "left"`

**Varies:** `swipe` · **Value:** `"left"` · **Effect:** the finger moves left, which scrolls the page right by half the viewport.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe left on the page.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe left on the page.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe left

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe left on the page.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe left</title></head>
<body>
<h1>Swipe left</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe left on the page.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe left
==========

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe left on the page.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-left">
  <title>Swipe left</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe left on the page.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-left","detectSteps":true} -->

# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe left on the page.
   <!-- step {"swipe":"left"} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-left","detectSteps":true} */}

# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe left on the page.
   {/* step {"swipe":"left"} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe left

// (test {"testId":"nav-swipe-left","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe left on the page.
+
// (step {"swipe":"left"})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe left</title></head>
<body>
<!-- test {"testId":"nav-swipe-left","detectSteps":true} -->
<h1>Swipe left</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe left on the page.
    <!-- step {"swipe":"left"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe left
==========

.. test {"testId":"nav-swipe-left","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe left on the page.

   .. step {"swipe":"left"}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-left">
  <title>Swipe left</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-left","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe left on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"left"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-left","detectSteps":false} -->

# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe left on the page.
   <!-- step {"swipe":"left"} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-left","detectSteps":false} */}

# Swipe left

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe left on the page.
   {/* step {"swipe":"left"} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe left

// (test {"testId":"nav-swipe-left","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe left on the page.
+
// (step {"swipe":"left"})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe left</title></head>
<body>
<!-- test {"testId":"nav-swipe-left","detectSteps":false} -->
<h1>Swipe left</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe left on the page.
    <!-- step {"swipe":"left"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe left
==========

.. test {"testId":"nav-swipe-left","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe left on the page.

   .. step {"swipe":"left"}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-left">
  <title>Swipe left</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-left","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe left on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"left"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-left",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": "left"
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-left
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe: left
      - find: Submit by ID
```

### `swipe: "right"`

**Varies:** `swipe` · **Value:** `"right"` · **Effect:** the finger moves right, which scrolls the page left by half the viewport.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe right on the page.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe right on the page.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe right

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe right on the page.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe right</title></head>
<body>
<h1>Swipe right</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe right on the page.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe right
===========

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe right on the page.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-right">
  <title>Swipe right</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe right on the page.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-right","detectSteps":true} -->

# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe right on the page.
   <!-- step {"swipe":"right"} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-right","detectSteps":true} */}

# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe right on the page.
   {/* step {"swipe":"right"} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe right

// (test {"testId":"nav-swipe-right","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe right on the page.
+
// (step {"swipe":"right"})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe right</title></head>
<body>
<!-- test {"testId":"nav-swipe-right","detectSteps":true} -->
<h1>Swipe right</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe right on the page.
    <!-- step {"swipe":"right"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe right
===========

.. test {"testId":"nav-swipe-right","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe right on the page.

   .. step {"swipe":"right"}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-right">
  <title>Swipe right</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-right","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe right on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"right"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-right","detectSteps":false} -->

# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe right on the page.
   <!-- step {"swipe":"right"} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-right","detectSteps":false} */}

# Swipe right

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe right on the page.
   {/* step {"swipe":"right"} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe right

// (test {"testId":"nav-swipe-right","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe right on the page.
+
// (step {"swipe":"right"})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe right</title></head>
<body>
<!-- test {"testId":"nav-swipe-right","detectSteps":false} -->
<h1>Swipe right</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe right on the page.
    <!-- step {"swipe":"right"} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe right
===========

.. test {"testId":"nav-swipe-right","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe right on the page.

   .. step {"swipe":"right"}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-right">
  <title>Swipe right</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-right","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe right on the page.</cmd>
        <info><data name="doc-detective" value='step {"swipe":"right"}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-right",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": "right"
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-right
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe: right
      - find: Submit by ID
```

### `distance: 0.8`

**Varies:** `swipe.distance` · **Value:** `0.8` · **Effect:** the swipe covers 80% of the viewport instead of the default half.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe up across most of the screen.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe up across most of the screen.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe most of the screen

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe up across most of the screen.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe most of the screen</title></head>
<body>
<h1>Swipe most of the screen</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe up across most of the screen.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe most of the screen
========================

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe up across most of the screen.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-distance">
  <title>Swipe most of the screen</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe up across most of the screen.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-distance","detectSteps":true} -->

# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe up across most of the screen.
   <!-- step {"swipe":{"direction":"up","distance":0.8}} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-distance","detectSteps":true} */}

# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe up across most of the screen.
   {/* step {"swipe":{"direction":"up","distance":0.8}} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe most of the screen

// (test {"testId":"nav-swipe-distance","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe up across most of the screen.
+
// (step {"swipe":{"direction":"up","distance":0.8}})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe most of the screen</title></head>
<body>
<!-- test {"testId":"nav-swipe-distance","detectSteps":true} -->
<h1>Swipe most of the screen</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe up across most of the screen.
    <!-- step {"swipe":{"direction":"up","distance":0.8}} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe most of the screen
========================

.. test {"testId":"nav-swipe-distance","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe up across most of the screen.

   .. step {"swipe":{"direction":"up","distance":0.8}}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-distance">
  <title>Swipe most of the screen</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-distance","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe up across most of the screen.</cmd>
        <info><data name="doc-detective" value='step {"swipe":{"direction":"up","distance":0.8}}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-distance","detectSteps":false} -->

# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe up across most of the screen.
   <!-- step {"swipe":{"direction":"up","distance":0.8}} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-distance","detectSteps":false} */}

# Swipe most of the screen

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe up across most of the screen.
   {/* step {"swipe":{"direction":"up","distance":0.8}} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe most of the screen

// (test {"testId":"nav-swipe-distance","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe up across most of the screen.
+
// (step {"swipe":{"direction":"up","distance":0.8}})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe most of the screen</title></head>
<body>
<!-- test {"testId":"nav-swipe-distance","detectSteps":false} -->
<h1>Swipe most of the screen</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe up across most of the screen.
    <!-- step {"swipe":{"direction":"up","distance":0.8}} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe most of the screen
========================

.. test {"testId":"nav-swipe-distance","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe up across most of the screen.

   .. step {"swipe":{"direction":"up","distance":0.8}}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-distance">
  <title>Swipe most of the screen</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-distance","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe up across most of the screen.</cmd>
        <info><data name="doc-detective" value='step {"swipe":{"direction":"up","distance":0.8}}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-distance",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": {
            "direction": "up",
            "distance": 0.8
          }
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-distance
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe:
          direction: up
          distance: 0.8
      - find: Submit by ID
```

### `from + to`

**Varies:** `swipe.from, swipe.to` · **Value:** `{ "x": 400, "y": 400 } to { "x": 400, "y": 250 }` · **Effect:** the step drags the pointer between the two pixel coordinates.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe from the middle of the page toward the top.
3. Check that **Submit by ID** is still on the page.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
2. Swipe from the middle of the page toward the top.
3. Check that **Submit by ID** is still on the page.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Swipe between two points

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
. Swipe from the middle of the page toward the top.
. Check that *Submit by ID* is still on the page.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe between two points</title></head>
<body>
<h1>Swipe between two points</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.</li>
  <li>Swipe from the middle of the page toward the top.</li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Swipe between two points
========================

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.
#. Swipe from the middle of the page toward the top.
#. Check that **Submit by ID** is still on the page.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-points">
  <title>Swipe between two points</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd></step>
      <step><cmd>Swipe from the middle of the page toward the top.</cmd></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-swipe-points","detectSteps":true} -->

# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe from the middle of the page toward the top.
   <!-- step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} -->
3. Check that **Submit by ID** is still on the page.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-swipe-points","detectSteps":true} */}

# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe from the middle of the page toward the top.
   {/* step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} */}
3. Check that **Submit by ID** is still on the page.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Swipe between two points

// (test {"testId":"nav-swipe-points","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe from the middle of the page toward the top.
+
// (step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}})
. Check that *Submit by ID* is still on the page.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe between two points</title></head>
<body>
<!-- test {"testId":"nav-swipe-points","detectSteps":true} -->
<h1>Swipe between two points</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe from the middle of the page toward the top.
    <!-- step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Swipe between two points
========================

.. test {"testId":"nav-swipe-points","detectSteps":true}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe from the middle of the page toward the top.

   .. step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}}

#. Check that **Submit by ID** is still on the page.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-points">
  <title>Swipe between two points</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-points","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe from the middle of the page toward the top.</cmd>
        <info><data name="doc-detective" value='step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-swipe-points","detectSteps":false} -->

# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. Swipe from the middle of the page toward the top.
   <!-- step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} -->
3. Check that **Submit by ID** is still on the page.
   <!-- step {"find":"Submit by ID"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-swipe-points","detectSteps":false} */}

# Swipe between two points

1. Go to [the element test page](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. Swipe from the middle of the page toward the top.
   {/* step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} */}
3. Check that **Submit by ID** is still on the page.
   {/* step {"find":"Submit by ID"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Swipe between two points

// (test {"testId":"nav-swipe-points","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the element test page].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. Swipe from the middle of the page toward the top.
+
// (step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}})
. Check that *Submit by ID* is still on the page.
+
// (step {"find":"Submit by ID"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Swipe between two points</title></head>
<body>
<!-- test {"testId":"nav-swipe-points","detectSteps":false} -->
<h1>Swipe between two points</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the element test page</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>Swipe from the middle of the page toward the top.
    <!-- step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}} --></li>
  <li>Check that <strong>Submit by ID</strong> is still on the page.
    <!-- step {"find":"Submit by ID"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Swipe between two points
========================

.. test {"testId":"nav-swipe-points","detectSteps":false}

#. Go to `the element test page <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. Swipe from the middle of the page toward the top.

   .. step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}}

#. Check that **Submit by ID** is still on the page.

   .. step {"find":"Submit by ID"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-swipe-points">
  <title>Swipe between two points</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-swipe-points","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>Swipe from the middle of the page toward the top.</cmd>
        <info><data name="doc-detective" value='step {"swipe":{"from":{"x":400,"y":400},"to":{"x":400,"y":250}}}'/></info></step>
      <step><cmd>Check that <b>Submit by ID</b> is still on the page.</cmd>
        <info><data name="doc-detective" value='step {"find":"Submit by ID"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-swipe-points",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "swipe": {
            "from": {
              "x": 400,
              "y": 400
            },
            "to": {
              "x": 400,
              "y": 250
            }
          }
        },
        {
          "find": "Submit by ID"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-swipe-points
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - swipe:
          from:
            x: 400
            y: 400
          to:
            x: 400
            y: 250
      - find: Submit by ID
```

## `wait` permutations

Each example opens a page whose message appears two seconds after it loads. See [`wait`](/docs/actions/wait).

### `wait: 3000`

**Varies:** `wait` · **Value:** `3000` · **Effect:** the step pauses for 3000 milliseconds, so a `find` with `timeout: 0` sees the message on its only look.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Wait three seconds.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Wait three seconds.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Pause for a set time

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
. Wait three seconds.
. Check that the page shows *Loaded after 2 seconds*.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for a set time</title></head>
<body>
<h1>Pause for a set time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.</li>
  <li>Wait three seconds.</li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Pause for a set time
====================

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.
#. Wait three seconds.
#. Check that the page shows **Loaded after 2 seconds**.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-number">
  <title>Pause for a set time</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd></step>
      <step><cmd>Wait three seconds.</cmd></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-wait-number","detectSteps":true} -->

# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Wait three seconds.
   <!-- step {"wait":3000} -->
3. Check that the page shows **Loaded after 2 seconds**.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-wait-number","detectSteps":true} */}

# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Wait three seconds.
   {/* step {"wait":3000} */}
3. Check that the page shows **Loaded after 2 seconds**.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Pause for a set time

// (test {"testId":"nav-wait-number","detectSteps":true})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Wait three seconds.
+
// (step {"wait":3000})
. Check that the page shows *Loaded after 2 seconds*.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for a set time</title></head>
<body>
<!-- test {"testId":"nav-wait-number","detectSteps":true} -->
<h1>Pause for a set time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Wait three seconds.
    <!-- step {"wait":3000} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Pause for a set time
====================

.. test {"testId":"nav-wait-number","detectSteps":true}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Wait three seconds.

   .. step {"wait":3000}

#. Check that the page shows **Loaded after 2 seconds**.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-number">
  <title>Pause for a set time</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-number","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Wait three seconds.</cmd>
        <info><data name="doc-detective" value='step {"wait":3000}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-wait-number","detectSteps":false} -->

# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Wait three seconds.
   <!-- step {"wait":3000} -->
3. Check that the page shows **Loaded after 2 seconds**.
   <!-- step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-wait-number","detectSteps":false} */}

# Pause for a set time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Wait three seconds.
   {/* step {"wait":3000} */}
3. Check that the page shows **Loaded after 2 seconds**.
   {/* step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Pause for a set time

// (test {"testId":"nav-wait-number","detectSteps":false})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Wait three seconds.
+
// (step {"wait":3000})
. Check that the page shows *Loaded after 2 seconds*.
+
// (step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for a set time</title></head>
<body>
<!-- test {"testId":"nav-wait-number","detectSteps":false} -->
<h1>Pause for a set time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Wait three seconds.
    <!-- step {"wait":3000} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.
    <!-- step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Pause for a set time
====================

.. test {"testId":"nav-wait-number","detectSteps":false}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Wait three seconds.

   .. step {"wait":3000}

#. Check that the page shows **Loaded after 2 seconds**.

   .. step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-number">
  <title>Pause for a set time</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-number","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Wait three seconds.</cmd>
        <info><data name="doc-detective" value='step {"wait":3000}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-wait-number",
      "steps": [
        {
          "goTo": "http://localhost:8092/wait-delay.html"
        },
        {
          "wait": 3000
        },
        {
          "find": {
            "selector": "#auto-message",
            "elementText": "Loaded after 2 seconds",
            "timeout": 0
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-wait-number
    steps:
      - goTo: http://localhost:8092/wait-delay.html
      - wait: 3000
      - find:
          selector: "#auto-message"
          elementText: Loaded after 2 seconds
          timeout: 0
```

### `wait: true`

**Varies:** `wait` · **Value:** `true` · **Effect:** the step pauses for the default 5000 milliseconds.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Wait a few seconds.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Wait a few seconds.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Pause for the default time

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
. Wait a few seconds.
. Check that the page shows *Loaded after 2 seconds*.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for the default time</title></head>
<body>
<h1>Pause for the default time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.</li>
  <li>Wait a few seconds.</li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Pause for the default time
==========================

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.
#. Wait a few seconds.
#. Check that the page shows **Loaded after 2 seconds**.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-true">
  <title>Pause for the default time</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd></step>
      <step><cmd>Wait a few seconds.</cmd></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-wait-true","detectSteps":true} -->

# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Wait a few seconds.
   <!-- step {"wait":true} -->
3. Check that the page shows **Loaded after 2 seconds**.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-wait-true","detectSteps":true} */}

# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Wait a few seconds.
   {/* step {"wait":true} */}
3. Check that the page shows **Loaded after 2 seconds**.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Pause for the default time

// (test {"testId":"nav-wait-true","detectSteps":true})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Wait a few seconds.
+
// (step {"wait":true})
. Check that the page shows *Loaded after 2 seconds*.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for the default time</title></head>
<body>
<!-- test {"testId":"nav-wait-true","detectSteps":true} -->
<h1>Pause for the default time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Wait a few seconds.
    <!-- step {"wait":true} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Pause for the default time
==========================

.. test {"testId":"nav-wait-true","detectSteps":true}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Wait a few seconds.

   .. step {"wait":true}

#. Check that the page shows **Loaded after 2 seconds**.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-true">
  <title>Pause for the default time</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-true","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Wait a few seconds.</cmd>
        <info><data name="doc-detective" value='step {"wait":true}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-wait-true","detectSteps":false} -->

# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Wait a few seconds.
   <!-- step {"wait":true} -->
3. Check that the page shows **Loaded after 2 seconds**.
   <!-- step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-wait-true","detectSteps":false} */}

# Pause for the default time

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Wait a few seconds.
   {/* step {"wait":true} */}
3. Check that the page shows **Loaded after 2 seconds**.
   {/* step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Pause for the default time

// (test {"testId":"nav-wait-true","detectSteps":false})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Wait a few seconds.
+
// (step {"wait":true})
. Check that the page shows *Loaded after 2 seconds*.
+
// (step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Pause for the default time</title></head>
<body>
<!-- test {"testId":"nav-wait-true","detectSteps":false} -->
<h1>Pause for the default time</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Wait a few seconds.
    <!-- step {"wait":true} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.
    <!-- step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Pause for the default time
==========================

.. test {"testId":"nav-wait-true","detectSteps":false}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Wait a few seconds.

   .. step {"wait":true}

#. Check that the page shows **Loaded after 2 seconds**.

   .. step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-true">
  <title>Pause for the default time</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-true","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Wait a few seconds.</cmd>
        <info><data name="doc-detective" value='step {"wait":true}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd>
        <info><data name="doc-detective" value='step {"find":{"selector":"#auto-message","elementText":"Loaded after 2 seconds","timeout":0}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-wait-true",
      "steps": [
        {
          "goTo": "http://localhost:8092/wait-delay.html"
        },
        {
          "wait": true
        },
        {
          "find": {
            "selector": "#auto-message",
            "elementText": "Loaded after 2 seconds",
            "timeout": 0
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-wait-true
    steps:
      - goTo: http://localhost:8092/wait-delay.html
      - wait: true
      - find:
          selector: "#auto-message"
          elementText: Loaded after 2 seconds
          timeout: 0
```

### `wait: false`

**Varies:** `wait` · **Value:** `false` · **Effect:** the step doesn't pause, and the `find` that follows waits for the message itself.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Skip the pause.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
2. Skip the pause.
3. Check that the page shows **Loaded after 2 seconds**.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Skip a pause

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
. Skip the pause.
. Check that the page shows *Loaded after 2 seconds*.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip a pause</title></head>
<body>
<h1>Skip a pause</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.</li>
  <li>Skip the pause.</li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Skip a pause
============

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.
#. Skip the pause.
#. Check that the page shows **Loaded after 2 seconds**.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-false">
  <title>Skip a pause</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd></step>
      <step><cmd>Skip the pause.</cmd></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-wait-false","detectSteps":true} -->

# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Skip the pause.
   <!-- step {"wait":false} -->
3. Check that the page shows **Loaded after 2 seconds**.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-wait-false","detectSteps":true} */}

# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Skip the pause.
   {/* step {"wait":false} */}
3. Check that the page shows **Loaded after 2 seconds**.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Skip a pause

// (test {"testId":"nav-wait-false","detectSteps":true})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Skip the pause.
+
// (step {"wait":false})
. Check that the page shows *Loaded after 2 seconds*.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip a pause</title></head>
<body>
<!-- test {"testId":"nav-wait-false","detectSteps":true} -->
<h1>Skip a pause</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Skip the pause.
    <!-- step {"wait":false} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Skip a pause
============

.. test {"testId":"nav-wait-false","detectSteps":true}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Skip the pause.

   .. step {"wait":false}

#. Check that the page shows **Loaded after 2 seconds**.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-false">
  <title>Skip a pause</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-false","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Skip the pause.</cmd>
        <info><data name="doc-detective" value='step {"wait":false}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-wait-false","detectSteps":false} -->

# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} -->
2. Skip the pause.
   <!-- step {"wait":false} -->
3. Check that the page shows **Loaded after 2 seconds**.
   <!-- step {"find":"Loaded after 2 seconds"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-wait-false","detectSteps":false} */}

# Skip a pause

1. Go to [the wait delay page](http://localhost:8092/wait-delay.html).
   {/* step {"goTo":"http://localhost:8092/wait-delay.html"} */}
2. Skip the pause.
   {/* step {"wait":false} */}
3. Check that the page shows **Loaded after 2 seconds**.
   {/* step {"find":"Loaded after 2 seconds"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Skip a pause

// (test {"testId":"nav-wait-false","detectSteps":false})

. Go to http://localhost:8092/wait-delay.html[the wait delay page].
+
// (step {"goTo":"http://localhost:8092/wait-delay.html"})
. Skip the pause.
+
// (step {"wait":false})
. Check that the page shows *Loaded after 2 seconds*.
+
// (step {"find":"Loaded after 2 seconds"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip a pause</title></head>
<body>
<!-- test {"testId":"nav-wait-false","detectSteps":false} -->
<h1>Skip a pause</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/wait-delay.html">the wait delay page</a>.
    <!-- step {"goTo":"http://localhost:8092/wait-delay.html"} --></li>
  <li>Skip the pause.
    <!-- step {"wait":false} --></li>
  <li>Check that the page shows <strong>Loaded after 2 seconds</strong>.
    <!-- step {"find":"Loaded after 2 seconds"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Skip a pause
============

.. test {"testId":"nav-wait-false","detectSteps":false}

#. Go to `the wait delay page <http://localhost:8092/wait-delay.html>`_.

   .. step {"goTo":"http://localhost:8092/wait-delay.html"}

#. Skip the pause.

   .. step {"wait":false}

#. Check that the page shows **Loaded after 2 seconds**.

   .. step {"find":"Loaded after 2 seconds"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-wait-false">
  <title>Skip a pause</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-wait-false","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/wait-delay.html" scope="external" format="html">the wait delay page</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/wait-delay.html"}'/></info></step>
      <step><cmd>Skip the pause.</cmd>
        <info><data name="doc-detective" value='step {"wait":false}'/></info></step>
      <step><cmd>Check that the page shows <b>Loaded after 2 seconds</b>.</cmd>
        <info><data name="doc-detective" value='step {"find":"Loaded after 2 seconds"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-wait-false",
      "steps": [
        {
          "goTo": "http://localhost:8092/wait-delay.html"
        },
        {
          "wait": false
        },
        {
          "find": "Loaded after 2 seconds"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-wait-false
    steps:
      - goTo: http://localhost:8092/wait-delay.html
      - wait: false
      - find: Loaded after 2 seconds
```

## `checkLink` permutations

Each example checks one link. See [`checkLink`](/docs/actions/checklink).

### `checkLink: "<url>"`

**Varies:** `checkLink` · **Value:** `"http://localhost:8092/enhanced-elements.html"` · **Effect:** the step passes when the URL returns one of the default status codes.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check a link

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link</title></head>
<body>
<h1>Check a link</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check a link
============

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-string">
  <title>Check a link</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-string","detectSteps":true} -->

# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-string","detectSteps":true} */}

# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Check a link

// (test {"testId":"nav-checklink-string","detectSteps":true})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link</title></head>
<body>
<!-- test {"testId":"nav-checklink-string","detectSteps":true} -->
<h1>Check a link</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.</li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Check a link
============

.. test {"testId":"nav-checklink-string","detectSteps":true}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-string">
  <title>Check a link</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-string","detectSteps":false} -->

# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":"http://localhost:8092/enhanced-elements.html"} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-string","detectSteps":false} */}

# Check a link

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":"http://localhost:8092/enhanced-elements.html"} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check a link

// (test {"testId":"nav-checklink-string","detectSteps":false})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":"http://localhost:8092/enhanced-elements.html"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link</title></head>
<body>
<!-- test {"testId":"nav-checklink-string","detectSteps":false} -->
<h1>Check a link</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":"http://localhost:8092/enhanced-elements.html"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check a link
============

.. test {"testId":"nav-checklink-string","detectSteps":false}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":"http://localhost:8092/enhanced-elements.html"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-string">
  <title>Check a link</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-string",
      "steps": [
        {
          "checkLink": "http://localhost:8092/enhanced-elements.html"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-string
    steps:
      - checkLink: http://localhost:8092/enhanced-elements.html
```

### `statusCodes: 200`

**Varies:** `checkLink.statusCodes` · **Value:** `200` · **Effect:** the step passes only when the URL returns 200.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Accept one status code

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept one status code</title></head>
<body>
<h1>Accept one status code</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Accept one status code
======================

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-number">
  <title>Accept one status code</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-statuscodes-number","detectSteps":true} -->

# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-statuscodes-number","detectSteps":true} */}

# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Accept one status code

// (test {"testId":"nav-checklink-statuscodes-number","detectSteps":true})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept one status code</title></head>
<body>
<!-- test {"testId":"nav-checklink-statuscodes-number","detectSteps":true} -->
<h1>Accept one status code</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Accept one status code
======================

.. test {"testId":"nav-checklink-statuscodes-number","detectSteps":true}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-number">
  <title>Accept one status code</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-statuscodes-number","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-statuscodes-number","detectSteps":false} -->

# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-statuscodes-number","detectSteps":false} */}

# Accept one status code

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Accept one status code

// (test {"testId":"nav-checklink-statuscodes-number","detectSteps":false})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept one status code</title></head>
<body>
<!-- test {"testId":"nav-checklink-statuscodes-number","detectSteps":false} -->
<h1>Accept one status code</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Accept one status code
======================

.. test {"testId":"nav-checklink-statuscodes-number","detectSteps":false}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-number">
  <title>Accept one status code</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-statuscodes-number","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":200}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-statuscodes-number",
      "steps": [
        {
          "checkLink": {
            "url": "http://localhost:8092/enhanced-elements.html",
            "statusCodes": 200
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-statuscodes-number
    steps:
      - checkLink:
          url: http://localhost:8092/enhanced-elements.html
          statusCodes: 200
```

### `statusCodes: [200, 304]`

**Varies:** `checkLink.statusCodes` · **Value:** `[200, 304]` · **Effect:** the step passes when the URL returns any status code in the list.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Accept several status codes

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept several status codes</title></head>
<body>
<h1>Accept several status codes</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Accept several status codes
===========================

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-array">
  <title>Accept several status codes</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-statuscodes-array","detectSteps":true} -->

# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-statuscodes-array","detectSteps":true} */}

# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Accept several status codes

// (test {"testId":"nav-checklink-statuscodes-array","detectSteps":true})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept several status codes</title></head>
<body>
<!-- test {"testId":"nav-checklink-statuscodes-array","detectSteps":true} -->
<h1>Accept several status codes</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Accept several status codes
===========================

.. test {"testId":"nav-checklink-statuscodes-array","detectSteps":true}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-array">
  <title>Accept several status codes</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-statuscodes-array","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-statuscodes-array","detectSteps":false} -->

# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-statuscodes-array","detectSteps":false} */}

# Accept several status codes

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Accept several status codes

// (test {"testId":"nav-checklink-statuscodes-array","detectSteps":false})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Accept several status codes</title></head>
<body>
<!-- test {"testId":"nav-checklink-statuscodes-array","detectSteps":false} -->
<h1>Accept several status codes</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Accept several status codes
===========================

.. test {"testId":"nav-checklink-statuscodes-array","detectSteps":false}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-statuscodes-array">
  <title>Accept several status codes</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-statuscodes-array","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/enhanced-elements.html","statusCodes":[200,304]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-statuscodes-array",
      "steps": [
        {
          "checkLink": {
            "url": "http://localhost:8092/enhanced-elements.html",
            "statusCodes": [
              200,
              304
            ]
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-statuscodes-array
    steps:
      - checkLink:
          url: http://localhost:8092/enhanced-elements.html
          statusCodes:
            - 200
            - 304
```

### `headers: "…"`

**Varies:** `checkLink.headers` · **Value:** `"Accept: application/json\nX-Test: docs"` · **Effect:** the step sends one header per line of the string.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Send headers as text

. Check that http://localhost:8092/api/health[the API health check] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as text</title></head>
<body>
<h1>Send headers as text</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Send headers as text
====================

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-string">
  <title>Send headers as text</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-headers-string","detectSteps":true} -->

# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-headers-string","detectSteps":true} */}

# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Send headers as text

// (test {"testId":"nav-checklink-headers-string","detectSteps":true})

. Check that http://localhost:8092/api/health[the API health check] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as text</title></head>
<body>
<!-- test {"testId":"nav-checklink-headers-string","detectSteps":true} -->
<h1>Send headers as text</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Send headers as text
====================

.. test {"testId":"nav-checklink-headers-string","detectSteps":true}

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-string">
  <title>Send headers as text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-headers-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-headers-string","detectSteps":false} -->

# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-headers-string","detectSteps":false} */}

# Send headers as text

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Send headers as text

// (test {"testId":"nav-checklink-headers-string","detectSteps":false})

. Check that http://localhost:8092/api/health[the API health check] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as text</title></head>
<body>
<!-- test {"testId":"nav-checklink-headers-string","detectSteps":false} -->
<h1>Send headers as text</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Send headers as text
====================

.. test {"testId":"nav-checklink-headers-string","detectSteps":false}

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-string">
  <title>Send headers as text</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-headers-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/api/health","headers":"Accept: application/json\nX-Test: docs"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-headers-string",
      "steps": [
        {
          "checkLink": {
            "url": "http://localhost:8092/api/health",
            "headers": "Accept: application/json\nX-Test: docs"
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-headers-string
    steps:
      - checkLink:
          url: http://localhost:8092/api/health
          headers: |-
            Accept: application/json
            X-Test: docs
```

### `headers: { … }`

**Varies:** `checkLink.headers` · **Value:** `{ "Accept": "application/json", "X-Test": "docs" }` · **Effect:** the step sends each key as a header with its value.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Send headers as an object

. Check that http://localhost:8092/api/health[the API health check] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as an object</title></head>
<body>
<h1>Send headers as an object</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Send headers as an object
=========================

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-object">
  <title>Send headers as an object</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-headers-object","detectSteps":true} -->

# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-headers-object","detectSteps":true} */}

# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Send headers as an object

// (test {"testId":"nav-checklink-headers-object","detectSteps":true})

. Check that http://localhost:8092/api/health[the API health check] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as an object</title></head>
<body>
<!-- test {"testId":"nav-checklink-headers-object","detectSteps":true} -->
<h1>Send headers as an object</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Send headers as an object
=========================

.. test {"testId":"nav-checklink-headers-object","detectSteps":true}

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-object">
  <title>Send headers as an object</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-headers-object","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-headers-object","detectSteps":false} -->

# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-headers-object","detectSteps":false} */}

# Send headers as an object

1. Check that [the API health check](http://localhost:8092/api/health) responds.
   {/* step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Send headers as an object

// (test {"testId":"nav-checklink-headers-object","detectSteps":false})

. Check that http://localhost:8092/api/health[the API health check] responds.
+
// (step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Send headers as an object</title></head>
<body>
<!-- test {"testId":"nav-checklink-headers-object","detectSteps":false} -->
<h1>Send headers as an object</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/api/health">the API health check</a> responds.
    <!-- step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Send headers as an object
=========================

.. test {"testId":"nav-checklink-headers-object","detectSteps":false}

#. Check that `the API health check <http://localhost:8092/api/health>`_ responds.

   .. step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-headers-object">
  <title>Send headers as an object</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-headers-object","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/api/health" scope="external" format="html">the API health check</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"http://localhost:8092/api/health","headers":{"Accept":"application/json","X-Test":"docs"}}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-headers-object",
      "steps": [
        {
          "checkLink": {
            "url": "http://localhost:8092/api/health",
            "headers": {
              "Accept": "application/json",
              "X-Test": "docs"
            }
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-headers-object
    steps:
      - checkLink:
          url: http://localhost:8092/api/health
          headers:
            Accept: application/json
            X-Test: docs
```

### `origin + url`

**Varies:** `checkLink.origin` · **Value:** `"http://localhost:8092" with url "/enhanced-elements.html"` · **Effect:** the step joins `origin` and the relative `url` into the address it checks.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Check a link by its path

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link by its path</title></head>
<body>
<h1>Check a link by its path</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Check a link by its path
========================

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-origin">
  <title>Check a link by its path</title>
  <taskbody>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"nav-checklink-origin","detectSteps":true} -->

# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} -->

<!-- test end -->
```

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"nav-checklink-origin","detectSteps":true} */}

# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Check a link by its path

// (test {"testId":"nav-checklink-origin","detectSteps":true})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link by its path</title></head>
<body>
<!-- test {"testId":"nav-checklink-origin","detectSteps":true} -->
<h1>Check a link by its path</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Check a link by its path
========================

.. test {"testId":"nav-checklink-origin","detectSteps":true}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-origin">
  <title>Check a link by its path</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-origin","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"nav-checklink-origin","detectSteps":false} -->

# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   <!-- step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} -->

<!-- test end -->
```

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"nav-checklink-origin","detectSteps":false} */}

# Check a link by its path

1. Check that [the element test page](http://localhost:8092/enhanced-elements.html) responds.
   {/* step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Check a link by its path

// (test {"testId":"nav-checklink-origin","detectSteps":false})

. Check that http://localhost:8092/enhanced-elements.html[the element test page] responds.
+
// (step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Check a link by its path</title></head>
<body>
<!-- test {"testId":"nav-checklink-origin","detectSteps":false} -->
<h1>Check a link by its path</h1>
<ol>
  <li>Check that <a href="http://localhost:8092/enhanced-elements.html">the element test page</a> responds.
    <!-- step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Check a link by its path
========================

.. test {"testId":"nav-checklink-origin","detectSteps":false}

#. Check that `the element test page <http://localhost:8092/enhanced-elements.html>`_ responds.

   .. step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="nav-checklink-origin">
  <title>Check a link by its path</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"nav-checklink-origin","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the element test page</xref> responds.</cmd>
        <info><data name="doc-detective" value='step {"checkLink":{"url":"/enhanced-elements.html","origin":"http://localhost:8092"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "nav-checklink-origin",
      "steps": [
        {
          "checkLink": {
            "url": "/enhanced-elements.html",
            "origin": "http://localhost:8092"
          }
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: nav-checklink-origin
    steps:
      - checkLink:
          url: /enhanced-elements.html
          origin: http://localhost:8092
```