> 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.

# Annotation options, written as tests

> Short procedures that each vary one annotation type, `annotate` operation, or `annotationDefaults` level, 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).

The examples write their images and videos to a `.dd-output` folder next to the example files. For full procedures, see [Screenshots and recordings](/reference/docs-as-tests/capture).

## Annotation permutations

Each example draws one annotation on a screenshot of the sample form.

### `outline` on a selector string

**Varies:** `screenshot.annotations[]` · **Value:** `{ "outline": "#username-input" }` · **Effect:** draws a box around the username field.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-outline-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-outline-string","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-outline-string","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-outline-string","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-outline-string","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotation-outline-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-outline-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-outline-string","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-outline-string","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-outline-string","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-outline-string","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotation-outline-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-outline-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-outline-string.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></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": "capture-annotation-outline-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-outline-string.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-outline-string
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-outline-string.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
```

### `outline` on an element object

**Varies:** `screenshot.annotations[]` · **Value:** `{ "outline": { "elementTestId": "username-field" } }` · **Effect:** finds the field by its test ID, then draws a box around it.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-outline-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-outline-object","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-outline-object","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-outline-object","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-outline-object","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-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="capture-annotation-outline-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-outline-object","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-outline-object","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-outline-object","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-outline-object","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-outline-object","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}}

.. 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="capture-annotation-outline-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-outline-object","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-outline-object.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":{"elementTestId":"username-field"}}]}}'/></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": "capture-annotation-outline-object",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-outline-object.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": {
                  "elementTestId": "username-field"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-outline-object
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-outline-object.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline:
                elementTestId: username-field
```

### `arrow` on a selector string

**Varies:** `screenshot.annotations[]` · **Value:** `{ "arrow": "#username-input" }` · **Effect:** points an arrow at the username field.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-arrow-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-arrow-string","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-arrow-string","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-arrow-string","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-arrow-string","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}}

.. 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="capture-annotation-arrow-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-arrow-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-arrow-string","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-arrow-string","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-arrow-string","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-arrow-string","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}}

.. 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="capture-annotation-arrow-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-arrow-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-arrow-string.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":"#username-input"}]}}'/></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": "capture-annotation-arrow-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-arrow-string.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "arrow": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-arrow-string
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-arrow-string.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - arrow: "#username-input"
```

### `arrow` at a point

**Varies:** `screenshot.annotations[]` · **Value:** `{ "arrow": { "position": { "x": 200, "y": 150 } } }` · **Effect:** points an arrow at a spot in the image, with no element.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-arrow-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-arrow-point","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-arrow-point","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-arrow-point","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-arrow-point","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-arrow-point","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}}

.. 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="capture-annotation-arrow-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-arrow-point","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-arrow-point","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-arrow-point","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-arrow-point","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-arrow-point","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-arrow-point","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}}

.. 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="capture-annotation-arrow-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-arrow-point","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-arrow-point.png","directory":".dd-output","overwrite":"true","annotations":[{"arrow":{"position":{"x":200,"y":150}}}]}}'/></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": "capture-annotation-arrow-point",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-arrow-point.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "arrow": {
                  "position": {
                    "x": 200,
                    "y": 150
                  }
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-arrow-point
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-arrow-point.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - arrow:
                position:
                  x: 200
                  y: 150
```

### `badge` on a selector string

**Varies:** `screenshot.annotations[]` · **Value:** `{ "badge": "#username-input", "label": "1" }` · **Effect:** marks the field with the number 1.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-badge-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-badge-string","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-badge-string","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-badge-string","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-badge-string","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}}

.. 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="capture-annotation-badge-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-badge-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-badge-string","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-badge-string","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-badge-string","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"1"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-badge-string","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"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="capture-annotation-badge-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-badge-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-badge-string.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":"#username-input","label":"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": "capture-annotation-badge-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-badge-string.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "badge": "#username-input",
                "label": "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: capture-annotation-badge-string
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-badge-string.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - badge: "#username-input"
              label: "1"
```

### `badge` on an element object with `timeout`

**Varies:** `screenshot.annotations[]` · **Value:** `{ "badge": { "elementTestId": "password-field", "timeout": 10000 }, "label": "2" }` · **Effect:** waits up to 10 seconds for the field, then marks it with 2.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-badge-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-badge-object","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-badge-object","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-badge-object","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-badge-object","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}}

.. 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="capture-annotation-badge-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-badge-object","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-badge-object","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-badge-object","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-badge-object","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-badge-object","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}}

.. 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="capture-annotation-badge-object">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-badge-object","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-badge-object.png","directory":".dd-output","overwrite":"true","annotations":[{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"}]}}'/></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": "capture-annotation-badge-object",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-badge-object.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "badge": {
                  "elementTestId": "password-field",
                  "timeout": 10000
                },
                "label": "2"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-badge-object
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-badge-object.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - badge:
                elementTestId: password-field
                timeout: 10000
              label: "2"
```

### `callout` with a named `position`

**Varies:** `screenshot.annotations[]` · **Value:** `{ "callout": "#username-input", "position": "right" }` · **Effect:** labels the field with a text box to its right.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-callout-position-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-callout-position-region","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-callout-position-region","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-callout-position-region","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-callout-position-region","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-callout-position-region","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}}

.. 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="capture-annotation-callout-position-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-callout-position-region","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-callout-position-region","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-callout-position-region","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-callout-position-region","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-callout-position-region","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-callout-position-region","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}}

.. 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="capture-annotation-callout-position-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-callout-position-region","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-callout-position-region.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":"right"}]}}'/></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": "capture-annotation-callout-position-region",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-callout-position-region.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "callout": "#username-input",
                "label": "Your account name",
                "position": "right"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-callout-position-region
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-callout-position-region.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - callout: "#username-input"
              label: Your account name
              position: right
```

### `callout` with a `position` offset

**Varies:** `screenshot.annotations[]` · **Value:** `{ "position": { "offset": { "x": 0, "y": 20 } } }` · **Effect:** moves the label 20 pixels down from where it would go.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-callout-position-offset">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-callout-position-offset","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-callout-position-offset","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-callout-position-offset","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-callout-position-offset","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-callout-position-offset","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}}

.. 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="capture-annotation-callout-position-offset">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-callout-position-offset","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-callout-position-offset","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-callout-position-offset","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-callout-position-offset","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-callout-position-offset","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-callout-position-offset","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}}

.. 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="capture-annotation-callout-position-offset">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-callout-position-offset","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-callout-position-offset.png","directory":".dd-output","overwrite":"true","annotations":[{"callout":"#username-input","label":"Your account name","position":{"offset":{"x":0,"y":20}}}]}}'/></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": "capture-annotation-callout-position-offset",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-callout-position-offset.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "callout": "#username-input",
                "label": "Your account name",
                "position": {
                  "offset": {
                    "x": 0,
                    "y": 20
                  }
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-callout-position-offset
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-callout-position-offset.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - callout: "#username-input"
              label: Your account name
              position:
                offset:
                  x: 0
                  y: 20
```

### `blur` on a selector string

**Varies:** `screenshot.annotations[]` · **Value:** `{ "blur": "#contact-email" }` · **Effect:** blurs the first match only.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-blur-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-blur-string","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-blur-string","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-blur-string","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-blur-string","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}}

.. 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="capture-annotation-blur-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-blur-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

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

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-blur-string","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-blur-string","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-blur-string","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-blur-string","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}}

.. 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="capture-annotation-blur-string">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-blur-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-blur-string.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":"#contact-email"}]}}'/></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": "capture-annotation-blur-string",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-blur-string.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "blur": "#contact-email"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-blur-string
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-blur-string.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - blur: "#contact-email"
```

### `blur` with `all`

**Varies:** `screenshot.annotations[]` · **Value:** `{ "blur": { "selector": ".form-control" }, "all": true }` · **Effect:** blurs every field that matches, not only the first.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-blur-all">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-blur-all","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-blur-all","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-blur-all","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-blur-all","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-blur-all","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}}

.. 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="capture-annotation-blur-all">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-blur-all","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-blur-all","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-blur-all","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-blur-all","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-blur-all","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-blur-all","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}}

.. 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="capture-annotation-blur-all">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-blur-all","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-blur-all.png","directory":".dd-output","overwrite":"true","annotations":[{"blur":{"selector":".form-control"},"all":true}]}}'/></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": "capture-annotation-blur-all",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-blur-all.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "blur": {
                  "selector": ".form-control"
                },
                "all": true
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-blur-all
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-blur-all.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - blur:
                selector: .form-control
              all: true
```

### `text` in a named region

**Varies:** `screenshot.annotations[]` · **Value:** `{ "text": { "position": "top-right" } }` · **Effect:** places a text box in the top-right corner of the image.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-text-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-text-region","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-text-region","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-text-region","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-text-region","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-text-region","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}}

.. 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="capture-annotation-text-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-text-region","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-text-region","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-text-region","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-text-region","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-text-region","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-text-region","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}}

.. 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="capture-annotation-text-region">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-text-region","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-text-region.png","directory":".dd-output","overwrite":"true","annotations":[{"text":{"position":"top-right"},"label":"Sample data"}]}}'/></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": "capture-annotation-text-region",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-text-region.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "text": {
                  "position": "top-right"
                },
                "label": "Sample data"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-text-region
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-text-region.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - text:
                position: top-right
              label: Sample data
```

### `text` on a selector with a `position` point

**Varies:** `screenshot.annotations[]` · **Value:** `{ "text": "#username-input", "position": { "x": 40, "y": 40 } }` · **Effect:** anchors the text to the field, then places it at a fixed point.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field comes first.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark the sign-in form

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field comes first.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field comes first.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark the sign-in form
=====================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field comes first.
```

#### 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="capture-annotation-text-string-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field comes first.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotation-text-string-point","detectSteps":true} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotation-text-string-point","detectSteps":true} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-text-string-point","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-text-string-point","detectSteps":true} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-text-string-point","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}}

.. 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="capture-annotation-text-string-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-text-string-point","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotation-text-string-point","detectSteps":false} -->

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field comes first.
   <!-- step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotation-text-string-point","detectSteps":false} */}

# Mark the sign-in form

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field comes first.
   {/* step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark the sign-in form

// (test {"testId":"capture-annotation-text-string-point","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field comes first.
+
// (step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark the sign-in form</title></head>
<body>
<!-- test {"testId":"capture-annotation-text-string-point","detectSteps":false} -->
<h1>Mark the sign-in form</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field comes first.
    <!-- step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark the sign-in form
=====================

.. test {"testId":"capture-annotation-text-string-point","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field comes first.

   .. step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}}

.. 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="capture-annotation-text-string-point">
  <title>Mark the sign-in form</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotation-text-string-point","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field comes first.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"annotation-text-string-point.png","directory":".dd-output","overwrite":"true","annotations":[{"text":"#username-input","label":"Required","position":{"x":40,"y":40}}]}}'/></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": "capture-annotation-text-string-point",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "annotation-text-string-point.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "text": "#username-input",
                "label": "Required",
                "position": {
                  "x": 40,
                  "y": 40
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotation-text-string-point
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: annotation-text-string-point.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - text: "#username-input"
              label: Required
              position:
                x: 40
                y: 40
```

## `annotate` permutations

Each example draws into the page with `annotate`, then takes a screenshot that shows the result.

### `add`

**Varies:** `annotate.add` · **Value:** `[{ "id": "step", "badge": "#username-input" }]` · **Effect:** draws a badge into the page, where it stays until something clears it.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Mark a field on the page

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is marked 1.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark a field on the page</title></head>
<body>
<h1>Mark a field on the page</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is marked 1.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Mark a field on the page
========================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is marked 1.
```

#### 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="capture-annotate-add">
  <title>Mark a field on the page</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is marked 1.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotate-add","detectSteps":true} -->

# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
   <!-- step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotate-add","detectSteps":true} */}

# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
   {/* step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Mark a field on the page

// (test {"testId":"capture-annotate-add","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
+
// (step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark a field on the page</title></head>
<body>
<!-- test {"testId":"capture-annotate-add","detectSteps":true} -->
<h1>Mark a field on the page</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
    <!-- step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Mark a field on the page
========================

.. test {"testId":"capture-annotate-add","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

   .. step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-add">
  <title>Mark a field on the page</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-add","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotate-add","detectSteps":false} -->

# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
   <!-- step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotate-add","detectSteps":false} */}

# Mark a field on the page

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
   {/* step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Mark a field on the page

// (test {"testId":"capture-annotate-add","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
+
// (step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Mark a field on the page</title></head>
<body>
<!-- test {"testId":"capture-annotate-add","detectSteps":false} -->
<h1>Mark a field on the page</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
    <!-- step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Mark a field on the page
========================

.. test {"testId":"capture-annotate-add","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

   .. step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-add">
  <title>Mark a field on the page</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-add","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-add.png","directory":".dd-output","overwrite":"true"}}'/></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": "capture-annotate-add",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "annotate": {
            "add": [
              {
                "id": "step",
                "badge": "#username-input",
                "label": "1"
              }
            ]
          }
        },
        {
          "screenshot": {
            "path": "annotate-add.png",
            "directory": ".dd-output",
            "overwrite": "true"
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotate-add
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - annotate:
          add:
            - id: step
              badge: "#username-input"
              label: "1"
      - screenshot:
          path: annotate-add.png
          directory: .dd-output
          overwrite: "true"
```

### `update`

**Varies:** `annotate.update` · **Value:** `[{ "id": "step", "badge": "#submit-button" }]` · **Effect:** replaces the annotation with the same `id`, so the badge moves to the button.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
3. Then the button is marked 2.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
3. Then the button is marked 2.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Move a mark to the next field

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is marked 1.
. Then the button is marked 2.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Move a mark to the next field</title></head>
<body>
<h1>Move a mark to the next field</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is marked 1.</li>
  <li>Then the button is marked 2.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Move a mark to the next field
=============================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is marked 1.

#. Then the button is marked 2.
```

#### 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="capture-annotate-update">
  <title>Move a mark to the next field</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is marked 1.</cmd></step>
      <step><cmd>Then the button is marked 2.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotate-update","detectSteps":true} -->

# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
3. Then the button is marked 2.
   <!-- step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} -->
   <!-- step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotate-update","detectSteps":true} */}

# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
3. Then the button is marked 2.
   {/* step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} */}
   {/* step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Move a mark to the next field

// (test {"testId":"capture-annotate-update","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
. Then the button is marked 2.
+
// (step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}})
+
// (step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Move a mark to the next field</title></head>
<body>
<!-- test {"testId":"capture-annotate-update","detectSteps":true} -->
<h1>Move a mark to the next field</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} --></li>
  <li>Then the button is marked 2.
    <!-- step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} -->
    <!-- step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Move a mark to the next field
=============================

.. test {"testId":"capture-annotate-update","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

#. Then the button is marked 2.

   .. step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}}

   .. step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-update">
  <title>Move a mark to the next field</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-update","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/></info></step>
      <step><cmd>Then the button is marked 2.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotate-update","detectSteps":false} -->

# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
3. Then the button is marked 2.
   <!-- step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} -->
   <!-- step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotate-update","detectSteps":false} */}

# Move a mark to the next field

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
3. Then the button is marked 2.
   {/* step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} */}
   {/* step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Move a mark to the next field

// (test {"testId":"capture-annotate-update","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
. Then the button is marked 2.
+
// (step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}})
+
// (step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Move a mark to the next field</title></head>
<body>
<!-- test {"testId":"capture-annotate-update","detectSteps":false} -->
<h1>Move a mark to the next field</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} --></li>
  <li>Then the button is marked 2.
    <!-- step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}} -->
    <!-- step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Move a mark to the next field
=============================

.. test {"testId":"capture-annotate-update","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

#. Then the button is marked 2.

   .. step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}}

   .. step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-update">
  <title>Move a mark to the next field</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-update","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/></info></step>
      <step><cmd>Then the button is marked 2.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"update":[{"id":"step","badge":"#submit-button","label":"2"}]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-update.png","directory":".dd-output","overwrite":"true"}}'/></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": "capture-annotate-update",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "annotate": {
            "add": [
              {
                "id": "step",
                "badge": "#username-input",
                "label": "1"
              }
            ]
          }
        },
        {
          "annotate": {
            "update": [
              {
                "id": "step",
                "badge": "#submit-button",
                "label": "2"
              }
            ]
          }
        },
        {
          "screenshot": {
            "path": "annotate-update.png",
            "directory": ".dd-output",
            "overwrite": "true"
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotate-update
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - annotate:
          add:
            - id: step
              badge: "#username-input"
              label: "1"
      - annotate:
          update:
            - id: step
              badge: "#submit-button"
              label: "2"
      - screenshot:
          path: annotate-update.png
          directory: .dd-output
          overwrite: "true"
```

### `clear` with ids

**Varies:** `annotate.clear` · **Value:** `["hint"]` · **Effect:** removes only the annotations with those ids.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1, with a hint beside it.
3. The hint goes away, and the mark stays.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1, with a hint beside it.
3. The hint goes away, and the mark stays.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Remove one mark

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is marked 1, with a hint beside it.
. The hint goes away, and the mark stays.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove one mark</title></head>
<body>
<h1>Remove one mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is marked 1, with a hint beside it.</li>
  <li>The hint goes away, and the mark stays.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Remove one mark
===============

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is marked 1, with a hint beside it.

#. The hint goes away, and the mark stays.
```

#### 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="capture-annotate-clear-ids">
  <title>Remove one mark</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is marked 1, with a hint beside it.</cmd></step>
      <step><cmd>The hint goes away, and the mark stays.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotate-clear-ids","detectSteps":true} -->

# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1, with a hint beside it.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} -->
3. The hint goes away, and the mark stays.
   <!-- step {"annotate":{"clear":["hint"]}} -->
   <!-- step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotate-clear-ids","detectSteps":true} */}

# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1, with a hint beside it.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} */}
3. The hint goes away, and the mark stays.
   {/* step {"annotate":{"clear":["hint"]}} */}
   {/* step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Remove one mark

// (test {"testId":"capture-annotate-clear-ids","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1, with a hint beside it.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}})
. The hint goes away, and the mark stays.
+
// (step {"annotate":{"clear":["hint"]}})
+
// (step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove one mark</title></head>
<body>
<!-- test {"testId":"capture-annotate-clear-ids","detectSteps":true} -->
<h1>Remove one mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1, with a hint beside it.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} --></li>
  <li>The hint goes away, and the mark stays.
    <!-- step {"annotate":{"clear":["hint"]}} -->
    <!-- step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Remove one mark
===============

.. test {"testId":"capture-annotate-clear-ids","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1, with a hint beside it.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}}

#. The hint goes away, and the mark stays.

   .. step {"annotate":{"clear":["hint"]}}

   .. step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-clear-ids">
  <title>Remove one mark</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-clear-ids","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1, with a hint beside it.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}}'/></info></step>
      <step><cmd>The hint goes away, and the mark stays.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"clear":["hint"]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotate-clear-ids","detectSteps":false} -->

# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1, with a hint beside it.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} -->
3. The hint goes away, and the mark stays.
   <!-- step {"annotate":{"clear":["hint"]}} -->
   <!-- step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotate-clear-ids","detectSteps":false} */}

# Remove one mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1, with a hint beside it.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} */}
3. The hint goes away, and the mark stays.
   {/* step {"annotate":{"clear":["hint"]}} */}
   {/* step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Remove one mark

// (test {"testId":"capture-annotate-clear-ids","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1, with a hint beside it.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}})
. The hint goes away, and the mark stays.
+
// (step {"annotate":{"clear":["hint"]}})
+
// (step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove one mark</title></head>
<body>
<!-- test {"testId":"capture-annotate-clear-ids","detectSteps":false} -->
<h1>Remove one mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1, with a hint beside it.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}} --></li>
  <li>The hint goes away, and the mark stays.
    <!-- step {"annotate":{"clear":["hint"]}} -->
    <!-- step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Remove one mark
===============

.. test {"testId":"capture-annotate-clear-ids","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1, with a hint beside it.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}}

#. The hint goes away, and the mark stays.

   .. step {"annotate":{"clear":["hint"]}}

   .. step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-clear-ids">
  <title>Remove one mark</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-clear-ids","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1, with a hint beside it.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"},{"id":"hint","callout":"#username-input","label":"Your account name","position":"right"}]}}'/></info></step>
      <step><cmd>The hint goes away, and the mark stays.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"clear":["hint"]}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-clear-ids.png","directory":".dd-output","overwrite":"true"}}'/></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": "capture-annotate-clear-ids",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "annotate": {
            "add": [
              {
                "id": "step",
                "badge": "#username-input",
                "label": "1"
              },
              {
                "id": "hint",
                "callout": "#username-input",
                "label": "Your account name",
                "position": "right"
              }
            ]
          }
        },
        {
          "annotate": {
            "clear": [
              "hint"
            ]
          }
        },
        {
          "screenshot": {
            "path": "annotate-clear-ids.png",
            "directory": ".dd-output",
            "overwrite": "true"
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotate-clear-ids
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - annotate:
          add:
            - id: step
              badge: "#username-input"
              label: "1"
            - id: hint
              callout: "#username-input"
              label: Your account name
              position: right
      - annotate:
          clear:
            - hint
      - screenshot:
          path: annotate-clear-ids.png
          directory: .dd-output
          overwrite: "true"
```

### `clear: true`

**Varies:** `annotate.clear` · **Value:** `true` · **Effect:** removes every annotation on the page.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
3. All marks go away.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is marked 1.
3. All marks go away.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Remove every mark

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is marked 1.
. All marks go away.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove every mark</title></head>
<body>
<h1>Remove every mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is marked 1.</li>
  <li>All marks go away.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Remove every mark
=================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is marked 1.

#. All marks go away.
```

#### 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="capture-annotate-clear-true">
  <title>Remove every mark</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is marked 1.</cmd></step>
      <step><cmd>All marks go away.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotate-clear-true","detectSteps":true} -->

# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
3. All marks go away.
   <!-- step {"annotate":{"clear":true}} -->
   <!-- step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotate-clear-true","detectSteps":true} */}

# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
3. All marks go away.
   {/* step {"annotate":{"clear":true}} */}
   {/* step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Remove every mark

// (test {"testId":"capture-annotate-clear-true","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
. All marks go away.
+
// (step {"annotate":{"clear":true}})
+
// (step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove every mark</title></head>
<body>
<!-- test {"testId":"capture-annotate-clear-true","detectSteps":true} -->
<h1>Remove every mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} --></li>
  <li>All marks go away.
    <!-- step {"annotate":{"clear":true}} -->
    <!-- step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Remove every mark
=================

.. test {"testId":"capture-annotate-clear-true","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

#. All marks go away.

   .. step {"annotate":{"clear":true}}

   .. step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-clear-true">
  <title>Remove every mark</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-clear-true","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/></info></step>
      <step><cmd>All marks go away.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"clear":true}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotate-clear-true","detectSteps":false} -->

# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is marked 1.
   <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} -->
3. All marks go away.
   <!-- step {"annotate":{"clear":true}} -->
   <!-- step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotate-clear-true","detectSteps":false} */}

# Remove every mark

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is marked 1.
   {/* step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} */}
3. All marks go away.
   {/* step {"annotate":{"clear":true}} */}
   {/* step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Remove every mark

// (test {"testId":"capture-annotate-clear-true","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is marked 1.
+
// (step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}})
. All marks go away.
+
// (step {"annotate":{"clear":true}})
+
// (step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Remove every mark</title></head>
<body>
<!-- test {"testId":"capture-annotate-clear-true","detectSteps":false} -->
<h1>Remove every mark</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is marked 1.
    <!-- step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}} --></li>
  <li>All marks go away.
    <!-- step {"annotate":{"clear":true}} -->
    <!-- step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Remove every mark
=================

.. test {"testId":"capture-annotate-clear-true","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is marked 1.

   .. step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}

#. All marks go away.

   .. step {"annotate":{"clear":true}}

   .. step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}}

.. 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="capture-annotate-clear-true">
  <title>Remove every mark</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotate-clear-true","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is marked 1.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"step","badge":"#username-input","label":"1"}]}}'/></info></step>
      <step><cmd>All marks go away.</cmd>
        <info><data name="doc-detective" value='step {"annotate":{"clear":true}}'/>
          <data name="doc-detective" value='step {"screenshot":{"path":"annotate-clear-true.png","directory":".dd-output","overwrite":"true"}}'/></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": "capture-annotate-clear-true",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "annotate": {
            "add": [
              {
                "id": "step",
                "badge": "#username-input",
                "label": "1"
              }
            ]
          }
        },
        {
          "annotate": {
            "clear": true
          }
        },
        {
          "screenshot": {
            "path": "annotate-clear-true.png",
            "directory": ".dd-output",
            "overwrite": "true"
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotate-clear-true
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - annotate:
          add:
            - id: step
              badge: "#username-input"
              label: "1"
      - annotate:
          clear: true
      - screenshot:
          path: annotate-clear-true.png
          directory: .dd-output
          overwrite: "true"
```

## `annotationDefaults` precedence

A test's theme wins over the spec's, which wins over the config's. An annotation's own `style` wins over all of them. The config-level examples keep a `doc-detective.json` in their folder.

### In the config

**Varies:** `config.annotationDefaults` · **Value:** `{ "color": "#E11D48", "strokeWidth": 3 }` · **Effect:** every annotation in the run uses the red theme unless a spec or test sets its own.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Outline a field with the config theme

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is outlined.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the config theme</title></head>
<body>
<h1>Outline a field with the config theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is outlined.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Outline a field with the config theme
=====================================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is outlined.
```

#### 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="capture-annotationdefaults-config">
  <title>Outline a field with the config theme</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is outlined.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotationdefaults-config","detectSteps":true} -->

# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotationdefaults-config","detectSteps":true} */}

# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Outline a field with the config theme

// (test {"testId":"capture-annotationdefaults-config","detectSteps":true})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the config theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-config","detectSteps":true} -->
<h1>Outline a field with the config theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Outline a field with the config theme
=====================================

.. test {"testId":"capture-annotationdefaults-config","detectSteps":true}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-config">
  <title>Outline a field with the config theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-config","detectSteps":true}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotationdefaults-config","detectSteps":false} -->

# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotationdefaults-config","detectSteps":false} */}

# Outline a field with the config theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Outline a field with the config theme

// (test {"testId":"capture-annotationdefaults-config","detectSteps":false})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the config theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-config","detectSteps":false} -->
<h1>Outline a field with the config theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Outline a field with the config theme
=====================================

.. test {"testId":"capture-annotationdefaults-config","detectSteps":false}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-config">
  <title>Outline a field with the config theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-config","detectSteps":false}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></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": "capture-annotationdefaults-config",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "defaults-config.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotationdefaults-config
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: defaults-config.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
```

### On the spec

**Varies:** `spec.annotationDefaults` · **Value:** `{ "color": "#0EA5E9", "strokeWidth": 4 }` · **Effect:** every test in the spec uses the blue theme. Inline statements can't set spec fields, so the inline and detected variants set it on the test.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Outline a field with the spec theme

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is outlined.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the spec theme</title></head>
<body>
<h1>Outline a field with the spec theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is outlined.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Outline a field with the spec theme
===================================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is outlined.
```

#### 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="capture-annotationdefaults-spec">
  <title>Outline a field with the spec theme</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is outlined.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Outline a field with the spec theme

// (test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the spec theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with the spec theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Outline a field with the spec theme
===================================

.. test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-spec">
  <title>Outline a field with the spec theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-spec","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with the spec theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Outline a field with the spec theme

// (test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the spec theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with the spec theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Outline a field with the spec theme
===================================

.. test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-spec">
  <title>Outline a field with the spec theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-spec","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-spec.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></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",
  "annotationDefaults": {
    "color": "#0EA5E9",
    "strokeWidth": 4
  },
  "tests": [
    {
      "testId": "capture-annotationdefaults-spec",
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "defaults-spec.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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
annotationDefaults:
  color: "#0EA5E9"
  strokeWidth: 4
tests:
  - testId: capture-annotationdefaults-spec
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: defaults-spec.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
```

### On the test

**Varies:** `test.annotationDefaults` · **Value:** `{ "color": "#0EA5E9", "strokeWidth": 4 }` · **Effect:** this test's annotations use the blue theme.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Outline a field with the test theme

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is outlined.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the test theme</title></head>
<body>
<h1>Outline a field with the test theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is outlined.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Outline a field with the test theme
===================================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is outlined.
```

#### 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="capture-annotationdefaults-test">
  <title>Outline a field with the test theme</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is outlined.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Outline a field with the test theme

// (test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the test theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with the test theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Outline a field with the test theme
===================================

.. test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-test">
  <title>Outline a field with the test theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with the test theme

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Outline a field with the test theme

// (test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with the test theme</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with the test theme</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Outline a field with the test theme
===================================

.. test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-test">
  <title>Outline a field with the test theme</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></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": "capture-annotationdefaults-test",
      "annotationDefaults": {
        "color": "#0EA5E9",
        "strokeWidth": 4
      },
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "defaults-test.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotationdefaults-test
    annotationDefaults:
      color: "#0EA5E9"
      strokeWidth: 4
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: defaults-test.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
```

### Test over config

**Varies:** `test.annotationDefaults over config.annotationDefaults` · **Value:** `blue over red` · **Effect:** the test's blue theme wins over the config's red one.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Outline a field when config and test set themes

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is outlined.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field when config and test set themes</title></head>
<body>
<h1>Outline a field when config and test set themes</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is outlined.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Outline a field when config and test set themes
===============================================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is outlined.
```

#### 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="capture-annotationdefaults-test-over-config">
  <title>Outline a field when config and test set themes</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is outlined.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Outline a field when config and test set themes

// (test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field when config and test set themes</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field when config and test set themes</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Outline a field when config and test set themes
===============================================

.. test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-test-over-config">
  <title>Outline a field when config and test set themes</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field when config and test set themes

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Outline a field when config and test set themes

// (test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field when config and test set themes</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field when config and test set themes</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Outline a field when config and test set themes
===============================================

.. test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}

.. 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="capture-annotationdefaults-test-over-config">
  <title>Outline a field when config and test set themes</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-test-over-config","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-test-over-config.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input"}]}}'/></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": "capture-annotationdefaults-test-over-config",
      "annotationDefaults": {
        "color": "#0EA5E9",
        "strokeWidth": 4
      },
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "defaults-test-over-config.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotationdefaults-test-over-config
    annotationDefaults:
      color: "#0EA5E9"
      strokeWidth: 4
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: defaults-test-over-config.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
```

### Annotation `style` over test

**Varies:** `annotation.style over test.annotationDefaults` · **Value:** `{ "color": "#7C3AED" }` · **Effect:** the annotation's own purple `style` wins over the test's blue theme.

#### Prose

#### Markdown

**`prose.md`**

```markdown title="prose.md"
# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### MDX

**`prose.mdx`**

```mdx title="prose.mdx"
# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
2. The username field is outlined.
```

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Outline a field with its own style

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
. The username field is outlined.
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with its own style</title></head>
<body>
<h1>Outline a field with its own style</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li>
  <li>The username field is outlined.</li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Outline a field with its own style
==================================

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

#. The username field is outlined.
```

#### 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="capture-annotationdefaults-style-over-test">
  <title>Outline a field with its own style</title>
  <taskbody>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd></step>
      <step><cmd>The username field is outlined.</cmd></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

```markdown title="detected.md"
<!-- test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} -->

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

#### MDX

**`detected.mdx`**

```mdx title="detected.mdx"
{/* test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Outline a field with its own style

// (test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with its own style</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with its own style</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Outline a field with its own style
==================================

.. test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}}

.. 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="capture-annotationdefaults-style-over-test">
  <title>Outline a field with its own style</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":true,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

```markdown title="inline.md"
<!-- test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->

# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->
2. The username field is outlined.
   <!-- step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} -->

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

#### MDX

**`inline.mdx`**

```mdx title="inline.mdx"
{/* test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} */}

# Outline a field with its own style

1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).
   {/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}
2. The username field is outlined.
   {/* step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} */}

{/* test end */}
```

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Outline a field with its own style

// (test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}})

. Go to http://localhost:8092/enhanced-elements.html[the sample form].
+
// (step {"goTo":"http://localhost:8092/enhanced-elements.html"})
. The username field is outlined.
+
// (step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Outline a field with its own style</title></head>
<body>
<!-- test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}} -->
<h1>Outline a field with its own style</h1>
<ol>
  <li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.
    <!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} --></li>
  <li>The username field is outlined.
    <!-- step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Outline a field with its own style
==================================

.. test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}

#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.

   .. step {"goTo":"http://localhost:8092/enhanced-elements.html"}

#. The username field is outlined.

   .. step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}}

.. 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="capture-annotationdefaults-style-over-test">
  <title>Outline a field with its own style</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"capture-annotationdefaults-style-over-test","detectSteps":false,"annotationDefaults":{"color":"#0EA5E9","strokeWidth":4}}'/>
    <steps>
      <step><cmd>Go to <xref href="http://localhost:8092/enhanced-elements.html" scope="external" format="html">the sample form</xref>.</cmd>
        <info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/enhanced-elements.html"}'/></info></step>
      <step><cmd>The username field is outlined.</cmd>
        <info><data name="doc-detective" value='step {"screenshot":{"path":"defaults-style-over-test.png","directory":".dd-output","overwrite":"true","annotations":[{"outline":"#username-input","style":{"color":"#7C3AED"}}]}}'/></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": "capture-annotationdefaults-style-over-test",
      "annotationDefaults": {
        "color": "#0EA5E9",
        "strokeWidth": 4
      },
      "steps": [
        {
          "goTo": "http://localhost:8092/enhanced-elements.html"
        },
        {
          "screenshot": {
            "path": "defaults-style-over-test.png",
            "directory": ".dd-output",
            "overwrite": "true",
            "annotations": [
              {
                "outline": "#username-input",
                "style": {
                  "color": "#7C3AED"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```

#### 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: capture-annotationdefaults-style-over-test
    annotationDefaults:
      color: "#0EA5E9"
      strokeWidth: 4
    steps:
      - goTo: http://localhost:8092/enhanced-elements.html
      - screenshot:
          path: defaults-style-over-test.png
          directory: .dd-output
          overwrite: "true"
          annotations:
            - outline: "#username-input"
              style:
                color: "#7C3AED"
```