Screenshots and recordings, written as tests
Each example shows one procedure as prose, as detected tests, as inline tests, and as a standalone spec. For what each tab holds, see Navigation and interaction.
In a detected variant, a step statement holds each step that default detection can’t produce, such as a cropped screenshot or a record step. Each of those statements also works on its own, because a run with detection off reads only the statements. That’s why each detected variant also opens its page with a goTo statement.
The examples write their images and videos to a .dd-output folder next to the example files, and Git ignores that folder.
Take screenshots of a sign-in form
This procedure uses screenshot as a path and as an object with path, directory, maxVariation, overwrite, crop, and annotations. The test sets annotationDefaults and autoScreenshot.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The form opens.{.screenshot}3. Find the **Submit by ID** button at the top of the form.4. Fill in the sign-in fields in the order the numbers show.
# Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The form opens.<img src=".dd-output/capture-form.png" alt="The sample form" className="screenshot" />3. Find the **Submit by ID** button at the top of the form.4. Fill in the sign-in fields in the order the numbers show.
= Take screenshots of a sign-in form. Go to http://localhost:8092/enhanced-elements.html[the sample form].. The form opens.+image:.dd-output/capture-form.png[The sample form,role=screenshot]. Find the *Submit by ID* button at the top of the form.. Fill in the sign-in fields in the order the numbers show.
<!DOCTYPE html><html lang="en"><head><title>Take screenshots of a sign-in form</title></head><body><h1>Take screenshots of a sign-in form</h1><ol><li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li><li>The form opens.<img src=".dd-output/capture-form.png" alt="The sample form" class="screenshot"></li><li>Find the <strong>Submit by ID</strong> button at the top of the form.</li><li>Fill in the sign-in fields in the order the numbers show.</li></ol></body></html>
Take screenshots of a sign-in form==================================#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.#. The form opens... image:: .dd-output/capture-form.png:alt: The sample form:class: screenshot#. Find the **Submit by ID** button at the top of the form.#. Fill in the sign-in fields in the order the numbers show.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshots"><title>Take screenshots of a 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 form opens.</cmd><info><image href=".dd-output/capture-form.png" outputclass="screenshot"><alt>The sample form</alt></image></info></step><step><cmd>Find the <b>Submit by ID</b> button at the top of the form.</cmd></step><step><cmd>Fill in the sign-in fields in the order the numbers show.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} --># Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The form opens.{.screenshot}3. Find the **Submit by ID** button at the top of the form.<!-- step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} -->4. Fill in the sign-in fields in the order the numbers show.<!-- step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} --><!-- test end -->
{/* test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} */}# Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The form opens.<img src=".dd-output/capture-form.png" alt="The sample form" className="screenshot" />3. Find the **Submit by ID** button at the top of the form.{/* step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} */}4. Fill in the sign-in fields in the order the numbers show.{/* step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} */}{/* test end */}
= Take screenshots of a sign-in form// (test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The form opens.+image:.dd-output/capture-form.png[The sample form,role=screenshot]. Find the *Submit by ID* button at the top of the form.+// (step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}). Fill in the sign-in fields in the order the numbers show.+// (step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Take screenshots of a sign-in form</title></head><body><!-- test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} --><h1>Take screenshots of a 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 form opens.<img src=".dd-output/capture-form.png" alt="The sample form" class="screenshot"></li><li>Find the <strong>Submit by ID</strong> button at the top of the form.<!-- step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --></li><li>Fill in the sign-in fields in the order the numbers show.<!-- step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} --></li></ol><!-- test end --></body></html>
Take screenshots of a sign-in form==================================.. test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The form opens... image:: .dd-output/capture-form.png:alt: The sample form:class: screenshot#. Find the **Submit by ID** button at the top of the form... step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}#. Fill in the sign-in fields in the order the numbers show... step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshots"><title>Take screenshots of a sign-in form</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshots","detectSteps":true,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}'/><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 form opens.</cmd><info><image href=".dd-output/capture-form.png" outputclass="screenshot"><alt>The sample form</alt></image></info></step><step><cmd>Find the <b>Submit by ID</b> button at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}'/></info></step><step><cmd>Fill in the sign-in fields in the order the numbers show.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} --># Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The form opens.{.screenshot}<!-- step {"screenshot":".dd-output/capture-form.png"} -->3. Find the **Submit by ID** button at the top of the form.<!-- step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} -->4. Fill in the sign-in fields in the order the numbers show.<!-- step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} --><!-- test end -->
{/* test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} */}# Take screenshots of a sign-in form1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The form opens.<img src=".dd-output/capture-form.png" alt="The sample form" className="screenshot" />{/* step {"screenshot":".dd-output/capture-form.png"} */}3. Find the **Submit by ID** button at the top of the form.{/* step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} */}4. Fill in the sign-in fields in the order the numbers show.{/* step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} */}{/* test end */}
= Take screenshots of a sign-in form// (test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The form opens.+image:.dd-output/capture-form.png[The sample form,role=screenshot]+// (step {"screenshot":".dd-output/capture-form.png"}). Find the *Submit by ID* button at the top of the form.+// (step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}). Fill in the sign-in fields in the order the numbers show.+// (step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Take screenshots of a sign-in form</title></head><body><!-- test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}} --><h1>Take screenshots of a 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 form opens.<img src=".dd-output/capture-form.png" alt="The sample form" class="screenshot"><!-- step {"screenshot":".dd-output/capture-form.png"} --></li><li>Find the <strong>Submit by ID</strong> button at the top of the form.<!-- step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --></li><li>Fill in the sign-in fields in the order the numbers show.<!-- step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}} --></li></ol><!-- test end --></body></html>
Take screenshots of a sign-in form==================================.. test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The form opens... image:: .dd-output/capture-form.png:alt: The sample form:class: screenshot.. step {"screenshot":".dd-output/capture-form.png"}#. Find the **Submit by ID** button at the top of the form... step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}#. Fill in the sign-in fields in the order the numbers show... step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshots"><title>Take screenshots of a sign-in form</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshots","detectSteps":false,"autoScreenshot":true,"annotationDefaults":{"color":"#E11D48","strokeWidth":3,"badge":{"background":"#E11D48","color":"#FFFFFF"}}}'/><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 form opens.</cmd><info><image href=".dd-output/capture-form.png" outputclass="screenshot"><alt>The sample form</alt></image><data name="doc-detective" value='step {"screenshot":".dd-output/capture-form.png"}'/></info></step><step><cmd>Find the <b>Submit by ID</b> button at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-submit.png","directory":".dd-output","maxVariation":0.2,"overwrite":"aboveVariation","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}'/></info></step><step><cmd>Fill in the sign-in fields in the order the numbers show.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-sign-in.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#inputs-section","padding":10},"annotations":[{"badge":"#username-input","label":"1","position":{"offset":{"x":-6,"y":0}}},{"badge":{"elementTestId":"password-field","timeout":10000},"label":"2"},{"callout":"#username-input","label":"Your account name","position":"right","style":{"maxWidth":200,"fontSize":14,"background":"#0F172A","padding":6}},{"outline":{"elementAttribute":{"data-validation":"email-validator"}},"style":{"color":"#7C3AED","radius":4,"opacity":0.8}},{"outline":"#inputs-section h2"},{"blur":"[data-testid=password-field]","style":{"intensity":12}},{"arrow":"#inputs-section h2","position":{"x":420,"y":30}},{"arrow":{"position":{"x":40,"y":20}}},{"text":"#username-input","label":"Required","position":"bottom"},{"text":{"position":"bottom-right"},"label":"Sample data"}]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","autoScreenshot": true,"tests": [{"testId": "capture-screenshots","annotationDefaults": {"color": "#E11D48","strokeWidth": 3,"badge": {"background": "#E11D48","color": "#FFFFFF"}},"steps": [{"goTo": "http://localhost:8092/enhanced-elements.html"},{"screenshot": ".dd-output/capture-form.png"},{"screenshot": {"path": "capture-submit.png","directory": ".dd-output","maxVariation": 0.2,"overwrite": "aboveVariation","crop": {"elementText": "Submit by ID","padding": {"top": 8,"right": 16,"bottom": 8,"left": 16}}}},{"screenshot": {"path": "capture-sign-in.png","directory": ".dd-output","overwrite": "true","crop": {"selector": "#inputs-section","padding": 10},"annotations": [{"badge": "#username-input","label": "1","position": {"offset": {"x": -6,"y": 0}}},{"badge": {"elementTestId": "password-field","timeout": 10000},"label": "2"},{"callout": "#username-input","label": "Your account name","position": "right","style": {"maxWidth": 200,"fontSize": 14,"background": "#0F172A","padding": 6}},{"outline": {"elementAttribute": {"data-validation": "email-validator"}},"style": {"color": "#7C3AED","radius": 4,"opacity": 0.8}},{"outline": "#inputs-section h2"},{"blur": "[data-testid=password-field]","style": {"intensity": 12}},{"arrow": "#inputs-section h2","position": {"x": 420,"y": 30}},{"arrow": {"position": {"x": 40,"y": 20}}},{"text": "#username-input","label": "Required","position": "bottom"},{"text": {"position": "bottom-right"},"label": "Sample data"}]}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsonautoScreenshot: truetests:- testId: capture-screenshotsannotationDefaults:color: "#E11D48"strokeWidth: 3badge:background: "#E11D48"color: "#FFFFFF"steps:- goTo: http://localhost:8092/enhanced-elements.html- screenshot: .dd-output/capture-form.png- screenshot:path: capture-submit.pngdirectory: .dd-outputmaxVariation: 0.2overwrite: aboveVariationcrop:elementText: Submit by IDpadding:top: 8right: 16bottom: 8left: 16- screenshot:path: capture-sign-in.pngdirectory: .dd-outputoverwrite: "true"crop:selector: "#inputs-section"padding: 10annotations:- badge: "#username-input"label: "1"position:offset:x: -6y: 0- badge:elementTestId: password-fieldtimeout: 10000label: "2"- callout: "#username-input"label: Your account nameposition: rightstyle:maxWidth: 200fontSize: 14background: "#0F172A"padding: 6- outline:elementAttribute:data-validation: email-validatorstyle:color: "#7C3AED"radius: 4opacity: 0.8- outline: "#inputs-section h2"- blur: "[data-testid=password-field]"style:intensity: 12- arrow: "#inputs-section h2"position:x: 420y: 30- arrow:position:x: 40y: 20- text: "#username-input"label: Requiredposition: bottom- text:position: bottom-rightlabel: Sample data
What detection finds
An image with the screenshot class becomes a screenshot step that saves to the image’s path. Each format marks the class its own way:
| Format | Image with the screenshot class |
|---|---|
| Markdown | {.screenshot} |
| MDX | <img src="path.png" alt="The sample form" className="screenshot" /> |
| AsciiDoc | image:path.png[The sample form,role=screenshot] |
| HTML | <img src="path.png" alt="The sample form" class="screenshot"> |
| reStructuredText | .. image:: path.png with :class: screenshot |
| DITA | <image href="path.png" outputclass="screenshot"> |
The link also becomes a checkLink step, and the bold Submit by ID becomes a find step. The cropped and annotated screenshots are step statements, because detection only produces a screenshot of the whole viewport.
In AsciiDoc, the image inside a list item uses the inline image: macro. Detection doesn’t read a block image:: macro that follows a list continuation.
Screenshot forms in this example
| Step | What it does |
|---|---|
"screenshot": ".dd-output/capture-form.png" | Saves the viewport to the path. If a file is already there, compares against it with the default maxVariation of 0.05. |
crop with elementText and per-side padding | Saves only the Submit by ID button. maxVariation of 0.2 with overwrite set to aboveVariation replaces the reference only when more than 20% of the pixels change. |
crop with selector and a single padding | Saves the inputs section, then draws annotations on the image. overwrite set to true replaces the image on every run. |
The annotations cover every annotation type, and each type’s target as a selector string:
| Annotation | Target and placement |
|---|---|
badge | A selector string, nudged left with a position offset, and an elementTestId object with its own timeout. |
callout | A selector string, placed to the right with a named position. Its style sets maxWidth, fontSize, background, and padding. |
outline | A selector string, and an elementAttribute object whose style sets color, radius, and opacity. |
blur | A selector string. Its style sets the blur intensity. |
arrow | A selector string with a position point (x and y), and a target that’s only a point in the image. |
text | A selector string with the named position bottom, and a target that’s only a named region. |
annotationDefaults on the test sets the color for every annotation type and the badge colors, and an annotation’s own style wins over it. The example’s detected run also sets annotationDefaults and overwriteScreenshots in its config, in docs/docs-as-tests/examples/capture-screenshots/doc-detective.json. A test’s theme wins over the config’s, and overwriteScreenshots replaces every step’s overwrite.
The test sets autoScreenshot to true, so Doc Detective also saves a screenshot after every step to the run folder. The standalone specs set it on the spec, where it applies to every test in the file. A test’s own autoScreenshot overrides the spec’s.
Point out the controls on a toolbar
This procedure uses annotate to add, update, and clear annotations that stay on the page across steps, and a screenshot that shows them.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).2. Find the save button, marked 1, and the green check icon, outlined.3. The status line at the top is hidden, because it changes on every visit.4. Compare your toolbar with the screenshot.5. Next, find the check icon, now marked 2.6. That's every control on the toolbar.
# Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).2. Find the save button, marked 1, and the green check icon, outlined.3. The status line at the top is hidden, because it changes on every visit.4. Compare your toolbar with the screenshot.5. Next, find the check icon, now marked 2.6. That's every control on the toolbar.
= Point out the controls on a toolbar. Go to http://localhost:8092/find-image.html[the toolbar page].. Find the save button, marked 1, and the green check icon, outlined.. The status line at the top is hidden, because it changes on every visit.. Compare your toolbar with the screenshot.. Next, find the check icon, now marked 2.. That's every control on the toolbar.
<!DOCTYPE html><html lang="en"><head><title>Point out the controls on a toolbar</title></head><body><h1>Point out the controls on a toolbar</h1><ol><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.</li><li>Find the save button, marked 1, and the green check icon, outlined.</li><li>The status line at the top is hidden, because it changes on every visit.</li><li>Compare your toolbar with the screenshot.</li><li>Next, find the check icon, now marked 2.</li><li>That's every control on the toolbar.</li></ol></body></html>
Point out the controls on a toolbar===================================#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_.#. Find the save button, marked 1, and the green check icon, outlined.#. The status line at the top is hidden, because it changes on every visit.#. Compare your toolbar with the screenshot.#. Next, find the check icon, now marked 2.#. That's every control on the toolbar.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-annotate"><title>Point out the controls on a toolbar</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd></step><step><cmd>Find the save button, marked 1, and the green check icon, outlined.</cmd></step><step><cmd>The status line at the top is hidden, because it changes on every visit.</cmd></step><step><cmd>Compare your toolbar with the screenshot.</cmd></step><step><cmd>Next, find the check icon, now marked 2.</cmd></step><step><cmd>That's every control on the toolbar.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} --># Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).<!-- step {"goTo":"http://localhost:8092/find-image.html"} -->2. Find the save button, marked 1, and the green check icon, outlined.<!-- step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} -->3. The status line at the top is hidden, because it changes on every visit.<!-- step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} -->4. Compare your toolbar with the screenshot.<!-- step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} -->5. Next, find the check icon, now marked 2.<!-- step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} --><!-- step {"annotate":{"clear":["hint"]}} -->6. That's every control on the toolbar.<!-- step {"annotate":{"clear":true}} --><!-- test end -->
{/* test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} */}# Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).{/* step {"goTo":"http://localhost:8092/find-image.html"} */}2. Find the save button, marked 1, and the green check icon, outlined.{/* step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} */}3. The status line at the top is hidden, because it changes on every visit.{/* step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} */}4. Compare your toolbar with the screenshot.{/* step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} */}5. Next, find the check icon, now marked 2.{/* step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} */}{/* step {"annotate":{"clear":["hint"]}} */}6. That's every control on the toolbar.{/* step {"annotate":{"clear":true}} */}{/* test end */}
= Point out the controls on a toolbar// (test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}). Go to http://localhost:8092/find-image.html[the toolbar page].+// (step {"goTo":"http://localhost:8092/find-image.html"}). Find the save button, marked 1, and the green check icon, outlined.+// (step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}). The status line at the top is hidden, because it changes on every visit.+// (step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}). Compare your toolbar with the screenshot.+// (step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}). Next, find the check icon, now marked 2.+// (step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}})+// (step {"annotate":{"clear":["hint"]}}). That's every control on the toolbar.+// (step {"annotate":{"clear":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Point out the controls on a toolbar</title></head><body><!-- test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} --><h1>Point out the controls on a toolbar</h1><ol><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.<!-- step {"goTo":"http://localhost:8092/find-image.html"} --></li><li>Find the save button, marked 1, and the green check icon, outlined.<!-- step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} --></li><li>The status line at the top is hidden, because it changes on every visit.<!-- step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} --></li><li>Compare your toolbar with the screenshot.<!-- step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} --></li><li>Next, find the check icon, now marked 2.<!-- step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} --><!-- step {"annotate":{"clear":["hint"]}} --></li><li>That's every control on the toolbar.<!-- step {"annotate":{"clear":true}} --></li></ol><!-- test end --></body></html>
Point out the controls on a toolbar===================================.. test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_... step {"goTo":"http://localhost:8092/find-image.html"}#. Find the save button, marked 1, and the green check icon, outlined... step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}#. The status line at the top is hidden, because it changes on every visit... step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}#. Compare your toolbar with the screenshot... step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}#. Next, find the check icon, now marked 2... step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}}.. step {"annotate":{"clear":["hint"]}}#. That's every control on the toolbar... step {"annotate":{"clear":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-annotate"><title>Point out the controls on a toolbar</title><taskbody><data name="doc-detective" value='test {"testId":"capture-annotate","detectSteps":true,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-image.html"}'/></info></step><step><cmd>Find the save button, marked 1, and the green check icon, outlined.</cmd><info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}'/></info></step><step><cmd>The status line at the top is hidden, because it changes on every visit.</cmd><info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}'/></info></step><step><cmd>Compare your toolbar with the screenshot.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}'/></info></step><step><cmd>Next, find the check icon, now marked 2.</cmd><info><data name="doc-detective" value='step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}}'/><data name="doc-detective" value='step {"annotate":{"clear":["hint"]}}'/></info></step><step><cmd>That's every control on the toolbar.</cmd><info><data name="doc-detective" value='step {"annotate":{"clear":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} --># Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).<!-- step {"goTo":"http://localhost:8092/find-image.html"} -->2. Find the save button, marked 1, and the green check icon, outlined.<!-- step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} -->3. The status line at the top is hidden, because it changes on every visit.<!-- step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} -->4. Compare your toolbar with the screenshot.<!-- step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} -->5. Next, find the check icon, now marked 2.<!-- step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} --><!-- step {"annotate":{"clear":["hint"]}} -->6. That's every control on the toolbar.<!-- step {"annotate":{"clear":true}} --><!-- test end -->
{/* test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} */}# Point out the controls on a toolbar1. Go to [the toolbar page](http://localhost:8092/find-image.html).{/* step {"goTo":"http://localhost:8092/find-image.html"} */}2. Find the save button, marked 1, and the green check icon, outlined.{/* step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} */}3. The status line at the top is hidden, because it changes on every visit.{/* step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} */}4. Compare your toolbar with the screenshot.{/* step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} */}5. Next, find the check icon, now marked 2.{/* step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} */}{/* step {"annotate":{"clear":["hint"]}} */}6. That's every control on the toolbar.{/* step {"annotate":{"clear":true}} */}{/* test end */}
= Point out the controls on a toolbar// (test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}). Go to http://localhost:8092/find-image.html[the toolbar page].+// (step {"goTo":"http://localhost:8092/find-image.html"}). Find the save button, marked 1, and the green check icon, outlined.+// (step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}). The status line at the top is hidden, because it changes on every visit.+// (step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}). Compare your toolbar with the screenshot.+// (step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}). Next, find the check icon, now marked 2.+// (step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}})+// (step {"annotate":{"clear":["hint"]}}). That's every control on the toolbar.+// (step {"annotate":{"clear":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Point out the controls on a toolbar</title></head><body><!-- test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}} --><h1>Point out the controls on a toolbar</h1><ol><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.<!-- step {"goTo":"http://localhost:8092/find-image.html"} --></li><li>Find the save button, marked 1, and the green check icon, outlined.<!-- step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}} --></li><li>The status line at the top is hidden, because it changes on every visit.<!-- step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}} --></li><li>Compare your toolbar with the screenshot.<!-- step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}} --></li><li>Next, find the check icon, now marked 2.<!-- step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}} --><!-- step {"annotate":{"clear":["hint"]}} --></li><li>That's every control on the toolbar.<!-- step {"annotate":{"clear":true}} --></li></ol><!-- test end --></body></html>
Point out the controls on a toolbar===================================.. test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_... step {"goTo":"http://localhost:8092/find-image.html"}#. Find the save button, marked 1, and the green check icon, outlined... step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}#. The status line at the top is hidden, because it changes on every visit... step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}#. Compare your toolbar with the screenshot... step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}#. Next, find the check icon, now marked 2... step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}}.. step {"annotate":{"clear":["hint"]}}#. That's every control on the toolbar... step {"annotate":{"clear":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-annotate"><title>Point out the controls on a toolbar</title><taskbody><data name="doc-detective" value='test {"testId":"capture-annotate","detectSteps":false,"autoScreenshot":false,"annotationDefaults":{"fontSize":14,"background":"#1E293B","opacity":0.9,"radius":6,"padding":4,"maxWidth":240,"intensity":16,"callout":{"background":"#0F172A","color":"#FDE047"},"transition":{"enter":"fade","exit":"fade","durationMs":250}}}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-image.html"}'/></info></step><step><cmd>Find the save button, marked 1, and the green check icon, outlined.</cmd><info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"save-badge","badge":"#save","label":"1"},{"id":"check-outline","outline":{"elementImage":{"path":"check-icon.svg","threshold":0.9},"timeout":10000},"track":true,"transition":{"enter":"draw","durationMs":300}},{"id":"hint","callout":{"elementId":"save"},"label":"Saves your work","position":"bottom","transition":{"enter":"fade","exit":"fade","durationMs":200}},{"id":"banner","text":{"position":"top-right"},"label":"Sample toolbar","duration":3000}]}}'/></info></step><step><cmd>The status line at the top is hidden, because it changes on every visit.</cmd><info><data name="doc-detective" value='step {"annotate":{"add":[{"id":"redact","blur":{"selector":"#status span"},"all":true,"transition":{"enter":"none"}}]}}'/></info></step><step><cmd>Compare your toolbar with the screenshot.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-toolbar.png","directory":".dd-output","overwrite":"true"}}'/></info></step><step><cmd>Next, find the check icon, now marked 2.</cmd><info><data name="doc-detective" value='step {"annotate":{"update":[{"id":"save-badge","badge":"#check","label":"2"}]}}'/><data name="doc-detective" value='step {"annotate":{"clear":["hint"]}}'/></info></step><step><cmd>That's every control on the toolbar.</cmd><info><data name="doc-detective" value='step {"annotate":{"clear":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","annotationDefaults": {"fontSize": 14,"background": "#1E293B","opacity": 0.9,"radius": 6,"padding": 4,"maxWidth": 240,"intensity": 16,"callout": {"background": "#0F172A","color": "#FDE047"},"transition": {"enter": "fade","exit": "fade","durationMs": 250}},"tests": [{"testId": "capture-annotate","autoScreenshot": false,"steps": [{"goTo": "http://localhost:8092/find-image.html"},{"annotate": {"add": [{"id": "save-badge","badge": "#save","label": "1"},{"id": "check-outline","outline": {"elementImage": {"path": "check-icon.svg","threshold": 0.9},"timeout": 10000},"track": true,"transition": {"enter": "draw","durationMs": 300}},{"id": "hint","callout": {"elementId": "save"},"label": "Saves your work","position": "bottom","transition": {"enter": "fade","exit": "fade","durationMs": 200}},{"id": "banner","text": {"position": "top-right"},"label": "Sample toolbar","duration": 3000}]}},{"annotate": {"add": [{"id": "redact","blur": {"selector": "#status span"},"all": true,"transition": {"enter": "none"}}]}},{"screenshot": {"path": "capture-toolbar.png","directory": ".dd-output","overwrite": "true"}},{"annotate": {"update": [{"id": "save-badge","badge": "#check","label": "2"}]}},{"annotate": {"clear": ["hint"]}},{"annotate": {"clear": true}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsonannotationDefaults:fontSize: 14background: "#1E293B"opacity: 0.9radius: 6padding: 4maxWidth: 240intensity: 16callout:background: "#0F172A"color: "#FDE047"transition:enter: fadeexit: fadedurationMs: 250tests:- testId: capture-annotateautoScreenshot: falsesteps:- goTo: http://localhost:8092/find-image.html- annotate:add:- id: save-badgebadge: "#save"label: "1"- id: check-outlineoutline:elementImage:path: check-icon.svgthreshold: 0.9timeout: 10000track: truetransition:enter: drawdurationMs: 300- id: hintcallout:elementId: savelabel: Saves your workposition: bottomtransition:enter: fadeexit: fadedurationMs: 200- id: bannertext:position: top-rightlabel: Sample toolbarduration: 3000- annotate:add:- id: redactblur:selector: "#status span"all: truetransition:enter: none- screenshot:path: capture-toolbar.pngdirectory: .dd-outputoverwrite: "true"- annotate:update:- id: save-badgebadge: "#check"label: "2"- annotate:clear:- hint- annotate:clear: true
Annotations in this example
| Annotation | Fields |
|---|---|
save-badge | A badge on a selector string. The update step moves it to the check icon and changes its label. |
check-outline | An outline on an elementImage target, check-icon.svg in the example folder, with a threshold and a timeout. track keeps it on the icon if the page moves, and the draw transition sets how it appears. |
hint | A callout on an elementId with a position and fade transitions. clear with a list of ids removes it. |
banner | A text box in the top-right region that clears itself after a duration of 3000 milliseconds. |
redact | A blur with all, so it hides every match, and the none transition, so the hidden text never shows. |
clear set to true removes every annotation that’s left. The test’s annotationDefaults sets the font size, a background, opacity, radius, padding, maxWidth, and blur intensity for every type, the callout colors, and a default transition. The standalone specs set annotationDefaults on the spec instead, where it applies to every test in the file. A test’s theme wins over the spec’s. It sets autoScreenshot to false, so the run saves only the screenshot the procedure asks for.
track, transition, and duration change how annotations behave in a recording. A screenshot shows each annotation at the moment the screenshot is taken.
What detection finds
The link becomes a goTo step and a checkLink step. No default rule produces annotate or a screenshot without an image, so those are statements in every detected variant.
Record a walkthrough
This procedure uses record as true, as a path, and as an object with path, directory, name, surface, engine, overwrite, checkpoints, and verify. It stops recordings with stopRecord by name, with a name object, and with true, after a wait so each video has something in it.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Record a walkthrough## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).2. Start recording the tab.3. Click **Type here:**.4. Type "Hello, Doc Detective".5. Wait a moment, then stop the recording.6. Record a few seconds more with the default settings.## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).2. Start a screen recording.3. Click **Type here:**.4. Type "Recorded on screen".5. Wait a moment, then stop the recording.6. Record only the browser window.7. Record only the page, and compare each step with the last run.8. Record the screen again with the default ffmpeg settings.9. Record a short clip of the result.10. Wait a second, then stop the clip.
# Record a walkthrough## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).2. Start recording the tab.3. Click **Type here:**.4. Type "Hello, Doc Detective".5. Wait a moment, then stop the recording.6. Record a few seconds more with the default settings.## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).2. Start a screen recording.3. Click **Type here:**.4. Type "Recorded on screen".5. Wait a moment, then stop the recording.6. Record only the browser window.7. Record only the page, and compare each step with the last run.8. Record the screen again with the default ffmpeg settings.9. Record a short clip of the result.10. Wait a second, then stop the clip.
= Record a walkthrough== Record the browser tab. Go to http://localhost:8092/type-echo.html[the type echo page].. Start recording the tab.. Click *Type here:*.. Type "Hello, Doc Detective".. Wait a moment, then stop the recording.. Record a few seconds more with the default settings.== Record the screen. Go to http://localhost:8092/type-echo.html[the type echo page].. Start a screen recording.. Click *Type here:*.. Type "Recorded on screen".. Wait a moment, then stop the recording.. Record only the browser window.. Record only the page, and compare each step with the last run.. Record the screen again with the default ffmpeg settings.. Record a short clip of the result.. Wait a second, then stop the clip.
<!DOCTYPE html><html lang="en"><head><title>Record a walkthrough</title></head><body><h1>Record a walkthrough</h1><h2>Record the browser tab</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li><li>Start recording the tab.</li><li>Click <strong>Type here:</strong>.</li><li>Type "Hello, Doc Detective".</li><li>Wait a moment, then stop the recording.</li><li>Record a few seconds more with the default settings.</li></ol><h2>Record the screen</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.</li><li>Start a screen recording.</li><li>Click <strong>Type here:</strong>.</li><li>Type "Recorded on screen".</li><li>Wait a moment, then stop the recording.</li><li>Record only the browser window.</li><li>Record only the page, and compare each step with the last run.</li><li>Record the screen again with the default ffmpeg settings.</li><li>Record a short clip of the result.</li><li>Wait a second, then stop the clip.</li></ol></body></html>
Record a walkthrough====================Record the browser tab----------------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.#. Start recording the tab.#. Click **Type here:**.#. Type "Hello, Doc Detective".#. Wait a moment, then stop the recording.#. Record a few seconds more with the default settings.Record the screen-----------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_.#. Start a screen recording.#. Click **Type here:**.#. Type "Recorded on screen".#. Wait a moment, then stop the recording.#. Record only the browser window.#. Record only the page, and compare each step with the last run.#. Record the screen again with the default ffmpeg settings.#. Record a short clip of the result.#. Wait a second, then stop the clip.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-recording"><title>Record a walkthrough</title><taskbody/><task id="capture-record-tab"><title>Record the browser tab</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step><step><cmd>Start recording the tab.</cmd></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step><step><cmd>Type "Hello, Doc Detective".</cmd></step><step><cmd>Wait a moment, then stop the recording.</cmd></step><step><cmd>Record a few seconds more with the default settings.</cmd></step></steps></taskbody></task><task id="capture-record-screen"><title>Record the screen</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd></step><step><cmd>Start a screen recording.</cmd></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step><step><cmd>Type "Recorded on screen".</cmd></step><step><cmd>Wait a moment, then stop the recording.</cmd></step><step><cmd>Record only the browser window.</cmd></step><step><cmd>Record only the page, and compare each step with the last run.</cmd></step><step><cmd>Record the screen again with the default ffmpeg settings.</cmd></step><step><cmd>Record a short clip of the result.</cmd></step><step><cmd>Wait a second, then stop the clip.</cmd></step></steps></taskbody></task></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Record a walkthrough<!-- test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} -->## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).<!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->2. Start recording the tab.<!-- step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} -->3. Click **Type here:**.4. Type "Hello, Doc Detective".5. Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":{"name":"walkthrough"}} -->6. Record a few seconds more with the default settings.<!-- step {"record":true} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --><!-- test end --><!-- test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} -->## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).<!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->2. Start a screen recording.<!-- step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} -->3. Click **Type here:**.4. Type "Recorded on screen".5. Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":"screen"} -->6. Record only the browser window.<!-- step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->7. Record only the page, and compare each step with the last run.<!-- step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->8. Record the screen again with the default ffmpeg settings.<!-- step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->9. Record a short clip of the result.<!-- step {"record":".dd-output/capture-quick.gif"} -->10. Wait a second, then stop the clip.<!-- step {"wait":1000} --><!-- step {"stopRecord":true} --><!-- test end -->
# Record a walkthrough{/* test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} */}## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).{/* step {"goTo":"http://localhost:8092/type-echo.html"} */}2. Start recording the tab.{/* step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} */}3. Click **Type here:**.4. Type "Hello, Doc Detective".5. Wait a moment, then stop the recording.{/* step {"wait":1000} */}{/* step {"stopRecord":{"name":"walkthrough"}} */}6. Record a few seconds more with the default settings.{/* step {"record":true} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}{/* test end */}{/* test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} */}## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).{/* step {"goTo":"http://localhost:8092/type-echo.html"} */}2. Start a screen recording.{/* step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} */}3. Click **Type here:**.4. Type "Recorded on screen".5. Wait a moment, then stop the recording.{/* step {"wait":1000} */}{/* step {"stopRecord":"screen"} */}6. Record only the browser window.{/* step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}7. Record only the page, and compare each step with the last run.{/* step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}8. Record the screen again with the default ffmpeg settings.{/* step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}9. Record a short clip of the result.{/* step {"record":".dd-output/capture-quick.gif"} */}10. Wait a second, then stop the clip.{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}{/* test end */}
= Record a walkthrough// (test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]})== Record the browser tab. Go to http://localhost:8092/type-echo.html[the type echo page].+// (step {"goTo":"http://localhost:8092/type-echo.html"}). Start recording the tab.+// (step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}). Click *Type here:*.. Type "Hello, Doc Detective".. Wait a moment, then stop the recording.+// (step {"wait":1000})+// (step {"stopRecord":{"name":"walkthrough"}}). Record a few seconds more with the default settings.+// (step {"record":true})+// (step {"wait":1000})+// (step {"stopRecord":true})// (test end)// (test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]})== Record the screen. Go to http://localhost:8092/type-echo.html[the type echo page].+// (step {"goTo":"http://localhost:8092/type-echo.html"}). Start a screen recording.+// (step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}). Click *Type here:*.. Type "Recorded on screen".. Wait a moment, then stop the recording.+// (step {"wait":1000})+// (step {"stopRecord":"screen"}). Record only the browser window.+// (step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record only the page, and compare each step with the last run.+// (step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record the screen again with the default ffmpeg settings.+// (step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record a short clip of the result.+// (step {"record":".dd-output/capture-quick.gif"}). Wait a second, then stop the clip.+// (step {"wait":1000})+// (step {"stopRecord":true})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Record a walkthrough</title></head><body><h1>Record a walkthrough</h1><!-- test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} --><h2>Record the browser tab</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.<!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li><li>Start recording the tab.<!-- step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} --></li><li>Click <strong>Type here:</strong>.</li><li>Type "Hello, Doc Detective".</li><li>Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":{"name":"walkthrough"}} --></li><li>Record a few seconds more with the default settings.<!-- step {"record":true} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li></ol><!-- test end --><!-- test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --><h2>Record the screen</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.<!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li><li>Start a screen recording.<!-- step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} --></li><li>Click <strong>Type here:</strong>.</li><li>Type "Recorded on screen".</li><li>Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":"screen"} --></li><li>Record only the browser window.<!-- step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record only the page, and compare each step with the last run.<!-- step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record the screen again with the default ffmpeg settings.<!-- step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record a short clip of the result.<!-- step {"record":".dd-output/capture-quick.gif"} --></li><li>Wait a second, then stop the clip.<!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li></ol><!-- test end --></body></html>
Record a walkthrough====================.. test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]}Record the browser tab----------------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_... step {"goTo":"http://localhost:8092/type-echo.html"}#. Start recording the tab... step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}#. Click **Type here:**.#. Type "Hello, Doc Detective".#. Wait a moment, then stop the recording... step {"wait":1000}.. step {"stopRecord":{"name":"walkthrough"}}#. Record a few seconds more with the default settings... step {"record":true}.. step {"wait":1000}.. step {"stopRecord":true}.. test end.. test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}Record the screen-----------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_... step {"goTo":"http://localhost:8092/type-echo.html"}#. Start a screen recording... step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}#. Click **Type here:**.#. Type "Recorded on screen".#. Wait a moment, then stop the recording... step {"wait":1000}.. step {"stopRecord":"screen"}#. Record only the browser window... step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record only the page, and compare each step with the last run... step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record the screen again with the default ffmpeg settings... step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record a short clip of the result... step {"record":".dd-output/capture-quick.gif"}#. Wait a second, then stop the clip... step {"wait":1000}.. step {"stopRecord":true}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-recording"><title>Record a walkthrough</title><taskbody/><task id="capture-record-tab"><title>Record the browser tab</title><taskbody><data name="doc-detective" value='test {"testId":"capture-record-tab","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step><step><cmd>Start recording the tab.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}'/></info></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step><step><cmd>Type "Hello, Doc Detective".</cmd></step><step><cmd>Wait a moment, then stop the recording.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":{"name":"walkthrough"}}'/></info></step><step><cmd>Record a few seconds more with the default settings.</cmd><info><data name="doc-detective" value='step {"record":true}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="capture-record-screen"><title>Record the screen</title><taskbody><data name="doc-detective" value='test {"testId":"capture-record-screen","detectSteps":true,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step><step><cmd>Start a screen recording.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}'/></info></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd></step><step><cmd>Type "Recorded on screen".</cmd></step><step><cmd>Wait a moment, then stop the recording.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":"screen"}'/></info></step><step><cmd>Record only the browser window.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record only the page, and compare each step with the last run.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record the screen again with the default ffmpeg settings.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record a short clip of the result.</cmd><info><data name="doc-detective" value='step {"record":".dd-output/capture-quick.gif"}'/></info></step><step><cmd>Wait a second, then stop the clip.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Record a walkthrough<!-- test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} -->## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).<!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->2. Start recording the tab.<!-- step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} -->3. Click **Type here:**.<!-- step {"click":"Type here:"} -->4. Type "Hello, Doc Detective".<!-- step {"type":"Hello, Doc Detective"} -->5. Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":{"name":"walkthrough"}} -->6. Record a few seconds more with the default settings.<!-- step {"record":true} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --><!-- test end --><!-- test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} -->## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).<!-- step {"goTo":"http://localhost:8092/type-echo.html"} -->2. Start a screen recording.<!-- step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} -->3. Click **Type here:**.<!-- step {"click":"Type here:"} -->4. Type "Recorded on screen".<!-- step {"type":"Recorded on screen"} -->5. Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":"screen"} -->6. Record only the browser window.<!-- step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->7. Record only the page, and compare each step with the last run.<!-- step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->8. Record the screen again with the default ffmpeg settings.<!-- step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} -->9. Record a short clip of the result.<!-- step {"record":".dd-output/capture-quick.gif"} -->10. Wait a second, then stop the clip.<!-- step {"wait":1000} --><!-- step {"stopRecord":true} --><!-- test end -->
# Record a walkthrough{/* test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} */}## Record the browser tab1. Go to [the type echo page](http://localhost:8092/type-echo.html).{/* step {"goTo":"http://localhost:8092/type-echo.html"} */}2. Start recording the tab.{/* step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} */}3. Click **Type here:**.{/* step {"click":"Type here:"} */}4. Type "Hello, Doc Detective".{/* step {"type":"Hello, Doc Detective"} */}5. Wait a moment, then stop the recording.{/* step {"wait":1000} */}{/* step {"stopRecord":{"name":"walkthrough"}} */}6. Record a few seconds more with the default settings.{/* step {"record":true} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}{/* test end */}{/* test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} */}## Record the screen1. Go to [the type echo page](http://localhost:8092/type-echo.html).{/* step {"goTo":"http://localhost:8092/type-echo.html"} */}2. Start a screen recording.{/* step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} */}3. Click **Type here:**.{/* step {"click":"Type here:"} */}4. Type "Recorded on screen".{/* step {"type":"Recorded on screen"} */}5. Wait a moment, then stop the recording.{/* step {"wait":1000} */}{/* step {"stopRecord":"screen"} */}6. Record only the browser window.{/* step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}7. Record only the page, and compare each step with the last run.{/* step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}8. Record the screen again with the default ffmpeg settings.{/* step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} */}{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}9. Record a short clip of the result.{/* step {"record":".dd-output/capture-quick.gif"} */}10. Wait a second, then stop the clip.{/* step {"wait":1000} */}{/* step {"stopRecord":true} */}{/* test end */}
= Record a walkthrough// (test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]})== Record the browser tab. Go to http://localhost:8092/type-echo.html[the type echo page].+// (step {"goTo":"http://localhost:8092/type-echo.html"}). Start recording the tab.+// (step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}). Click *Type here:*.+// (step {"click":"Type here:"}). Type "Hello, Doc Detective".+// (step {"type":"Hello, Doc Detective"}). Wait a moment, then stop the recording.+// (step {"wait":1000})+// (step {"stopRecord":{"name":"walkthrough"}}). Record a few seconds more with the default settings.+// (step {"record":true})+// (step {"wait":1000})+// (step {"stopRecord":true})// (test end)// (test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]})== Record the screen. Go to http://localhost:8092/type-echo.html[the type echo page].+// (step {"goTo":"http://localhost:8092/type-echo.html"}). Start a screen recording.+// (step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}). Click *Type here:*.+// (step {"click":"Type here:"}). Type "Recorded on screen".+// (step {"type":"Recorded on screen"}). Wait a moment, then stop the recording.+// (step {"wait":1000})+// (step {"stopRecord":"screen"}). Record only the browser window.+// (step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record only the page, and compare each step with the last run.+// (step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record the screen again with the default ffmpeg settings.+// (step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}})+// (step {"wait":1000})+// (step {"stopRecord":true}). Record a short clip of the result.+// (step {"record":".dd-output/capture-quick.gif"}). Wait a second, then stop the clip.+// (step {"wait":1000})+// (step {"stopRecord":true})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Record a walkthrough</title></head><body><h1>Record a walkthrough</h1><!-- test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]} --><h2>Record the browser tab</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.<!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li><li>Start recording the tab.<!-- step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}} --></li><li>Click <strong>Type here:</strong>.<!-- step {"click":"Type here:"} --></li><li>Type "Hello, Doc Detective".<!-- step {"type":"Hello, Doc Detective"} --></li><li>Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":{"name":"walkthrough"}} --></li><li>Record a few seconds more with the default settings.<!-- step {"record":true} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li></ol><!-- test end --><!-- test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --><h2>Record the screen</h2><ol><li>Go to <a href="http://localhost:8092/type-echo.html">the type echo page</a>.<!-- step {"goTo":"http://localhost:8092/type-echo.html"} --></li><li>Start a screen recording.<!-- step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}} --></li><li>Click <strong>Type here:</strong>.<!-- step {"click":"Type here:"} --></li><li>Type "Recorded on screen".<!-- step {"type":"Recorded on screen"} --></li><li>Wait a moment, then stop the recording.<!-- step {"wait":1000} --><!-- step {"stopRecord":"screen"} --></li><li>Record only the browser window.<!-- step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record only the page, and compare each step with the last run.<!-- step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record the screen again with the default ffmpeg settings.<!-- step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}} --><!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li><li>Record a short clip of the result.<!-- step {"record":".dd-output/capture-quick.gif"} --></li><li>Wait a second, then stop the clip.<!-- step {"wait":1000} --><!-- step {"stopRecord":true} --></li></ol><!-- test end --></body></html>
Record a walkthrough====================.. test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]}Record the browser tab----------------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_... step {"goTo":"http://localhost:8092/type-echo.html"}#. Start recording the tab... step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}#. Click **Type here:**... step {"click":"Type here:"}#. Type "Hello, Doc Detective"... step {"type":"Hello, Doc Detective"}#. Wait a moment, then stop the recording... step {"wait":1000}.. step {"stopRecord":{"name":"walkthrough"}}#. Record a few seconds more with the default settings... step {"record":true}.. step {"wait":1000}.. step {"stopRecord":true}.. test end.. test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}Record the screen-----------------#. Go to `the type echo page <http://localhost:8092/type-echo.html>`_... step {"goTo":"http://localhost:8092/type-echo.html"}#. Start a screen recording... step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}#. Click **Type here:**... step {"click":"Type here:"}#. Type "Recorded on screen"... step {"type":"Recorded on screen"}#. Wait a moment, then stop the recording... step {"wait":1000}.. step {"stopRecord":"screen"}#. Record only the browser window... step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record only the page, and compare each step with the last run... step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record the screen again with the default ffmpeg settings... step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}}.. step {"wait":1000}.. step {"stopRecord":true}#. Record a short clip of the result... step {"record":".dd-output/capture-quick.gif"}#. Wait a second, then stop the clip... step {"wait":1000}.. step {"stopRecord":true}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-recording"><title>Record a walkthrough</title><taskbody/><task id="capture-record-tab"><title>Record the browser tab</title><taskbody><data name="doc-detective" value='test {"testId":"capture-record-tab","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}},{"platforms":["linux"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step><step><cmd>Start recording the tab.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-walkthrough.webm","directory":".dd-output","name":"walkthrough","engine":"browser","overwrite":"true","checkpoints":{"maxVariation":0.5,"directory":".dd-output/walkthrough-checkpoints"},"surface":{"browser":"chrome"},"verify":{"minDuration":0.5,"maxDuration":120,"notBlack":true,"resolution":true}}}'/></info></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd><info><data name="doc-detective" value='step {"click":"Type here:"}'/></info></step><step><cmd>Type "Hello, Doc Detective".</cmd><info><data name="doc-detective" value='step {"type":"Hello, Doc Detective"}'/></info></step><step><cmd>Wait a moment, then stop the recording.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":{"name":"walkthrough"}}'/></info></step><step><cmd>Record a few seconds more with the default settings.</cmd><info><data name="doc-detective" value='step {"record":true}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="capture-record-screen"><title>Record the screen</title><taskbody><data name="doc-detective" value='test {"testId":"capture-record-screen","detectSteps":false,"autoRecord":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/type-echo.html" scope="external" format="html">the type echo page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/type-echo.html"}'/></info></step><step><cmd>Start a screen recording.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-screen.mp4","directory":".dd-output","name":"screen","engine":{"name":"ffmpeg","target":"display","fps":15},"overwrite":"true"}}'/></info></step><step><cmd>Click <uicontrol>Type here:</uicontrol>.</cmd><info><data name="doc-detective" value='step {"click":"Type here:"}'/></info></step><step><cmd>Type "Recorded on screen".</cmd><info><data name="doc-detective" value='step {"type":"Recorded on screen"}'/></info></step><step><cmd>Wait a moment, then stop the recording.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":"screen"}'/></info></step><step><cmd>Record only the browser window.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-window.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"window"},"overwrite":"true"}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record only the page, and compare each step with the last run.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-viewport.mp4","directory":".dd-output","engine":{"name":"ffmpeg","target":"viewport"},"overwrite":"true","checkpoints":true}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record the screen again with the default ffmpeg settings.</cmd><info><data name="doc-detective" value='step {"record":{"path":"capture-ffmpeg.mp4","directory":".dd-output","engine":"ffmpeg","overwrite":"true"}}'/><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step><step><cmd>Record a short clip of the result.</cmd><info><data name="doc-detective" value='step {"record":".dd-output/capture-quick.gif"}'/></info></step><step><cmd>Wait a second, then stop the clip.</cmd><info><data name="doc-detective" value='step {"wait":1000}'/><data name="doc-detective" value='step {"stopRecord":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","autoRecord": false,"tests": [{"testId": "capture-record-tab","runOn": [{"platforms": ["windows","mac"],"browsers": {"name": "chrome","headless": false}},{"platforms": ["linux"],"browsers": {"name": "chrome","headless": true}}],"steps": [{"goTo": "http://localhost:8092/type-echo.html"},{"record": {"path": "capture-walkthrough.webm","directory": ".dd-output","name": "walkthrough","engine": "browser","overwrite": "true","checkpoints": {"maxVariation": 0.5,"directory": ".dd-output/walkthrough-checkpoints"},"surface": {"browser": "chrome"},"verify": {"minDuration": 0.5,"maxDuration": 120,"notBlack": true,"resolution": true}}},{"click": "Type here:"},{"type": "Hello, Doc Detective"},{"wait": 1000},{"stopRecord": {"name": "walkthrough"}},{"record": true},{"wait": 1000},{"stopRecord": true}]},{"testId": "capture-record-screen","runOn": [{"platforms": ["windows","mac"],"browsers": {"name": "chrome","headless": false}}],"steps": [{"goTo": "http://localhost:8092/type-echo.html"},{"record": {"path": "capture-screen.mp4","directory": ".dd-output","name": "screen","engine": {"name": "ffmpeg","target": "display","fps": 15},"overwrite": "true"}},{"click": "Type here:"},{"type": "Recorded on screen"},{"wait": 1000},{"stopRecord": "screen"},{"record": {"path": "capture-window.mp4","directory": ".dd-output","engine": {"name": "ffmpeg","target": "window"},"overwrite": "true"}},{"wait": 1000},{"stopRecord": true},{"record": {"path": "capture-viewport.mp4","directory": ".dd-output","engine": {"name": "ffmpeg","target": "viewport"},"overwrite": "true","checkpoints": true}},{"wait": 1000},{"stopRecord": true},{"record": {"path": "capture-ffmpeg.mp4","directory": ".dd-output","engine": "ffmpeg","overwrite": "true"}},{"wait": 1000},{"stopRecord": true},{"record": ".dd-output/capture-quick.gif"},{"wait": 1000},{"stopRecord": true}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsonautoRecord: falsetests:- testId: capture-record-tabrunOn:- platforms:- windows- macbrowsers:name: chromeheadless: false- platforms:- linuxbrowsers:name: chromeheadless: truesteps:- goTo: http://localhost:8092/type-echo.html- record:path: capture-walkthrough.webmdirectory: .dd-outputname: walkthroughengine: browseroverwrite: "true"checkpoints:maxVariation: 0.5directory: .dd-output/walkthrough-checkpointssurface:browser: chromeverify:minDuration: 0.5maxDuration: 120notBlack: trueresolution: true- click: "Type here:"- type: Hello, Doc Detective- wait: 1000- stopRecord:name: walkthrough- record: true- wait: 1000- stopRecord: true- testId: capture-record-screenrunOn:- platforms:- windows- macbrowsers:name: chromeheadless: falsesteps:- goTo: http://localhost:8092/type-echo.html- record:path: capture-screen.mp4directory: .dd-outputname: screenengine:name: ffmpegtarget: displayfps: 15overwrite: "true"- click: "Type here:"- type: Recorded on screen- wait: 1000- stopRecord: screen- record:path: capture-window.mp4directory: .dd-outputengine:name: ffmpegtarget: windowoverwrite: "true"- wait: 1000- stopRecord: true- record:path: capture-viewport.mp4directory: .dd-outputengine:name: ffmpegtarget: viewportoverwrite: "true"checkpoints: true- wait: 1000- stopRecord: true- record:path: capture-ffmpeg.mp4directory: .dd-outputengine: ffmpegoverwrite: "true"- wait: 1000- stopRecord: true- record: .dd-output/capture-quick.gif- wait: 1000- stopRecord: true
Where each test runs
Recording the screen needs a display, so each test sets runOn:
| Test | Runs on | Elsewhere |
|---|---|---|
| Record the browser tab | Headed Chrome on Windows and macOS, and headless Chrome on Linux | SKIPPED |
| Record the screen | Headed Chrome on Windows and macOS | SKIPPED |
The browser engine records the Chrome tab in a headed or a headless browser. The ffmpeg engine records the screen, so it needs a headed browser.
Recording forms in this example
| Step | What it does |
|---|---|
record with name, surface, engine browser, checkpoints, and verify | Records the Chrome tab to capture-walkthrough.webm. checkpoints saves a screenshot after each step and compares it with the last run’s. verify fails the stop step if the video is shorter than half a second, longer than two minutes, or black. With resolution set to true, it also fails if the video isn’t the tab’s size. |
"stopRecord": { "name": "walkthrough" } | Stops the recording named walkthrough. |
"record": true | Records to <stepId>.mp4 in outputDir, with the engine Doc Detective picks for the context. |
record with name and an engine object, target display | Records the whole screen to capture-screen.mp4 with ffmpeg at 15 frames a second. |
"stopRecord": "screen" | Stops the recording named screen. |
engine object with target window | Records only the active window. |
engine object with target viewport, and "checkpoints": true | Records only the browser’s content area. It compares a screenshot after each step with the last run’s, with the default settings. |
"engine": "ffmpeg" | Records with ffmpeg and its default target, the whole screen. |
"record": ".dd-output/capture-quick.gif" | Records a GIF. With no overwrite, it skips the recording when the file already exists. |
"stopRecord": true | Stops the most recent recording. |
Every test sets autoRecord to false, so the run records only what the procedure asks for. The standalone specs set it once on the spec.
The detected, inline, and standalone variants write the same files. The first run of the GIF step writes capture-quick.gif, and later runs skip that step, which doesn’t fail the test. "record": true also skips when its file exists.
What detection finds
The link becomes a goTo step and a checkLink step. Type here: after “Click” becomes a click step and a find step, and the quoted text after “Type” becomes a type step. No default rule produces record, wait, or stopRecord, so those are statements in every detected variant.
Check pages for visual changes
This procedure compares new screenshot images with reference images. It uses threshold, maxDiffPixels, and mask to ignore what changes on every visit, crop as a selector string, surface, style, stable, animations, and fullPage. It also compares against a reference image at a URL, and takes a screenshot with true.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced. Those times change on every visit.3. The billing panel sits at the top of the page.4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).5. With the cookie banner hidden, the page shows only its content.6. With the banner showing, it covers the bottom of the page.7. Go to [the long page](http://localhost:8092/screenshot-tall.html).8. Scroll to the red box at the bottom of the page.9. Go to [the toolbar page](http://localhost:8092/find-image.html).10. Compare the sample chart with the published chart image.
# Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced. Those times change on every visit.3. The billing panel sits at the top of the page.4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).5. With the cookie banner hidden, the page shows only its content.6. With the banner showing, it covers the bottom of the page.7. Go to [the long page](http://localhost:8092/screenshot-tall.html).8. Scroll to the red box at the bottom of the page.9. Go to [the toolbar page](http://localhost:8092/find-image.html).10. Compare the sample chart with the published chart image.
= Check pages for visual changes. Go to http://localhost:8092/mask.html[the billing page].. The page shows the next invoice date and when the account last synced. Those times change on every visit.. The billing panel sits at the top of the page.. Go to http://localhost:8092/screenshot-banner.html[the banner page].. With the cookie banner hidden, the page shows only its content.. With the banner showing, it covers the bottom of the page.. Go to http://localhost:8092/screenshot-tall.html[the long page].. Scroll to the red box at the bottom of the page.. Go to http://localhost:8092/find-image.html[the toolbar page].. Compare the sample chart with the published chart image.
<!DOCTYPE html><html lang="en"><head><title>Check pages for visual changes</title></head><body><h1>Check pages for visual changes</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.</li><li>The page shows the next invoice date and when the account last synced. Those times change on every visit.</li><li>The billing panel sits at the top of the page.</li><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>With the cookie banner hidden, the page shows only its content.</li><li>With the banner showing, it covers the bottom of the page.</li><li>Go to <a href="http://localhost:8092/screenshot-tall.html">the long page</a>.</li><li>Scroll to the red box at the bottom of the page.</li><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.</li><li>Compare the sample chart with the published chart image.</li></ol></body></html>
Check pages for visual changes==============================#. Go to `the billing page <http://localhost:8092/mask.html>`_.#. The page shows the next invoice date and when the account last synced. Those times change on every visit.#. The billing panel sits at the top of the page.#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. With the cookie banner hidden, the page shows only its content.#. With the banner showing, it covers the bottom of the page.#. Go to `the long page <http://localhost:8092/screenshot-tall.html>`_.#. Scroll to the red box at the bottom of the page.#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_.#. Compare the sample chart with the published chart image.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-visual-checks"><title>Check pages for visual changes</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd></step><step><cmd>The page shows the next invoice date and when the account last synced. Those times change on every visit.</cmd></step><step><cmd>The billing panel sits at the top of the page.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>With the cookie banner hidden, the page shows only its content.</cmd></step><step><cmd>With the banner showing, it covers the bottom of the page.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-tall.html" scope="external" format="html">the long page</xref>.</cmd></step><step><cmd>Scroll to the red box at the bottom of the page.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd></step><step><cmd>Compare the sample chart with the published chart image.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} --># Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced. Those times change on every visit.<!-- step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} -->3. The billing panel sits at the top of the page.<!-- step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} -->4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->5. With the cookie banner hidden, the page shows only its content.<!-- step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} -->6. With the banner showing, it covers the bottom of the page.<!-- step {"screenshot":true} -->7. Go to [the long page](http://localhost:8092/screenshot-tall.html).<!-- step {"goTo":"http://localhost:8092/screenshot-tall.html"} -->8. Scroll to the red box at the bottom of the page.<!-- step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} -->9. Go to [the toolbar page](http://localhost:8092/find-image.html).<!-- step {"goTo":"http://localhost:8092/find-image.html"} -->10. Compare the sample chart with the published chart image.<!-- step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} --><!-- test end -->
{/* test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} */}# Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced. Those times change on every visit.{/* step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} */}3. The billing panel sits at the top of the page.{/* step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} */}4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}5. With the cookie banner hidden, the page shows only its content.{/* step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} */}6. With the banner showing, it covers the bottom of the page.{/* step {"screenshot":true} */}7. Go to [the long page](http://localhost:8092/screenshot-tall.html).{/* step {"goTo":"http://localhost:8092/screenshot-tall.html"} */}8. Scroll to the red box at the bottom of the page.{/* step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} */}9. Go to [the toolbar page](http://localhost:8092/find-image.html).{/* step {"goTo":"http://localhost:8092/find-image.html"} */}10. Compare the sample chart with the published chart image.{/* step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} */}{/* test end */}
= Check pages for visual changes// (test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced. Those times change on every visit.+// (step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}). The billing panel sits at the top of the page.+// (step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). With the cookie banner hidden, the page shows only its content.+// (step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}). With the banner showing, it covers the bottom of the page.+// (step {"screenshot":true}). Go to http://localhost:8092/screenshot-tall.html[the long page].+// (step {"goTo":"http://localhost:8092/screenshot-tall.html"}). Scroll to the red box at the bottom of the page.+// (step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}). Go to http://localhost:8092/find-image.html[the toolbar page].+// (step {"goTo":"http://localhost:8092/find-image.html"}). Compare the sample chart with the published chart image.+// (step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check pages for visual changes</title></head><body><!-- test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} --><h1>Check pages for visual changes</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced. Those times change on every visit.<!-- step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} --></li><li>The billing panel sits at the top of the page.<!-- step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} --></li><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>With the cookie banner hidden, the page shows only its content.<!-- step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} --></li><li>With the banner showing, it covers the bottom of the page.<!-- step {"screenshot":true} --></li><li>Go to <a href="http://localhost:8092/screenshot-tall.html">the long page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-tall.html"} --></li><li>Scroll to the red box at the bottom of the page.<!-- step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} --></li><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.<!-- step {"goTo":"http://localhost:8092/find-image.html"} --></li><li>Compare the sample chart with the published chart image.<!-- step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} --></li></ol><!-- test end --></body></html>
Check pages for visual changes==============================.. test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced. Those times change on every visit... step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}#. The billing panel sits at the top of the page... step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. With the cookie banner hidden, the page shows only its content... step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}#. With the banner showing, it covers the bottom of the page... step {"screenshot":true}#. Go to `the long page <http://localhost:8092/screenshot-tall.html>`_... step {"goTo":"http://localhost:8092/screenshot-tall.html"}#. Scroll to the red box at the bottom of the page... step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_... step {"goTo":"http://localhost:8092/find-image.html"}#. Compare the sample chart with the published chart image... step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-visual-checks"><title>Check pages for visual changes</title><taskbody><data name="doc-detective" value='test {"testId":"capture-visual-checks","detectSteps":true,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced. Those times change on every visit.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}'/></info></step><step><cmd>The billing panel sits at the top of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>With the cookie banner hidden, the page shows only its content.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}'/></info></step><step><cmd>With the banner showing, it covers the bottom of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":true}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-tall.html" scope="external" format="html">the long page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-tall.html"}'/></info></step><step><cmd>Scroll to the red box at the bottom of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-image.html"}'/></info></step><step><cmd>Compare the sample chart with the published chart image.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} --># Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced. Those times change on every visit.<!-- step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} -->3. The billing panel sits at the top of the page.<!-- step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} -->4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->5. With the cookie banner hidden, the page shows only its content.<!-- step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} -->6. With the banner showing, it covers the bottom of the page.<!-- step {"screenshot":true} -->7. Go to [the long page](http://localhost:8092/screenshot-tall.html).<!-- step {"goTo":"http://localhost:8092/screenshot-tall.html"} -->8. Scroll to the red box at the bottom of the page.<!-- step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} -->9. Go to [the toolbar page](http://localhost:8092/find-image.html).<!-- step {"goTo":"http://localhost:8092/find-image.html"} -->10. Compare the sample chart with the published chart image.<!-- step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} --><!-- test end -->
{/* test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} */}# Check pages for visual changes1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced. Those times change on every visit.{/* step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} */}3. The billing panel sits at the top of the page.{/* step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} */}4. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}5. With the cookie banner hidden, the page shows only its content.{/* step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} */}6. With the banner showing, it covers the bottom of the page.{/* step {"screenshot":true} */}7. Go to [the long page](http://localhost:8092/screenshot-tall.html).{/* step {"goTo":"http://localhost:8092/screenshot-tall.html"} */}8. Scroll to the red box at the bottom of the page.{/* step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} */}9. Go to [the toolbar page](http://localhost:8092/find-image.html).{/* step {"goTo":"http://localhost:8092/find-image.html"} */}10. Compare the sample chart with the published chart image.{/* step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} */}{/* test end */}
= Check pages for visual changes// (test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced. Those times change on every visit.+// (step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}). The billing panel sits at the top of the page.+// (step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). With the cookie banner hidden, the page shows only its content.+// (step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}). With the banner showing, it covers the bottom of the page.+// (step {"screenshot":true}). Go to http://localhost:8092/screenshot-tall.html[the long page].+// (step {"goTo":"http://localhost:8092/screenshot-tall.html"}). Scroll to the red box at the bottom of the page.+// (step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}). Go to http://localhost:8092/find-image.html[the toolbar page].+// (step {"goTo":"http://localhost:8092/find-image.html"}). Compare the sample chart with the published chart image.+// (step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check pages for visual changes</title></head><body><!-- test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]} --><h1>Check pages for visual changes</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced. Those times change on every visit.<!-- step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}} --></li><li>The billing panel sits at the top of the page.<!-- step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}} --></li><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>With the cookie banner hidden, the page shows only its content.<!-- step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}} --></li><li>With the banner showing, it covers the bottom of the page.<!-- step {"screenshot":true} --></li><li>Go to <a href="http://localhost:8092/screenshot-tall.html">the long page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-tall.html"} --></li><li>Scroll to the red box at the bottom of the page.<!-- step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}} --></li><li>Go to <a href="http://localhost:8092/find-image.html">the toolbar page</a>.<!-- step {"goTo":"http://localhost:8092/find-image.html"} --></li><li>Compare the sample chart with the published chart image.<!-- step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}} --></li></ol><!-- test end --></body></html>
Check pages for visual changes==============================.. test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced. Those times change on every visit... step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}#. The billing panel sits at the top of the page... step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. With the cookie banner hidden, the page shows only its content... step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}#. With the banner showing, it covers the bottom of the page... step {"screenshot":true}#. Go to `the long page <http://localhost:8092/screenshot-tall.html>`_... step {"goTo":"http://localhost:8092/screenshot-tall.html"}#. Scroll to the red box at the bottom of the page... step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}#. Go to `the toolbar page <http://localhost:8092/find-image.html>`_... step {"goTo":"http://localhost:8092/find-image.html"}#. Compare the sample chart with the published chart image... step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-visual-checks"><title>Check pages for visual changes</title><taskbody><data name="doc-detective" value='test {"testId":"capture-visual-checks","detectSteps":false,"runOn":[{"platforms":["windows","mac","linux"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced. Those times change on every visit.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-billing.png","directory":".dd-output","maxVariation":0.05,"threshold":0.2,"maxDiffPixels":500,"mask":["#clock",{"selector":".stamp"}]}}'/></info></step><step><cmd>The billing panel sits at the top of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-panel.png","directory":".dd-output","overwrite":"true","crop":"#panel"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>With the cookie banner hidden, the page shows only its content.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-content.png","directory":".dd-output","overwrite":"true","surface":"chrome","style":".cookie-banner { visibility: hidden !important; }","stable":true,"animations":"disabled"}}'/></info></step><step><cmd>With the banner showing, it covers the bottom of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":true}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/screenshot-tall.html" scope="external" format="html">the long page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-tall.html"}'/></info></step><step><cmd>Scroll to the red box at the bottom of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"capture-tall.png","directory":".dd-output","overwrite":"true","fullPage":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/find-image.html" scope="external" format="html">the toolbar page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/find-image.html"}'/></info></step><step><cmd>Compare the sample chart with the published chart image.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"http://localhost:8092/find-image-chart.png","crop":"#sample-chart","maxVariation":0.2}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-visual-checks","runOn": [{"platforms": ["windows","mac","linux"],"browsers": {"name": "chrome","headless": true}}],"steps": [{"goTo": "http://localhost:8092/mask.html"},{"screenshot": {"path": "capture-billing.png","directory": ".dd-output","maxVariation": 0.05,"threshold": 0.2,"maxDiffPixels": 500,"mask": ["#clock",{"selector": ".stamp"}]}},{"screenshot": {"path": "capture-panel.png","directory": ".dd-output","overwrite": "true","crop": "#panel"}},{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "capture-content.png","directory": ".dd-output","overwrite": "true","surface": "chrome","style": ".cookie-banner { visibility: hidden !important; }","stable": true,"animations": "disabled"}},{"screenshot": true},{"goTo": "http://localhost:8092/screenshot-tall.html"},{"screenshot": {"path": "capture-tall.png","directory": ".dd-output","overwrite": "true","fullPage": true}},{"goTo": "http://localhost:8092/find-image.html"},{"screenshot": {"path": "http://localhost:8092/find-image-chart.png","crop": "#sample-chart","maxVariation": 0.2}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-visual-checksrunOn:- platforms:- windows- mac- linuxbrowsers:name: chromeheadless: truesteps:- goTo: http://localhost:8092/mask.html- screenshot:path: capture-billing.pngdirectory: .dd-outputmaxVariation: 0.05threshold: 0.2maxDiffPixels: 500mask:- "#clock"- selector: .stamp- screenshot:path: capture-panel.pngdirectory: .dd-outputoverwrite: "true"crop: "#panel"- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: capture-content.pngdirectory: .dd-outputoverwrite: "true"surface: chromestyle: ".cookie-banner { visibility: hidden !important; }"stable: trueanimations: disabled- screenshot: true- goTo: http://localhost:8092/screenshot-tall.html- screenshot:path: capture-tall.pngdirectory: .dd-outputoverwrite: "true"fullPage: true- goTo: http://localhost:8092/find-image.html- screenshot:path: http://localhost:8092/find-image-chart.pngcrop: "#sample-chart"maxVariation: 0.2
Screenshot options in this example
| Step | What it does |
|---|---|
mask with a selector string and a selector object | Paints #clock and every .stamp element the same color in both images before comparing, so the times that change on every visit don’t count. threshold sets how different a pixel’s color must be to count as changed, and maxDiffPixels caps the changed pixels alongside maxVariation. |
"crop": "#panel" | Saves only the element that matches the selector or display text. |
surface, style, stable, and animations | Takes the screenshot in the chrome browser surface with the cookie banner hidden by CSS. It waits until two images in a row match, and stops animations while it takes the screenshot. |
"fullPage": true | Saves the whole page, including the parts you scroll to, not only the viewport. |
path set to a URL | Compares the chart on the page with find-image-chart.png on the test server. Doc Detective never writes to a URL reference, so the new image goes to the run folder. |
"screenshot": true | Saves the viewport to <stepId>.png in outputDir. |
The test runs in headless Chrome on Windows, macOS, and Linux. The first run of the masked step has no reference to compare with, so it saves one. Later runs compare with it.
What detection finds
Each link becomes a goTo step and a checkLink step. No default rule produces these screenshot options, so the screenshots are statements in every detected variant.
Permutations
Each example below varies one setting, so you can compare it with its neighbors. For the full procedures that combine them, see the sections above. For the other options, see Annotation options and Recording options.
screenshot permutations
Each example opens a test-server page and takes one screenshot. The pages whose content keeps changing open with a goTo that doesn’t wait for the page to stop changing.
String path
Varies: screenshot · Value: ".dd-output/banner.png" · Effect: saves the viewport to the path, and compares it with the file already there, if any.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot to a path. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot to a path</title></head><body><h1>Save a screenshot to a path</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot to a path===========================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-string"><title>Save a screenshot to a path</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-string","detectSteps":true} --># Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":".dd-output/banner.png"} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-string","detectSteps":true} */}# Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":".dd-output/banner.png"} */}{/* test end */}
= Save a screenshot to a path// (test {"testId":"capture-screenshot-form-string","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":".dd-output/banner.png"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot to a path</title></head><body><!-- test {"testId":"capture-screenshot-form-string","detectSteps":true} --><h1>Save a screenshot to a path</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":".dd-output/banner.png"} --></li></ol><!-- test end --></body></html>
Save a screenshot to a path===========================.. test {"testId":"capture-screenshot-form-string","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":".dd-output/banner.png"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-string"><title>Save a screenshot to a path</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-string","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":".dd-output/banner.png"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-string","detectSteps":false} --># Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":".dd-output/banner.png"} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-string","detectSteps":false} */}# Save a screenshot to a path1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":".dd-output/banner.png"} */}{/* test end */}
= Save a screenshot to a path// (test {"testId":"capture-screenshot-form-string","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":".dd-output/banner.png"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot to a path</title></head><body><!-- test {"testId":"capture-screenshot-form-string","detectSteps":false} --><h1>Save a screenshot to a path</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":".dd-output/banner.png"} --></li></ol><!-- test end --></body></html>
Save a screenshot to a path===========================.. test {"testId":"capture-screenshot-form-string","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":".dd-output/banner.png"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-string"><title>Save a screenshot to a path</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-string","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":".dd-output/banner.png"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-form-string","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": ".dd-output/banner.png"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-form-stringsteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot: .dd-output/banner.png
Object with path and directory
Varies: screenshot · Value: { "path", "directory" } · Effect: saves the viewport to banner.png in the .dd-output folder.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot with a path and a folder. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with a path and a folder</title></head><body><h1>Save a screenshot with a path and a folder</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot with a path and a folder==========================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-object"><title>Save a screenshot with a path and a folder</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-object","detectSteps":true} --># Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"banner.png","directory":".dd-output"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-object","detectSteps":true} */}# Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"banner.png","directory":".dd-output"}} */}{/* test end */}
= Save a screenshot with a path and a folder// (test {"testId":"capture-screenshot-form-object","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"banner.png","directory":".dd-output"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with a path and a folder</title></head><body><!-- test {"testId":"capture-screenshot-form-object","detectSteps":true} --><h1>Save a screenshot with a path and a folder</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"banner.png","directory":".dd-output"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with a path and a folder==========================================.. test {"testId":"capture-screenshot-form-object","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"banner.png","directory":".dd-output"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-object"><title>Save a screenshot with a path and a folder</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-object","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"banner.png","directory":".dd-output"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-object","detectSteps":false} --># Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"banner.png","directory":".dd-output"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-object","detectSteps":false} */}# Save a screenshot with a path and a folder1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"banner.png","directory":".dd-output"}} */}{/* test end */}
= Save a screenshot with a path and a folder// (test {"testId":"capture-screenshot-form-object","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"banner.png","directory":".dd-output"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with a path and a folder</title></head><body><!-- test {"testId":"capture-screenshot-form-object","detectSteps":false} --><h1>Save a screenshot with a path and a folder</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"banner.png","directory":".dd-output"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with a path and a folder==========================================.. test {"testId":"capture-screenshot-form-object","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"banner.png","directory":".dd-output"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-object"><title>Save a screenshot with a path and a folder</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-object","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"banner.png","directory":".dd-output"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-form-object","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "banner.png","directory": ".dd-output"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-form-objectsteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: banner.pngdirectory: .dd-output
true
Varies: screenshot · Value: true · Effect: saves the viewport to <stepId>.png in outputDir.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot with the default name. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with the default name</title></head><body><h1>Save a screenshot with the default name</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot with the default name=======================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-true"><title>Save a screenshot with the default name</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-true","detectSteps":true} --># Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":true} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-true","detectSteps":true} */}# Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":true} */}{/* test end */}
= Save a screenshot with the default name// (test {"testId":"capture-screenshot-form-true","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":true})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with the default name</title></head><body><!-- test {"testId":"capture-screenshot-form-true","detectSteps":true} --><h1>Save a screenshot with the default name</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":true} --></li></ol><!-- test end --></body></html>
Save a screenshot with the default name=======================================.. test {"testId":"capture-screenshot-form-true","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":true}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-true"><title>Save a screenshot with the default name</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-true","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-form-true","detectSteps":false} --># Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":true} --><!-- test end -->
{/* test {"testId":"capture-screenshot-form-true","detectSteps":false} */}# Save a screenshot with the default name1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":true} */}{/* test end */}
= Save a screenshot with the default name// (test {"testId":"capture-screenshot-form-true","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":true})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with the default name</title></head><body><!-- test {"testId":"capture-screenshot-form-true","detectSteps":false} --><h1>Save a screenshot with the default name</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":true} --></li></ol><!-- test end --></body></html>
Save a screenshot with the default name=======================================.. test {"testId":"capture-screenshot-form-true","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":true}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-form-true"><title>Save a screenshot with the default name</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-form-true","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":true}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-form-true","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": true}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-form-truesteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot: true
overwrite: "true"
Varies: screenshot.overwrite · Value: "true" · Effect: replaces the saved image on every run without comparing.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot with overwrite true. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite true</title></head><body><h1>Save a screenshot with overwrite true</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot with overwrite true=====================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-true"><title>Save a screenshot with overwrite true</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-true","detectSteps":true} --># Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-true","detectSteps":true} */}# Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} */}{/* test end */}
= Save a screenshot with overwrite true// (test {"testId":"capture-screenshot-overwrite-true","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite true</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-true","detectSteps":true} --><h1>Save a screenshot with overwrite true</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite true=====================================.. test {"testId":"capture-screenshot-overwrite-true","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-true"><title>Save a screenshot with overwrite true</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-true","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-true","detectSteps":false} --># Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-true","detectSteps":false} */}# Save a screenshot with overwrite true1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} */}{/* test end */}
= Save a screenshot with overwrite true// (test {"testId":"capture-screenshot-overwrite-true","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite true</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-true","detectSteps":false} --><h1>Save a screenshot with overwrite true</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite true=====================================.. test {"testId":"capture-screenshot-overwrite-true","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-true"><title>Save a screenshot with overwrite true</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-true","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-true.png","directory":".dd-output","overwrite":"true"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-overwrite-true","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "overwrite-true.png","directory": ".dd-output","overwrite": "true"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-overwrite-truesteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: overwrite-true.pngdirectory: .dd-outputoverwrite: "true"
overwrite: "false"
Varies: screenshot.overwrite · Value: "false" · Effect: keeps the saved image, and skips the step when the file already exists.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot with overwrite false. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite false</title></head><body><h1>Save a screenshot with overwrite false</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot with overwrite false======================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-false"><title>Save a screenshot with overwrite false</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-false","detectSteps":true} --># Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-false","detectSteps":true} */}# Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} */}{/* test end */}
= Save a screenshot with overwrite false// (test {"testId":"capture-screenshot-overwrite-false","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite false</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-false","detectSteps":true} --><h1>Save a screenshot with overwrite false</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite false======================================.. test {"testId":"capture-screenshot-overwrite-false","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-false"><title>Save a screenshot with overwrite false</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-false","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-false","detectSteps":false} --># Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-false","detectSteps":false} */}# Save a screenshot with overwrite false1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} */}{/* test end */}
= Save a screenshot with overwrite false// (test {"testId":"capture-screenshot-overwrite-false","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite false</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-false","detectSteps":false} --><h1>Save a screenshot with overwrite false</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite false======================================.. test {"testId":"capture-screenshot-overwrite-false","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-false"><title>Save a screenshot with overwrite false</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-false","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-false.png","directory":".dd-output","overwrite":"false"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-overwrite-false","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "overwrite-false.png","directory": ".dd-output","overwrite": "false"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-overwrite-falsesteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: overwrite-false.pngdirectory: .dd-outputoverwrite: "false"
overwrite: "aboveVariation"
Varies: screenshot.overwrite · Value: "aboveVariation" · Effect: replaces the saved image only when the new one differs by more than maxVariation.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Save a screenshot with overwrite aboveVariation. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite aboveVariation</title></head><body><h1>Save a screenshot with overwrite aboveVariation</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Save a screenshot with overwrite aboveVariation===============================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-abovevariation"><title>Save a screenshot with overwrite aboveVariation</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true} --># Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true} */}# Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} */}{/* test end */}
= Save a screenshot with overwrite aboveVariation// (test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite aboveVariation</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true} --><h1>Save a screenshot with overwrite aboveVariation</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite aboveVariation===============================================.. test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-abovevariation"><title>Save a screenshot with overwrite aboveVariation</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false} --># Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false} */}# Save a screenshot with overwrite aboveVariation1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} */}{/* test end */}
= Save a screenshot with overwrite aboveVariation// (test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot with overwrite aboveVariation</title></head><body><!-- test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false} --><h1>Save a screenshot with overwrite aboveVariation</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Save a screenshot with overwrite aboveVariation===============================================.. test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-overwrite-abovevariation"><title>Save a screenshot with overwrite aboveVariation</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-overwrite-abovevariation","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"overwrite-aboveVariation.png","directory":".dd-output","overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-overwrite-abovevariation","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "overwrite-aboveVariation.png","directory": ".dd-output","overwrite": "aboveVariation"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-overwrite-abovevariationsteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: overwrite-aboveVariation.pngdirectory: .dd-outputoverwrite: aboveVariation
maxVariation: 0.01
Varies: screenshot.maxVariation · Value: 0.01 · Effect: warns when more than 1% of the pixels differ from the saved image.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Compare a screenshot with low tolerance. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with low tolerance</title></head><body><h1>Compare a screenshot with low tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Compare a screenshot with low tolerance=======================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-low"><title>Compare a screenshot with low tolerance</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true} --># Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true} */}# Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} */}{/* test end */}
= Compare a screenshot with low tolerance// (test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with low tolerance</title></head><body><!-- test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true} --><h1>Compare a screenshot with low tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with low tolerance=======================================.. test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-low"><title>Compare a screenshot with low tolerance</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-maxvariation-low","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false} --># Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false} */}# Compare a screenshot with low tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} */}{/* test end */}
= Compare a screenshot with low tolerance// (test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with low tolerance</title></head><body><!-- test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false} --><h1>Compare a screenshot with low tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with low tolerance=======================================.. test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-low"><title>Compare a screenshot with low tolerance</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-maxvariation-low","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"maxvariation-low.png","directory":".dd-output","maxVariation":0.01,"overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-maxvariation-low","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "maxvariation-low.png","directory": ".dd-output","maxVariation": 0.01,"overwrite": "aboveVariation"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-maxvariation-lowsteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: maxvariation-low.pngdirectory: .dd-outputmaxVariation: 0.01overwrite: aboveVariation
maxVariation: 0.5
Varies: screenshot.maxVariation · Value: 0.5 · Effect: warns only when more than half of the pixels differ from the saved image.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
# Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.
= Compare a screenshot with high tolerance. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with high tolerance</title></head><body><h1>Compare a screenshot with high tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.</li></ol></body></html>
Compare a screenshot with high tolerance========================================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-high"><title>Compare a screenshot with high tolerance</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true} --># Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true} */}# Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} */}{/* test end */}
= Compare a screenshot with high tolerance// (test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with high tolerance</title></head><body><!-- test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true} --><h1>Compare a screenshot with high tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with high tolerance========================================.. test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-high"><title>Compare a screenshot with high tolerance</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-maxvariation-high","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false} --># Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false} */}# Compare a screenshot with high tolerance1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.{/* step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} */}{/* test end */}
= Compare a screenshot with high tolerance// (test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+// (step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with high tolerance</title></head><body><!-- test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false} --><h1>Compare a screenshot with high tolerance</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<!-- step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with high tolerance========================================.. test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-maxvariation-high"><title>Compare a screenshot with high tolerance</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-maxvariation-high","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"maxvariation-high.png","directory":".dd-output","maxVariation":0.5,"overwrite":"aboveVariation"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-maxvariation-high","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": {"path": "maxvariation-high.png","directory": ".dd-output","maxVariation": 0.5,"overwrite": "aboveVariation"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-maxvariation-highsteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot:path: maxvariation-high.pngdirectory: .dd-outputmaxVariation: 0.5overwrite: aboveVariation
crop as a string
Varies: screenshot.crop · Value: "#submit-button" · Effect: saves only the element that matches the selector or display text.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
# Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
= Save a screenshot of one button. Go to http://localhost:8092/enhanced-elements.html[the sample form].. The *Submit by ID* button is at the top of the form.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button</title></head><body><h1>Save a screenshot of one button</h1><ol><li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li><li>The <strong>Submit by ID</strong> button is at the top of the form.</li></ol></body></html>
Save a screenshot of one button===============================#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.#. The **Submit by ID** button is at the top of the form.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-string"><title>Save a screenshot of one button</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 <b>Submit by ID</b> button is at the top of the form.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-string","detectSteps":true} --># Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-string","detectSteps":true} */}# Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} */}{/* test end */}
= Save a screenshot of one button// (test {"testId":"capture-screenshot-crop-string","detectSteps":true}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button</title></head><body><!-- test {"testId":"capture-screenshot-crop-string","detectSteps":true} --><h1>Save a screenshot of one button</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button===============================.. test {"testId":"capture-screenshot-crop-string","detectSteps":true}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-string"><title>Save a screenshot of one button</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-string","detectSteps":false} --># Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-string","detectSteps":false} */}# Save a screenshot of one button1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} */}{/* test end */}
= Save a screenshot of one button// (test {"testId":"capture-screenshot-crop-string","detectSteps":false}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button</title></head><body><!-- test {"testId":"capture-screenshot-crop-string","detectSteps":false} --><h1>Save a screenshot of one button</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button===============================.. test {"testId":"capture-screenshot-crop-string","detectSteps":false}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-string"><title>Save a screenshot of one button</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-string.png","directory":".dd-output","overwrite":"true","crop":"#submit-button"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-crop-string","steps": [{"goTo": "http://localhost:8092/enhanced-elements.html"},{"screenshot": {"path": "crop-string.png","directory": ".dd-output","overwrite": "true","crop": "#submit-button"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-crop-stringsteps:- goTo: http://localhost:8092/enhanced-elements.html- screenshot:path: crop-string.pngdirectory: .dd-outputoverwrite: "true"crop: "#submit-button"
crop.padding as a number
Varies: screenshot.crop.padding · Value: 10 · Effect: adds 10 pixels on every side of the element.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
# Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
= Save a screenshot of one button with even padding. Go to http://localhost:8092/enhanced-elements.html[the sample form].. The *Submit by ID* button is at the top of the form.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with even padding</title></head><body><h1>Save a screenshot of one button with even padding</h1><ol><li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li><li>The <strong>Submit by ID</strong> button is at the top of the form.</li></ol></body></html>
Save a screenshot of one button with even padding=================================================#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.#. The **Submit by ID** button is at the top of the form.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-number"><title>Save a screenshot of one button with even padding</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 <b>Submit by ID</b> button is at the top of the form.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-padding-number","detectSteps":true} --># Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-padding-number","detectSteps":true} */}# Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} */}{/* test end */}
= Save a screenshot of one button with even padding// (test {"testId":"capture-screenshot-crop-padding-number","detectSteps":true}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with even padding</title></head><body><!-- test {"testId":"capture-screenshot-crop-padding-number","detectSteps":true} --><h1>Save a screenshot of one button with even padding</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button with even padding=================================================.. test {"testId":"capture-screenshot-crop-padding-number","detectSteps":true}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-number"><title>Save a screenshot of one button with even padding</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-padding-number","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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-padding-number","detectSteps":false} --># Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-padding-number","detectSteps":false} */}# Save a screenshot of one button with even padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} */}{/* test end */}
= Save a screenshot of one button with even padding// (test {"testId":"capture-screenshot-crop-padding-number","detectSteps":false}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with even padding</title></head><body><!-- test {"testId":"capture-screenshot-crop-padding-number","detectSteps":false} --><h1>Save a screenshot of one button with even padding</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button with even padding=================================================.. test {"testId":"capture-screenshot-crop-padding-number","detectSteps":false}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-number"><title>Save a screenshot of one button with even padding</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-padding-number","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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-padding-number.png","directory":".dd-output","overwrite":"true","crop":{"selector":"#submit-button","padding":10}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-crop-padding-number","steps": [{"goTo": "http://localhost:8092/enhanced-elements.html"},{"screenshot": {"path": "crop-padding-number.png","directory": ".dd-output","overwrite": "true","crop": {"selector": "#submit-button","padding": 10}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-crop-padding-numbersteps:- goTo: http://localhost:8092/enhanced-elements.html- screenshot:path: crop-padding-number.pngdirectory: .dd-outputoverwrite: "true"crop:selector: "#submit-button"padding: 10
crop.padding as an object
Varies: screenshot.crop.padding · Value: { "top": 8, "right": 16, "bottom": 8, "left": 16 } · Effect: adds a different amount of space on each side of the element.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
# Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).2. The **Submit by ID** button is at the top of the form.
= Save a screenshot of one button with uneven padding. Go to http://localhost:8092/enhanced-elements.html[the sample form].. The *Submit by ID* button is at the top of the form.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with uneven padding</title></head><body><h1>Save a screenshot of one button with uneven padding</h1><ol><li>Go to <a href="http://localhost:8092/enhanced-elements.html">the sample form</a>.</li><li>The <strong>Submit by ID</strong> button is at the top of the form.</li></ol></body></html>
Save a screenshot of one button with uneven padding===================================================#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_.#. The **Submit by ID** button is at the top of the form.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-object"><title>Save a screenshot of one button with uneven padding</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 <b>Submit by ID</b> button is at the top of the form.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-padding-object","detectSteps":true} --># Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-padding-object","detectSteps":true} */}# Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} */}{/* test end */}
= Save a screenshot of one button with uneven padding// (test {"testId":"capture-screenshot-crop-padding-object","detectSteps":true}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with uneven padding</title></head><body><!-- test {"testId":"capture-screenshot-crop-padding-object","detectSteps":true} --><h1>Save a screenshot of one button with uneven padding</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button with uneven padding===================================================.. test {"testId":"capture-screenshot-crop-padding-object","detectSteps":true}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-object"><title>Save a screenshot of one button with uneven padding</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-padding-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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-crop-padding-object","detectSteps":false} --># Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).<!-- step {"goTo":"http://localhost:8092/enhanced-elements.html"} -->2. The **Submit by ID** button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-crop-padding-object","detectSteps":false} */}# Save a screenshot of one button with uneven padding1. Go to [the sample form](http://localhost:8092/enhanced-elements.html).{/* step {"goTo":"http://localhost:8092/enhanced-elements.html"} */}2. The **Submit by ID** button is at the top of the form.{/* step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} */}{/* test end */}
= Save a screenshot of one button with uneven padding// (test {"testId":"capture-screenshot-crop-padding-object","detectSteps":false}). Go to http://localhost:8092/enhanced-elements.html[the sample form].+// (step {"goTo":"http://localhost:8092/enhanced-elements.html"}). The *Submit by ID* button is at the top of the form.+// (step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of one button with uneven padding</title></head><body><!-- test {"testId":"capture-screenshot-crop-padding-object","detectSteps":false} --><h1>Save a screenshot of one button with uneven padding</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 <strong>Submit by ID</strong> button is at the top of the form.<!-- step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}} --></li></ol><!-- test end --></body></html>
Save a screenshot of one button with uneven padding===================================================.. test {"testId":"capture-screenshot-crop-padding-object","detectSteps":false}#. Go to `the sample form <http://localhost:8092/enhanced-elements.html>`_... step {"goTo":"http://localhost:8092/enhanced-elements.html"}#. The **Submit by ID** button is at the top of the form... step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-crop-padding-object"><title>Save a screenshot of one button with uneven padding</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-crop-padding-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 <b>Submit by ID</b> button is at the top of the form.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"crop-padding-object.png","directory":".dd-output","overwrite":"true","crop":{"elementText":"Submit by ID","padding":{"top":8,"right":16,"bottom":8,"left":16}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-crop-padding-object","steps": [{"goTo": "http://localhost:8092/enhanced-elements.html"},{"screenshot": {"path": "crop-padding-object.png","directory": ".dd-output","overwrite": "true","crop": {"elementText": "Submit by ID","padding": {"top": 8,"right": 16,"bottom": 8,"left": 16}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-crop-padding-objectsteps:- goTo: http://localhost:8092/enhanced-elements.html- screenshot:path: crop-padding-object.pngdirectory: .dd-outputoverwrite: "true"crop:elementText: Submit by IDpadding:top: 8right: 16bottom: 8left: 16
fullPage: true
Varies: screenshot.fullPage · Value: true · Effect: saves the whole page, including the parts you scroll to.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.2. The page ends with a red box at the bottom.
# Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.2. The page ends with a red box at the bottom.
= Save a screenshot of a long page with fullPage true. Open the page at `http://localhost:8092/screenshot-tall.html`.. The page ends with a red box at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage true</title></head><body><h1>Save a screenshot of a long page with fullPage true</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.</li><li>The page ends with a red box at the bottom.</li></ol></body></html>
Save a screenshot of a long page with fullPage true===================================================#. Open the page at ``http://localhost:8092/screenshot-tall.html``.#. The page ends with a red box at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-true"><title>Save a screenshot of a long page with fullPage true</title><taskbody><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd></step><step><cmd>The page ends with a red box at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-fullpage-true","detectSteps":true} --># Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-fullpage-true","detectSteps":true} */}# Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. The page ends with a red box at the bottom.{/* step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} */}{/* test end */}
= Save a screenshot of a long page with fullPage true// (test {"testId":"capture-screenshot-fullpage-true","detectSteps":true}). Open the page at `http://localhost:8092/screenshot-tall.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). The page ends with a red box at the bottom.+// (step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage true</title></head><body><!-- test {"testId":"capture-screenshot-fullpage-true","detectSteps":true} --><h1>Save a screenshot of a long page with fullPage true</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} --></li></ol><!-- test end --></body></html>
Save a screenshot of a long page with fullPage true===================================================.. test {"testId":"capture-screenshot-fullpage-true","detectSteps":true}#. Open the page at ``http://localhost:8092/screenshot-tall.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. The page ends with a red box at the bottom... step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-true"><title>Save a screenshot of a long page with fullPage true</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-fullpage-true","detectSteps":true}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>The page ends with a red box at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-fullpage-true","detectSteps":false} --># Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-fullpage-true","detectSteps":false} */}# Save a screenshot of a long page with fullPage true1. Open the page at `http://localhost:8092/screenshot-tall.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. The page ends with a red box at the bottom.{/* step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} */}{/* test end */}
= Save a screenshot of a long page with fullPage true// (test {"testId":"capture-screenshot-fullpage-true","detectSteps":false}). Open the page at `http://localhost:8092/screenshot-tall.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). The page ends with a red box at the bottom.+// (step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage true</title></head><body><!-- test {"testId":"capture-screenshot-fullpage-true","detectSteps":false} --><h1>Save a screenshot of a long page with fullPage true</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}} --></li></ol><!-- test end --></body></html>
Save a screenshot of a long page with fullPage true===================================================.. test {"testId":"capture-screenshot-fullpage-true","detectSteps":false}#. Open the page at ``http://localhost:8092/screenshot-tall.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. The page ends with a red box at the bottom... step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-true"><title>Save a screenshot of a long page with fullPage true</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-fullpage-true","detectSteps":false}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>The page ends with a red box at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"fullpage-true.png","directory":".dd-output","overwrite":"true","fullPage":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-fullpage-true","steps": [{"goTo": {"url": "http://localhost:8092/screenshot-tall.html","waitUntil": {"networkIdleTime": 0,"domIdleTime": 0}}},{"screenshot": {"path": "fullpage-true.png","directory": ".dd-output","overwrite": "true","fullPage": true}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-fullpage-truesteps:- goTo:url: http://localhost:8092/screenshot-tall.htmlwaitUntil:networkIdleTime: 0domIdleTime: 0- screenshot:path: fullpage-true.pngdirectory: .dd-outputoverwrite: "true"fullPage: true
fullPage: false
Varies: screenshot.fullPage · Value: false · Effect: saves only what fits in the viewport.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.2. The page ends with a red box at the bottom.
# Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.2. The page ends with a red box at the bottom.
= Save a screenshot of a long page with fullPage false. Open the page at `http://localhost:8092/screenshot-tall.html`.. The page ends with a red box at the bottom.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage false</title></head><body><h1>Save a screenshot of a long page with fullPage false</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.</li><li>The page ends with a red box at the bottom.</li></ol></body></html>
Save a screenshot of a long page with fullPage false====================================================#. Open the page at ``http://localhost:8092/screenshot-tall.html``.#. The page ends with a red box at the bottom.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-false"><title>Save a screenshot of a long page with fullPage false</title><taskbody><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd></step><step><cmd>The page ends with a red box at the bottom.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-fullpage-false","detectSteps":true} --># Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-fullpage-false","detectSteps":true} */}# Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. The page ends with a red box at the bottom.{/* step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} */}{/* test end */}
= Save a screenshot of a long page with fullPage false// (test {"testId":"capture-screenshot-fullpage-false","detectSteps":true}). Open the page at `http://localhost:8092/screenshot-tall.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). The page ends with a red box at the bottom.+// (step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage false</title></head><body><!-- test {"testId":"capture-screenshot-fullpage-false","detectSteps":true} --><h1>Save a screenshot of a long page with fullPage false</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} --></li></ol><!-- test end --></body></html>
Save a screenshot of a long page with fullPage false====================================================.. test {"testId":"capture-screenshot-fullpage-false","detectSteps":true}#. Open the page at ``http://localhost:8092/screenshot-tall.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. The page ends with a red box at the bottom... step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-false"><title>Save a screenshot of a long page with fullPage false</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-fullpage-false","detectSteps":true}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>The page ends with a red box at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-fullpage-false","detectSteps":false} --># Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-fullpage-false","detectSteps":false} */}# Save a screenshot of a long page with fullPage false1. Open the page at `http://localhost:8092/screenshot-tall.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. The page ends with a red box at the bottom.{/* step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} */}{/* test end */}
= Save a screenshot of a long page with fullPage false// (test {"testId":"capture-screenshot-fullpage-false","detectSteps":false}). Open the page at `http://localhost:8092/screenshot-tall.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). The page ends with a red box at the bottom.+// (step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of a long page with fullPage false</title></head><body><!-- test {"testId":"capture-screenshot-fullpage-false","detectSteps":false} --><h1>Save a screenshot of a long page with fullPage false</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-tall.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>The page ends with a red box at the bottom.<!-- step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}} --></li></ol><!-- test end --></body></html>
Save a screenshot of a long page with fullPage false====================================================.. test {"testId":"capture-screenshot-fullpage-false","detectSteps":false}#. Open the page at ``http://localhost:8092/screenshot-tall.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. The page ends with a red box at the bottom... step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-fullpage-false"><title>Save a screenshot of a long page with fullPage false</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-fullpage-false","detectSteps":false}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-tall.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-tall.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>The page ends with a red box at the bottom.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"fullpage-false.png","directory":".dd-output","overwrite":"true","fullPage":false}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-fullpage-false","steps": [{"goTo": {"url": "http://localhost:8092/screenshot-tall.html","waitUntil": {"networkIdleTime": 0,"domIdleTime": 0}}},{"screenshot": {"path": "fullpage-false.png","directory": ".dd-output","overwrite": "true","fullPage": false}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-fullpage-falsesteps:- goTo:url: http://localhost:8092/screenshot-tall.htmlwaitUntil:networkIdleTime: 0domIdleTime: 0- screenshot:path: fullpage-false.pngdirectory: .dd-outputoverwrite: "true"fullPage: false
mask with strings
Varies: screenshot.mask · Value: ["#clock", "#stamps"] · Effect: hides the first match of each selector in both images before comparing, so the times don’t count.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
# Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
= Compare a screenshot with string masks. Go to http://localhost:8092/mask.html[the billing page].. The page shows the next invoice date and when the account last synced.
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with string masks</title></head><body><h1>Compare a screenshot with string masks</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.</li><li>The page shows the next invoice date and when the account last synced.</li></ol></body></html>
Compare a screenshot with string masks======================================#. Go to `the billing page <http://localhost:8092/mask.html>`_.#. The page shows the next invoice date and when the account last synced.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-string"><title>Compare a screenshot with string masks</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-string","detectSteps":true} --># Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-string","detectSteps":true} */}# Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} */}{/* test end */}
= Compare a screenshot with string masks// (test {"testId":"capture-screenshot-mask-string","detectSteps":true}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with string masks</title></head><body><!-- test {"testId":"capture-screenshot-mask-string","detectSteps":true} --><h1>Compare a screenshot with string masks</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with string masks======================================.. test {"testId":"capture-screenshot-mask-string","detectSteps":true}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-string"><title>Compare a screenshot with string masks</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-string","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-string","detectSteps":false} --># Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-string","detectSteps":false} */}# Compare a screenshot with string masks1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} */}{/* test end */}
= Compare a screenshot with string masks// (test {"testId":"capture-screenshot-mask-string","detectSteps":false}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with string masks</title></head><body><!-- test {"testId":"capture-screenshot-mask-string","detectSteps":false} --><h1>Compare a screenshot with string masks</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with string masks======================================.. test {"testId":"capture-screenshot-mask-string","detectSteps":false}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-string"><title>Compare a screenshot with string masks</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-string","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-string.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":["#clock","#stamps"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-mask-string","steps": [{"goTo": "http://localhost:8092/mask.html"},{"screenshot": {"path": "mask-string.png","directory": ".dd-output","maxVariation": 0.001,"overwrite": "aboveVariation","mask": ["#clock","#stamps"]}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-mask-stringsteps:- goTo: http://localhost:8092/mask.html- screenshot:path: mask-string.pngdirectory: .dd-outputmaxVariation: 0.001overwrite: aboveVariationmask:- "#clock"- "#stamps"
mask with an element object
Varies: screenshot.mask · Value: [{ "selector": ".stamp" }, "#clock"] · Effect: hides every match of the object’s selector, and the first match of the string.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
= Compare a screenshot with an element mask. Go to http://localhost:8092/mask.html[the billing page].. The page shows the next invoice date and when the account last synced.
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.</li><li>The page shows the next invoice date and when the account last synced.</li></ol></body></html>
Compare a screenshot with an element mask=========================================#. Go to `the billing page <http://localhost:8092/mask.html>`_.#. The page shows the next invoice date and when the account last synced.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-object"><title>Compare a screenshot with an element mask</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-object","detectSteps":true} --># Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-object","detectSteps":true} */}# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} */}{/* test end */}
= Compare a screenshot with an element mask// (test {"testId":"capture-screenshot-mask-object","detectSteps":true}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><!-- test {"testId":"capture-screenshot-mask-object","detectSteps":true} --><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with an element mask=========================================.. test {"testId":"capture-screenshot-mask-object","detectSteps":true}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-object"><title>Compare a screenshot with an element mask</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-object","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-object","detectSteps":false} --># Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-object","detectSteps":false} */}# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} */}{/* test end */}
= Compare a screenshot with an element mask// (test {"testId":"capture-screenshot-mask-object","detectSteps":false}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><!-- test {"testId":"capture-screenshot-mask-object","detectSteps":false} --><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with an element mask=========================================.. test {"testId":"capture-screenshot-mask-object","detectSteps":false}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-object"><title>Compare a screenshot with an element mask</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-object","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-object.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"selector":".stamp"},"#clock"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-mask-object","steps": [{"goTo": "http://localhost:8092/mask.html"},{"screenshot": {"path": "mask-object.png","directory": ".dd-output","maxVariation": 0.001,"overwrite": "aboveVariation","mask": [{"selector": ".stamp"},"#clock"]}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-mask-objectsteps:- goTo: http://localhost:8092/mask.html- screenshot:path: mask-object.pngdirectory: .dd-outputmaxVariation: 0.001overwrite: aboveVariationmask:- selector: .stamp- "#clock"
mask with elementClass
Varies: screenshot.mask · Value: [{ "elementClass": "stamp" }, "#clock"] · Effect: hides every element with the stamp class, and the first match of the string. A mask object takes the same locator fields as find.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).2. The page shows the next invoice date and when the account last synced.
= Compare a screenshot with an element mask. Go to http://localhost:8092/mask.html[the billing page].. The page shows the next invoice date and when the account last synced.
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.</li><li>The page shows the next invoice date and when the account last synced.</li></ol></body></html>
Compare a screenshot with an element mask=========================================#. Go to `the billing page <http://localhost:8092/mask.html>`_.#. The page shows the next invoice date and when the account last synced.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-elementclass"><title>Compare a screenshot with an element mask</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true} --># Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true} */}# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} */}{/* test end */}
= Compare a screenshot with an element mask// (test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><!-- test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true} --><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with an element mask=========================================.. test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-elementclass"><title>Compare a screenshot with an element mask</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-elementclass","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false} --># Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).<!-- step {"goTo":"http://localhost:8092/mask.html"} -->2. The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false} */}# Compare a screenshot with an element mask1. Go to [the billing page](http://localhost:8092/mask.html).{/* step {"goTo":"http://localhost:8092/mask.html"} */}2. The page shows the next invoice date and when the account last synced.{/* step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} */}{/* test end */}
= Compare a screenshot with an element mask// (test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false}). Go to http://localhost:8092/mask.html[the billing page].+// (step {"goTo":"http://localhost:8092/mask.html"}). The page shows the next invoice date and when the account last synced.+// (step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare a screenshot with an element mask</title></head><body><!-- test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false} --><h1>Compare a screenshot with an element mask</h1><ol><li>Go to <a href="http://localhost:8092/mask.html">the billing page</a>.<!-- step {"goTo":"http://localhost:8092/mask.html"} --></li><li>The page shows the next invoice date and when the account last synced.<!-- step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}} --></li></ol><!-- test end --></body></html>
Compare a screenshot with an element mask=========================================.. test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false}#. Go to `the billing page <http://localhost:8092/mask.html>`_... step {"goTo":"http://localhost:8092/mask.html"}#. The page shows the next invoice date and when the account last synced... step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-mask-elementclass"><title>Compare a screenshot with an element mask</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-mask-elementclass","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/mask.html" scope="external" format="html">the billing page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/mask.html"}'/></info></step><step><cmd>The page shows the next invoice date and when the account last synced.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"mask-elementclass.png","directory":".dd-output","maxVariation":0.001,"overwrite":"aboveVariation","mask":[{"elementClass":"stamp"},"#clock"]}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-mask-elementclass","steps": [{"goTo": "http://localhost:8092/mask.html"},{"screenshot": {"path": "mask-elementclass.png","directory": ".dd-output","maxVariation": 0.001,"overwrite": "aboveVariation","mask": [{"elementClass": "stamp"},"#clock"]}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-mask-elementclasssteps:- goTo: http://localhost:8092/mask.html- screenshot:path: mask-elementclass.pngdirectory: .dd-outputmaxVariation: 0.001overwrite: aboveVariationmask:- elementClass: stamp- "#clock"
stable: true
Varies: screenshot.stable · Value: true · Effect: takes screenshots until two in a row match, so the loading bar has finished.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.2. A loading bar fills, then the page shows its content.
# Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.2. A loading bar fills, then the page shows its content.
= Wait for a page to settle before the screenshot. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.. A loading bar fills, then the page shows its content.
<!DOCTYPE html><html lang="en"><head><title>Wait for a page to settle before the screenshot</title></head><body><h1>Wait for a page to settle before the screenshot</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-late-reveal.html</code>.</li><li>A loading bar fills, then the page shows its content.</li></ol></body></html>
Wait for a page to settle before the screenshot===============================================#. Open the page at ``http://localhost:8092/screenshot-late-reveal.html``.#. A loading bar fills, then the page shows its content.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-stable-true"><title>Wait for a page to settle before the screenshot</title><taskbody><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-late-reveal.html</codeph>.</cmd></step><step><cmd>A loading bar fills, then the page shows its content.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-stable-true","detectSteps":true} --># Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A loading bar fills, then the page shows its content.<!-- step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-stable-true","detectSteps":true} */}# Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A loading bar fills, then the page shows its content.{/* step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} */}{/* test end */}
= Wait for a page to settle before the screenshot// (test {"testId":"capture-screenshot-stable-true","detectSteps":true}). Open the page at `http://localhost:8092/screenshot-late-reveal.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A loading bar fills, then the page shows its content.+// (step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Wait for a page to settle before the screenshot</title></head><body><!-- test {"testId":"capture-screenshot-stable-true","detectSteps":true} --><h1>Wait for a page to settle before the screenshot</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-late-reveal.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A loading bar fills, then the page shows its content.<!-- step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} --></li></ol><!-- test end --></body></html>
Wait for a page to settle before the screenshot===============================================.. test {"testId":"capture-screenshot-stable-true","detectSteps":true}#. Open the page at ``http://localhost:8092/screenshot-late-reveal.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A loading bar fills, then the page shows its content... step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-stable-true"><title>Wait for a page to settle before the screenshot</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-stable-true","detectSteps":true}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-late-reveal.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A loading bar fills, then the page shows its content.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-stable-true","detectSteps":false} --># Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A loading bar fills, then the page shows its content.<!-- step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-stable-true","detectSteps":false} */}# Wait for a page to settle before the screenshot1. Open the page at `http://localhost:8092/screenshot-late-reveal.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A loading bar fills, then the page shows its content.{/* step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} */}{/* test end */}
= Wait for a page to settle before the screenshot// (test {"testId":"capture-screenshot-stable-true","detectSteps":false}). Open the page at `http://localhost:8092/screenshot-late-reveal.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A loading bar fills, then the page shows its content.+// (step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Wait for a page to settle before the screenshot</title></head><body><!-- test {"testId":"capture-screenshot-stable-true","detectSteps":false} --><h1>Wait for a page to settle before the screenshot</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-late-reveal.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A loading bar fills, then the page shows its content.<!-- step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}} --></li></ol><!-- test end --></body></html>
Wait for a page to settle before the screenshot===============================================.. test {"testId":"capture-screenshot-stable-true","detectSteps":false}#. Open the page at ``http://localhost:8092/screenshot-late-reveal.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A loading bar fills, then the page shows its content... step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-stable-true"><title>Wait for a page to settle before the screenshot</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-stable-true","detectSteps":false}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-late-reveal.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-late-reveal.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A loading bar fills, then the page shows its content.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"stable-true.png","directory":".dd-output","overwrite":"true","stable":true}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-stable-true","steps": [{"goTo": {"url": "http://localhost:8092/screenshot-late-reveal.html","waitUntil": {"networkIdleTime": 0,"domIdleTime": 0}}},{"screenshot": {"path": "stable-true.png","directory": ".dd-output","overwrite": "true","stable": true}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-stable-truesteps:- goTo:url: http://localhost:8092/screenshot-late-reveal.htmlwaitUntil:networkIdleTime: 0domIdleTime: 0- screenshot:path: stable-true.pngdirectory: .dd-outputoverwrite: "true"stable: true
animations: "disabled"
Varies: screenshot.animations · Value: "disabled" · Effect: stops the spinner during the screenshot, so every run saves the same image.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.2. A spinner turns in the middle of the page.
# Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.2. A spinner turns in the middle of the page.
= Save a screenshot of an animated page with animations disabled. Open the page at `http://localhost:8092/screenshot-loop.html`.. A spinner turns in the middle of the page.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations disabled</title></head><body><h1>Save a screenshot of an animated page with animations disabled</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.</li><li>A spinner turns in the middle of the page.</li></ol></body></html>
Save a screenshot of an animated page with animations disabled==============================================================#. Open the page at ``http://localhost:8092/screenshot-loop.html``.#. A spinner turns in the middle of the page.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-disabled"><title>Save a screenshot of an animated page with animations disabled</title><taskbody><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd></step><step><cmd>A spinner turns in the middle of the page.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-animations-disabled","detectSteps":true} --># Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-animations-disabled","detectSteps":true} */}# Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A spinner turns in the middle of the page.{/* step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} */}{/* test end */}
= Save a screenshot of an animated page with animations disabled// (test {"testId":"capture-screenshot-animations-disabled","detectSteps":true}). Open the page at `http://localhost:8092/screenshot-loop.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A spinner turns in the middle of the page.+// (step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations disabled</title></head><body><!-- test {"testId":"capture-screenshot-animations-disabled","detectSteps":true} --><h1>Save a screenshot of an animated page with animations disabled</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of an animated page with animations disabled==============================================================.. test {"testId":"capture-screenshot-animations-disabled","detectSteps":true}#. Open the page at ``http://localhost:8092/screenshot-loop.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A spinner turns in the middle of the page... step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-disabled"><title>Save a screenshot of an animated page with animations disabled</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-animations-disabled","detectSteps":true}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A spinner turns in the middle of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-animations-disabled","detectSteps":false} --># Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-animations-disabled","detectSteps":false} */}# Save a screenshot of an animated page with animations disabled1. Open the page at `http://localhost:8092/screenshot-loop.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A spinner turns in the middle of the page.{/* step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} */}{/* test end */}
= Save a screenshot of an animated page with animations disabled// (test {"testId":"capture-screenshot-animations-disabled","detectSteps":false}). Open the page at `http://localhost:8092/screenshot-loop.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A spinner turns in the middle of the page.+// (step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations disabled</title></head><body><!-- test {"testId":"capture-screenshot-animations-disabled","detectSteps":false} --><h1>Save a screenshot of an animated page with animations disabled</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of an animated page with animations disabled==============================================================.. test {"testId":"capture-screenshot-animations-disabled","detectSteps":false}#. Open the page at ``http://localhost:8092/screenshot-loop.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A spinner turns in the middle of the page... step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-disabled"><title>Save a screenshot of an animated page with animations disabled</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-animations-disabled","detectSteps":false}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A spinner turns in the middle of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"animations-disabled.png","directory":".dd-output","overwrite":"true","animations":"disabled"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-animations-disabled","steps": [{"goTo": {"url": "http://localhost:8092/screenshot-loop.html","waitUntil": {"networkIdleTime": 0,"domIdleTime": 0}}},{"screenshot": {"path": "animations-disabled.png","directory": ".dd-output","overwrite": "true","animations": "disabled"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-animations-disabledsteps:- goTo:url: http://localhost:8092/screenshot-loop.htmlwaitUntil:networkIdleTime: 0domIdleTime: 0- screenshot:path: animations-disabled.pngdirectory: .dd-outputoverwrite: "true"animations: disabled
animations: "allow"
Varies: screenshot.animations · Value: "allow" · Effect: leaves the spinner running, so the image shows it wherever it happens to be.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.2. A spinner turns in the middle of the page.
# Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.2. A spinner turns in the middle of the page.
= Save a screenshot of an animated page with animations allow. Open the page at `http://localhost:8092/screenshot-loop.html`.. A spinner turns in the middle of the page.
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations allow</title></head><body><h1>Save a screenshot of an animated page with animations allow</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.</li><li>A spinner turns in the middle of the page.</li></ol></body></html>
Save a screenshot of an animated page with animations allow===========================================================#. Open the page at ``http://localhost:8092/screenshot-loop.html``.#. A spinner turns in the middle of the page.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-allow"><title>Save a screenshot of an animated page with animations allow</title><taskbody><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd></step><step><cmd>A spinner turns in the middle of the page.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-animations-allow","detectSteps":true} --># Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-animations-allow","detectSteps":true} */}# Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A spinner turns in the middle of the page.{/* step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} */}{/* test end */}
= Save a screenshot of an animated page with animations allow// (test {"testId":"capture-screenshot-animations-allow","detectSteps":true}). Open the page at `http://localhost:8092/screenshot-loop.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A spinner turns in the middle of the page.+// (step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations allow</title></head><body><!-- test {"testId":"capture-screenshot-animations-allow","detectSteps":true} --><h1>Save a screenshot of an animated page with animations allow</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of an animated page with animations allow===========================================================.. test {"testId":"capture-screenshot-animations-allow","detectSteps":true}#. Open the page at ``http://localhost:8092/screenshot-loop.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A spinner turns in the middle of the page... step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-allow"><title>Save a screenshot of an animated page with animations allow</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-animations-allow","detectSteps":true}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A spinner turns in the middle of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-screenshot-animations-allow","detectSteps":false} --># Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} -->2. A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} --><!-- test end -->
{/* test {"testId":"capture-screenshot-animations-allow","detectSteps":false} */}# Save a screenshot of an animated page with animations allow1. Open the page at `http://localhost:8092/screenshot-loop.html`.{/* step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} */}2. A spinner turns in the middle of the page.{/* step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} */}{/* test end */}
= Save a screenshot of an animated page with animations allow// (test {"testId":"capture-screenshot-animations-allow","detectSteps":false}). Open the page at `http://localhost:8092/screenshot-loop.html`.+// (step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}). A spinner turns in the middle of the page.+// (step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Save a screenshot of an animated page with animations allow</title></head><body><!-- test {"testId":"capture-screenshot-animations-allow","detectSteps":false} --><h1>Save a screenshot of an animated page with animations allow</h1><ol><li>Open the page at <code>http://localhost:8092/screenshot-loop.html</code>.<!-- step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}} --></li><li>A spinner turns in the middle of the page.<!-- step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}} --></li></ol><!-- test end --></body></html>
Save a screenshot of an animated page with animations allow===========================================================.. test {"testId":"capture-screenshot-animations-allow","detectSteps":false}#. Open the page at ``http://localhost:8092/screenshot-loop.html``... step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}#. A spinner turns in the middle of the page... step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-screenshot-animations-allow"><title>Save a screenshot of an animated page with animations allow</title><taskbody><data name="doc-detective" value='test {"testId":"capture-screenshot-animations-allow","detectSteps":false}'/><steps><step><cmd>Open the page at <codeph>http://localhost:8092/screenshot-loop.html</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/screenshot-loop.html","waitUntil":{"networkIdleTime":0,"domIdleTime":0}}}'/></info></step><step><cmd>A spinner turns in the middle of the page.</cmd><info><data name="doc-detective" value='step {"screenshot":{"path":"animations-allow.png","directory":".dd-output","overwrite":"true","animations":"allow"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-screenshot-animations-allow","steps": [{"goTo": {"url": "http://localhost:8092/screenshot-loop.html","waitUntil": {"networkIdleTime": 0,"domIdleTime": 0}}},{"screenshot": {"path": "animations-allow.png","directory": ".dd-output","overwrite": "true","animations": "allow"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-screenshot-animations-allowsteps:- goTo:url: http://localhost:8092/screenshot-loop.htmlwaitUntil:networkIdleTime: 0domIdleTime: 0- screenshot:path: animations-allow.pngdirectory: .dd-outputoverwrite: "true"animations: allow
An image with the screenshot class
Varies: detection: image class · Value: screenshot · Effect: default detection turns the image into a screenshot step that saves to the image’s path.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.{.screenshot}
# Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).2. The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" className="screenshot" />
= Mark an image as a screenshot. Go to http://localhost:8092/screenshot-banner.html[the banner page].. The page opens with a cookie banner at the bottom.+image:.dd-output/detected-banner.png[The banner page,role=screenshot]
<!DOCTYPE html><html lang="en"><head><title>Mark an image as a screenshot</title></head><body><h1>Mark an image as a screenshot</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.</li><li>The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" class="screenshot"></li></ol></body></html>
Mark an image as a screenshot=============================#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_.#. The page opens with a cookie banner at the bottom... image:: .dd-output/detected-banner.png:alt: The banner page:class: screenshot
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-detect-screenshot-image"><title>Mark an image as a screenshot</title><taskbody><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><image href=".dd-output/detected-banner.png" outputclass="screenshot"><alt>The banner page</alt></image></info></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-detect-screenshot-image","detectSteps":true} --># Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.{.screenshot}<!-- test end -->
{/* test {"testId":"capture-detect-screenshot-image","detectSteps":true} */}# Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" className="screenshot" />{/* test end */}
= Mark an image as a screenshot// (test {"testId":"capture-detect-screenshot-image","detectSteps":true}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+image:.dd-output/detected-banner.png[The banner page,role=screenshot]// (test end)
<!DOCTYPE html><html lang="en"><head><title>Mark an image as a screenshot</title></head><body><!-- test {"testId":"capture-detect-screenshot-image","detectSteps":true} --><h1>Mark an image as a screenshot</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" class="screenshot"></li></ol><!-- test end --></body></html>
Mark an image as a screenshot=============================.. test {"testId":"capture-detect-screenshot-image","detectSteps":true}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... image:: .dd-output/detected-banner.png:alt: The banner page:class: screenshot.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-detect-screenshot-image"><title>Mark an image as a screenshot</title><taskbody><data name="doc-detective" value='test {"testId":"capture-detect-screenshot-image","detectSteps":true}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><image href=".dd-output/detected-banner.png" outputclass="screenshot"><alt>The banner page</alt></image></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"capture-detect-screenshot-image","detectSteps":false} --># Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} -->2. The page opens with a cookie banner at the bottom.{.screenshot}<!-- step {"screenshot":".dd-output/detected-banner.png"} --><!-- test end -->
{/* test {"testId":"capture-detect-screenshot-image","detectSteps":false} */}# Mark an image as a screenshot1. Go to [the banner page](http://localhost:8092/screenshot-banner.html).{/* step {"goTo":"http://localhost:8092/screenshot-banner.html"} */}2. The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" className="screenshot" />{/* step {"screenshot":".dd-output/detected-banner.png"} */}{/* test end */}
= Mark an image as a screenshot// (test {"testId":"capture-detect-screenshot-image","detectSteps":false}). Go to http://localhost:8092/screenshot-banner.html[the banner page].+// (step {"goTo":"http://localhost:8092/screenshot-banner.html"}). The page opens with a cookie banner at the bottom.+image:.dd-output/detected-banner.png[The banner page,role=screenshot]+// (step {"screenshot":".dd-output/detected-banner.png"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Mark an image as a screenshot</title></head><body><!-- test {"testId":"capture-detect-screenshot-image","detectSteps":false} --><h1>Mark an image as a screenshot</h1><ol><li>Go to <a href="http://localhost:8092/screenshot-banner.html">the banner page</a>.<!-- step {"goTo":"http://localhost:8092/screenshot-banner.html"} --></li><li>The page opens with a cookie banner at the bottom.<img src=".dd-output/detected-banner.png" alt="The banner page" class="screenshot"><!-- step {"screenshot":".dd-output/detected-banner.png"} --></li></ol><!-- test end --></body></html>
Mark an image as a screenshot=============================.. test {"testId":"capture-detect-screenshot-image","detectSteps":false}#. Go to `the banner page <http://localhost:8092/screenshot-banner.html>`_... step {"goTo":"http://localhost:8092/screenshot-banner.html"}#. The page opens with a cookie banner at the bottom... image:: .dd-output/detected-banner.png:alt: The banner page:class: screenshot.. step {"screenshot":".dd-output/detected-banner.png"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="capture-detect-screenshot-image"><title>Mark an image as a screenshot</title><taskbody><data name="doc-detective" value='test {"testId":"capture-detect-screenshot-image","detectSteps":false}'/><steps><step><cmd>Go to <xref href="http://localhost:8092/screenshot-banner.html" scope="external" format="html">the banner page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/screenshot-banner.html"}'/></info></step><step><cmd>The page opens with a cookie banner at the bottom.</cmd><info><image href=".dd-output/detected-banner.png" outputclass="screenshot"><alt>The banner page</alt></image><data name="doc-detective" value='step {"screenshot":".dd-output/detected-banner.png"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "capture-detect-screenshot-image","steps": [{"goTo": "http://localhost:8092/screenshot-banner.html"},{"screenshot": ".dd-output/detected-banner.png"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: capture-detect-screenshot-imagesteps:- goTo: http://localhost:8092/screenshot-banner.html- screenshot: .dd-output/detected-banner.png