Sessions and surfaces, 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 saveCookie or startSurface. Each of those statements also works on its own, because a run with detection off reads only the statements.
The permutation sections, from saveCookie and loadCookie permutations on, vary one setting each. A Varies line names the setting, its value, and its effect.
Keep a session cookie
This procedure uses saveCookie and loadCookie in their name, file path, and object forms, with goTo and find.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.4. Load the cookie from `sessions_demo.txt` in the output folder.5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.
# Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.4. Load the cookie from `sessions_demo.txt` in the output folder.5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.
= Keep a session cookie. Sign in at http://localhost:8092/cookies/set/sessions_demo/signed-in[the sign-in page]. The server sets the `sessions_demo` cookie.. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.. Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from `sessions_demo.txt` in the output folder.. Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_demo=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.. Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_demo=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.. Go to http://localhost:8092/cookies[the cookie report] a last time, and check that it shows *sessions_demo=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep a session cookie</title></head><body><h1>Keep a session cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_demo/signed-in">the sign-in page</a>. The server sets the <code>sessions_demo</code> cookie.</li><li>Save the <code>sessions_demo</code> cookie four ways. Save it to the <code>sessions_demo</code> and <code>SESSIONS_DEMO_COOKIE</code> environment variables, and to <code>sessions_demo.txt</code> in the output folder. Save it to <code>sessions_demo.txt</code> in a <code>tmp</code> folder next to this file, keeping only the <code>localhost</code> cookie.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from <code>sessions_demo.txt</code> in the output folder.</li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_demo=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> again, and load the cookie from the <code>SESSIONS_DEMO_COOKIE</code> environment variable.</li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_demo=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> once more, and load the <code>localhost</code> cookie from <code>tmp/sessions_demo.txt</code>.</li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> a last time, and check that it shows <strong>sessions_demo=signed-in</strong>.</li></ol></body></html>
Keep a session cookie=====================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_demo/signed-in>`__. The server sets the ``sessions_demo`` cookie.#. Save the ``sessions_demo`` cookie four ways. Save it to the ``sessions_demo`` and ``SESSIONS_DEMO_COOKIE`` environment variables, and to ``sessions_demo.txt`` in the output folder. Save it to ``sessions_demo.txt`` in a ``tmp`` folder next to this file, keeping only the ``localhost`` cookie.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__, which replaces the cookie.#. Load the cookie from ``sessions_demo.txt`` in the output folder.#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_demo=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ again, and load the cookie from the ``SESSIONS_DEMO_COOKIE`` environment variable.#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_demo=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ once more, and load the ``localhost`` cookie from ``tmp/sessions_demo.txt``.#. Go to `the cookie report <http://localhost:8092/cookies>`__ a last time, and check that it shows **sessions_demo=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookies"><title>Keep a session cookie</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_demo</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>sessions_demo</codeph> cookie four ways. Save it to the <codeph>sessions_demo</codeph> and <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variables, and to <codeph>sessions_demo.txt</codeph> in the output folder. Save it to <codeph>sessions_demo.txt</codeph> in a <codeph>tmp</codeph> folder next to this file, keeping only the <codeph>localhost</codeph> cookie.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from <codeph>sessions_demo.txt</codeph> in the output folder.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the cookie from the <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variable.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> once more, and load the <codeph>localhost</codeph> cookie from <codeph>tmp/sessions_demo.txt</codeph>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> a last time, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookies","detectSteps":true} --># Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} -->2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.<!-- step {"saveCookie":"sessions_demo"} --><!-- step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} -->3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.4. Load the cookie from `sessions_demo.txt` in the output folder.<!-- step {"loadCookie":"sessions_demo.txt"} -->5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.<!-- step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} -->7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.<!-- step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} -->9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-cookies","detectSteps":true} */}# Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} */}2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.{/* step {"saveCookie":"sessions_demo"} */}{/* step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} */}{/* step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} */}{/* step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} */}3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.4. Load the cookie from `sessions_demo.txt` in the output folder.{/* step {"loadCookie":"sessions_demo.txt"} */}5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.{/* step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} */}7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.{/* step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} */}9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.{/* test end */}
= Keep a session cookie// (test {"testId":"sessions-cookies","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_demo/signed-in[the sign-in page]. The server sets the `sessions_demo` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}). Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.+// (step {"saveCookie":"sessions_demo"})+// (step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}})+// (step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}})+// (step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}). Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from `sessions_demo.txt` in the output folder.+// (step {"loadCookie":"sessions_demo.txt"}). Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_demo=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.+// (step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}). Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_demo=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.+// (step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}). Go to http://localhost:8092/cookies[the cookie report] a last time, and check that it shows *sessions_demo=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a session cookie</title></head><body><!-- test {"testId":"sessions-cookies","detectSteps":true} --><h1>Keep a session cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_demo/signed-in">the sign-in page</a>. The server sets the <code>sessions_demo</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} --></li><li>Save the <code>sessions_demo</code> cookie four ways. Save it to the <code>sessions_demo</code> and <code>SESSIONS_DEMO_COOKIE</code> environment variables, and to <code>sessions_demo.txt</code> in the output folder. Save it to <code>sessions_demo.txt</code> in a <code>tmp</code> folder next to this file, keeping only the <code>localhost</code> cookie.<!-- step {"saveCookie":"sessions_demo"} --><!-- step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from <code>sessions_demo.txt</code> in the output folder.<!-- step {"loadCookie":"sessions_demo.txt"} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_demo=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> again, and load the cookie from the <code>SESSIONS_DEMO_COOKIE</code> environment variable.<!-- step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_demo=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> once more, and load the <code>localhost</code> cookie from <code>tmp/sessions_demo.txt</code>.<!-- step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> a last time, and check that it shows <strong>sessions_demo=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep a session cookie=====================.. test {"testId":"sessions-cookies","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_demo/signed-in>`__. The server sets the ``sessions_demo`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}#. Save the ``sessions_demo`` cookie four ways. Save it to the ``sessions_demo`` and ``SESSIONS_DEMO_COOKIE`` environment variables, and to ``sessions_demo.txt`` in the output folder. Save it to ``sessions_demo.txt`` in a ``tmp`` folder next to this file, keeping only the ``localhost`` cookie... step {"saveCookie":"sessions_demo"}.. step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}.. step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}}.. step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__, which replaces the cookie.#. Load the cookie from ``sessions_demo.txt`` in the output folder... step {"loadCookie":"sessions_demo.txt"}#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_demo=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ again, and load the cookie from the ``SESSIONS_DEMO_COOKIE`` environment variable... step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_demo=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ once more, and load the ``localhost`` cookie from ``tmp/sessions_demo.txt``... step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ a last time, and check that it shows **sessions_demo=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookies"><title>Keep a session cookie</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookies","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_demo</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_demo</codeph> cookie four ways. Save it to the <codeph>sessions_demo</codeph> and <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variables, and to <codeph>sessions_demo.txt</codeph> in the output folder. Save it to <codeph>sessions_demo.txt</codeph> in a <codeph>tmp</codeph> folder next to this file, keeping only the <codeph>localhost</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_demo"}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from <codeph>sessions_demo.txt</codeph> in the output folder.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_demo.txt"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the cookie from the <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> once more, and load the <codeph>localhost</codeph> cookie from <codeph>tmp/sessions_demo.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> a last time, and check that it shows <b>sessions_demo=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookies","detectSteps":false} --># Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} -->2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.<!-- step {"saveCookie":"sessions_demo"} --><!-- step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} -->3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} -->4. Load the cookie from `sessions_demo.txt` in the output folder.<!-- step {"loadCookie":"sessions_demo.txt"} -->5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} -->6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} --><!-- step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} -->7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} -->8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} --><!-- step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} -->9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-cookies","detectSteps":false} */}# Keep a session cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_demo/signed-in). The server sets the `sessions_demo` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} */}2. Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.{/* step {"saveCookie":"sessions_demo"} */}{/* step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} */}{/* step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} */}{/* step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} */}3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} */}4. Load the cookie from `sessions_demo.txt` in the output folder.{/* step {"loadCookie":"sessions_demo.txt"} */}5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_demo=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_demo=signed-in"} */}6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} */}{/* step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} */}7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_demo=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_demo=signed-in"} */}8. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_demo/signed-out) once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} */}{/* step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} */}9. Go to [the cookie report](http://localhost:8092/cookies) a last time, and check that it shows **sessions_demo=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_demo=signed-in"} */}{/* test end */}
= Keep a session cookie// (test {"testId":"sessions-cookies","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_demo/signed-in[the sign-in page]. The server sets the `sessions_demo` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}). Save the `sessions_demo` cookie four ways. Save it to the `sessions_demo` and `SESSIONS_DEMO_COOKIE` environment variables, and to `sessions_demo.txt` in the output folder. Save it to `sessions_demo.txt` in a `tmp` folder next to this file, keeping only the `localhost` cookie.+// (step {"saveCookie":"sessions_demo"})+// (step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}})+// (step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}})+// (step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}). Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}). Load the cookie from `sessions_demo.txt` in the output folder.+// (step {"loadCookie":"sessions_demo.txt"}). Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_demo=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_demo=signed-in"}). Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] again, and load the cookie from the `SESSIONS_DEMO_COOKIE` environment variable.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"})+// (step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}). Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_demo=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_demo=signed-in"}). Go to http://localhost:8092/cookies/set/sessions_demo/signed-out[the sign-out page] once more, and load the `localhost` cookie from `tmp/sessions_demo.txt`.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"})+// (step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}). Go to http://localhost:8092/cookies[the cookie report] a last time, and check that it shows *sessions_demo=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_demo=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a session cookie</title></head><body><!-- test {"testId":"sessions-cookies","detectSteps":false} --><h1>Keep a session cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_demo/signed-in">the sign-in page</a>. The server sets the <code>sessions_demo</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"} --></li><li>Save the <code>sessions_demo</code> cookie four ways. Save it to the <code>sessions_demo</code> and <code>SESSIONS_DEMO_COOKIE</code> environment variables, and to <code>sessions_demo.txt</code> in the output folder. Save it to <code>sessions_demo.txt</code> in a <code>tmp</code> folder next to this file, keeping only the <code>localhost</code> cookie.<!-- step {"saveCookie":"sessions_demo"} --><!-- step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}} --><!-- step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} --></li><li>Load the cookie from <code>sessions_demo.txt</code> in the output folder.<!-- step {"loadCookie":"sessions_demo.txt"} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_demo=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> again, and load the cookie from the <code>SESSIONS_DEMO_COOKIE</code> environment variable.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} --><!-- step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_demo=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_demo/signed-out">the sign-out page</a> once more, and load the <code>localhost</code> cookie from <code>tmp/sessions_demo.txt</code>.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"} --><!-- step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> a last time, and check that it shows <strong>sessions_demo=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_demo=signed-in"} --></li></ol><!-- test end --></body></html>
Keep a session cookie=====================.. test {"testId":"sessions-cookies","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_demo/signed-in>`__. The server sets the ``sessions_demo`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}#. Save the ``sessions_demo`` cookie four ways. Save it to the ``sessions_demo`` and ``SESSIONS_DEMO_COOKIE`` environment variables, and to ``sessions_demo.txt`` in the output folder. Save it to ``sessions_demo.txt`` in a ``tmp`` folder next to this file, keeping only the ``localhost`` cookie... step {"saveCookie":"sessions_demo"}.. step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}.. step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}}.. step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}#. Load the cookie from ``sessions_demo.txt`` in the output folder... step {"loadCookie":"sessions_demo.txt"}#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_demo=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_demo=signed-in"}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ again, and load the cookie from the ``SESSIONS_DEMO_COOKIE`` environment variable... step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}.. step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_demo=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_demo=signed-in"}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_demo/signed-out>`__ once more, and load the ``localhost`` cookie from ``tmp/sessions_demo.txt``... step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}.. step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ a last time, and check that it shows **sessions_demo=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_demo=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookies"><title>Keep a session cookie</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookies","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_demo</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_demo</codeph> cookie four ways. Save it to the <codeph>sessions_demo</codeph> and <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variables, and to <codeph>sessions_demo.txt</codeph> in the output folder. Save it to <codeph>sessions_demo.txt</codeph> in a <codeph>tmp</codeph> folder next to this file, keeping only the <codeph>localhost</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_demo"}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","overwrite":true}}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost","overwrite":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>sessions_demo.txt</codeph> in the output folder.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_demo.txt"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_demo=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_demo=signed-in"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the cookie from the <codeph>SESSIONS_DEMO_COOKIE</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}'/><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_demo","variable":"SESSIONS_DEMO_COOKIE"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_demo=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_demo=signed-in"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_demo/signed-out" scope="external" format="html">the sign-out page</xref> once more, and load the <codeph>localhost</codeph> cookie from <codeph>tmp/sessions_demo.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_demo/signed-out"}'/><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_demo","path":"sessions_demo.txt","directory":"tmp","domain":"localhost"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> a last time, and check that it shows <b>sessions_demo=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_demo=signed-in"}'/></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": "sessions-cookies","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_demo/signed-in"},{"saveCookie": "sessions_demo"},{"saveCookie": {"name": "sessions_demo","variable": "SESSIONS_DEMO_COOKIE"}},{"saveCookie": {"name": "sessions_demo","path": "sessions_demo.txt","overwrite": true}},{"saveCookie": {"name": "sessions_demo","path": "sessions_demo.txt","directory": "tmp","domain": "localhost","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_demo/signed-out"},{"loadCookie": "sessions_demo.txt"},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_demo=signed-in"},{"goTo": "http://localhost:8092/cookies/set/sessions_demo/signed-out"},{"loadCookie": {"name": "sessions_demo","variable": "SESSIONS_DEMO_COOKIE"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_demo=signed-in"},{"goTo": "http://localhost:8092/cookies/set/sessions_demo/signed-out"},{"loadCookie": {"name": "sessions_demo","path": "sessions_demo.txt","directory": "tmp","domain": "localhost"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_demo=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookiessteps:- goTo: http://localhost:8092/cookies/set/sessions_demo/signed-in- saveCookie: sessions_demo- saveCookie:name: sessions_demovariable: SESSIONS_DEMO_COOKIE- saveCookie:name: sessions_demopath: sessions_demo.txtoverwrite: true- saveCookie:name: sessions_demopath: sessions_demo.txtdirectory: tmpdomain: localhostoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_demo/signed-out- loadCookie: sessions_demo.txt- goTo: http://localhost:8092/cookies- find: sessions_demo=signed-in- goTo: http://localhost:8092/cookies/set/sessions_demo/signed-out- loadCookie:name: sessions_demovariable: SESSIONS_DEMO_COOKIE- goTo: http://localhost:8092/cookies- find: sessions_demo=signed-in- goTo: http://localhost:8092/cookies/set/sessions_demo/signed-out- loadCookie:name: sessions_demopath: sessions_demo.txtdirectory: tmpdomain: localhost- goTo: http://localhost:8092/cookies- find: sessions_demo=signed-in
Forms in this example
| Step | What it does |
|---|---|
"saveCookie": "sessions_demo" | Saves the cookie to the sessions_demo environment variable. |
"saveCookie": { "name", "variable" } | Saves the cookie to the environment variable that variable names. |
"saveCookie": { "name", "path", "overwrite" } | Saves the cookie to a file in outputDir, replacing an earlier file. |
"saveCookie": { "name", "path", "directory", "domain", "overwrite" } | Saves only the cookie for domain to a file in directory. A relative directory resolves against the file that holds the test. |
"loadCookie": "sessions_demo.txt" | Loads the cookie named for the file from outputDir. |
"loadCookie": { "name", "variable" } | Loads the cookie from an environment variable. |
"loadCookie": { "name", "path", "directory", "domain" } | Loads the cookie for domain from a file in directory. |
"loadCookie": "sessions_demo", a bare cookie name, loads from the environment variable of that name.
Config for the detected run
The detected variants run with this example’s own config, which sets contexts for every test that has no runOn of its own. Here, browsers is an array of browser names, so the test runs in Firefox and then in Chrome:
{"detectSteps": true,"runOn": [{"platforms": ["linux", "mac", "windows"],"browsers": ["firefox", "chrome"]}],"browserFallback": "explicit","retries": 1}
browserFallback set to explicit falls back to another browser only for a context whose browser Doc Detective picked itself. retries re-runs a context once on a fresh session when its session breaks mid-run. A context’s own browserFallback and retries override these. See config.
What detection finds
Each link becomes a checkLink step, and each link after “Go to” also becomes a goTo step. The bold sessions_demo=signed-in becomes a find step. The first link comes after Sign in at, which isn’t a navigation verb, so detection only checks it, and a goTo statement opens it. No default rule produces saveCookie or loadCookie, so those are statements in every detected variant.
Reuse a signed-in browser state in two browsers
This procedure uses saveState and loadState in their object and string forms, and runs in two contexts: headless Firefox with a set window and viewport, and headless Chrome.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.4. Load the browser state from `sessions-state.json` in the output folder.5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.
# Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.4. Load the browser state from `sessions-state.json` in the output folder.5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.
= Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.. Sign in at http://localhost:8092/cookies/set/sessions_state/signed-in[the sign-in page]. The server sets the `sessions_state` cookie.. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.. Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page], which replaces the cookie.. Load the browser state from `sessions-state.json` in the output folder.. Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_state=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page] again, and load the browser state from `tmp/sessions-state.json`.. Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_state=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Reuse a signed-in browser state</title></head><body><h1>Reuse a signed-in browser state</h1><p>Run these steps in Firefox and in Chrome.</p><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_state/signed-in">the sign-in page</a>. The server sets the <code>sessions_state</code> cookie.</li><li>Save the browser state to <code>sessions-state.json</code> in the output folder, and to <code>sessions-state.json</code> in a <code>tmp</code> folder next to this file.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the browser state from <code>sessions-state.json</code> in the output folder.</li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_state=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a> again, and load the browser state from <code>tmp/sessions-state.json</code>.</li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_state=signed-in</strong>.</li></ol></body></html>
Reuse a signed-in browser state===============================Run these steps in Firefox and in Chrome.#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_state/signed-in>`__. The server sets the ``sessions_state`` cookie.#. Save the browser state to ``sessions-state.json`` in the output folder, and to ``sessions-state.json`` in a ``tmp`` folder next to this file.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__, which replaces the cookie.#. Load the browser state from ``sessions-state.json`` in the output folder.#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_state=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__ again, and load the browser state from ``tmp/sessions-state.json``.#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_state=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state"><title>Reuse a signed-in browser state</title><taskbody><context><p>Run these steps in Firefox and in Chrome.</p></context><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_state/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_state</codeph> cookie.</cmd></step><step><cmd>Save the browser state to <codeph>sessions-state.json</codeph> in the output folder, and to <codeph>sessions-state.json</codeph> in a <codeph>tmp</codeph> folder next to this file.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the browser state from <codeph>sessions-state.json</codeph> in the output folder.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_state=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the browser state from <codeph>tmp/sessions-state.json</codeph>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_state=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} --># Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} -->2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.<!-- step {"saveState":{"path":"sessions-state.json","overwrite":true}} --><!-- step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} -->3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.4. Load the browser state from `sessions-state.json` in the output folder.<!-- step {"loadState":"sessions-state.json"} -->5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.<!-- step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} -->7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} */}# Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} */}2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.{/* step {"saveState":{"path":"sessions-state.json","overwrite":true}} */}{/* step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} */}3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.4. Load the browser state from `sessions-state.json` in the output folder.{/* step {"loadState":"sessions-state.json"} */}5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.{/* step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} */}7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.{/* test end */}
= Reuse a signed-in browser state// (test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]})Run these steps in Firefox and in Chrome.. Sign in at http://localhost:8092/cookies/set/sessions_state/signed-in[the sign-in page]. The server sets the `sessions_state` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}). Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.+// (step {"saveState":{"path":"sessions-state.json","overwrite":true}})+// (step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}). Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page], which replaces the cookie.. Load the browser state from `sessions-state.json` in the output folder.+// (step {"loadState":"sessions-state.json"}). Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_state=signed-in*.. Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page] again, and load the browser state from `tmp/sessions-state.json`.+// (step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}). Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_state=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Reuse a signed-in browser state</title></head><body><!-- test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} --><h1>Reuse a signed-in browser state</h1><p>Run these steps in Firefox and in Chrome.</p><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_state/signed-in">the sign-in page</a>. The server sets the <code>sessions_state</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} --></li><li>Save the browser state to <code>sessions-state.json</code> in the output folder, and to <code>sessions-state.json</code> in a <code>tmp</code> folder next to this file.<!-- step {"saveState":{"path":"sessions-state.json","overwrite":true}} --><!-- step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the browser state from <code>sessions-state.json</code> in the output folder.<!-- step {"loadState":"sessions-state.json"} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_state=signed-in</strong>.</li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a> again, and load the browser state from <code>tmp/sessions-state.json</code>.<!-- step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_state=signed-in</strong>.</li></ol><!-- test end --></body></html>
Reuse a signed-in browser state===============================.. test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]}Run these steps in Firefox and in Chrome.#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_state/signed-in>`__. The server sets the ``sessions_state`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}#. Save the browser state to ``sessions-state.json`` in the output folder, and to ``sessions-state.json`` in a ``tmp`` folder next to this file... step {"saveState":{"path":"sessions-state.json","overwrite":true}}.. step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__, which replaces the cookie.#. Load the browser state from ``sessions-state.json`` in the output folder... step {"loadState":"sessions-state.json"}#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_state=signed-in**.#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__ again, and load the browser state from ``tmp/sessions-state.json``... step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_state=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state"><title>Reuse a signed-in browser state</title><taskbody><context><p>Run these steps in Firefox and in Chrome.</p></context><data name="doc-detective" value='test {"testId":"sessions-state","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_state/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_state</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-state.json</codeph> in the output folder, and to <codeph>sessions-state.json</codeph> in a <codeph>tmp</codeph> folder next to this file.</cmd><info><data name="doc-detective" value='step {"saveState":{"path":"sessions-state.json","overwrite":true}}'/><data name="doc-detective" value='step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the browser state from <codeph>sessions-state.json</codeph> in the output folder.</cmd><info><data name="doc-detective" value='step {"loadState":"sessions-state.json"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_state=signed-in</b>.</cmd></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the browser state from <codeph>tmp/sessions-state.json</codeph>.</cmd><info><data name="doc-detective" value='step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_state=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} --># Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} -->2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.<!-- step {"saveState":{"path":"sessions-state.json","overwrite":true}} --><!-- step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} -->3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} -->4. Load the browser state from `sessions-state.json` in the output folder.<!-- step {"loadState":"sessions-state.json"} -->5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_state=signed-in"} -->6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} --><!-- step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} -->7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_state=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} */}# Reuse a signed-in browser stateRun these steps in Firefox and in Chrome.1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_state/signed-in). The server sets the `sessions_state` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} */}2. Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.{/* step {"saveState":{"path":"sessions-state.json","overwrite":true}} */}{/* step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} */}3. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} */}4. Load the browser state from `sessions-state.json` in the output folder.{/* step {"loadState":"sessions-state.json"} */}5. Go to [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_state=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_state=signed-in"} */}6. Go to [the sign-out page](http://localhost:8092/cookies/set/sessions_state/signed-out) again, and load the browser state from `tmp/sessions-state.json`.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} */}{/* step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} */}7. Go to [the cookie report](http://localhost:8092/cookies) again, and check that it shows **sessions_state=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_state=signed-in"} */}{/* test end */}
= Reuse a signed-in browser state// (test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]})Run these steps in Firefox and in Chrome.. Sign in at http://localhost:8092/cookies/set/sessions_state/signed-in[the sign-in page]. The server sets the `sessions_state` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}). Save the browser state to `sessions-state.json` in the output folder, and to `sessions-state.json` in a `tmp` folder next to this file.+// (step {"saveState":{"path":"sessions-state.json","overwrite":true}})+// (step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}). Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"}). Load the browser state from `sessions-state.json` in the output folder.+// (step {"loadState":"sessions-state.json"}). Go to http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_state=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_state=signed-in"}). Go to http://localhost:8092/cookies/set/sessions_state/signed-out[the sign-out page] again, and load the browser state from `tmp/sessions-state.json`.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"})+// (step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}). Go to http://localhost:8092/cookies[the cookie report] again, and check that it shows *sessions_state=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_state=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Reuse a signed-in browser state</title></head><body><!-- test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]} --><h1>Reuse a signed-in browser state</h1><p>Run these steps in Firefox and in Chrome.</p><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_state/signed-in">the sign-in page</a>. The server sets the <code>sessions_state</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"} --></li><li>Save the browser state to <code>sessions-state.json</code> in the output folder, and to <code>sessions-state.json</code> in a <code>tmp</code> folder next to this file.<!-- step {"saveState":{"path":"sessions-state.json","overwrite":true}} --><!-- step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} --></li><li>Load the browser state from <code>sessions-state.json</code> in the output folder.<!-- step {"loadState":"sessions-state.json"} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_state=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_state=signed-in"} --></li><li>Go to <a href="http://localhost:8092/cookies/set/sessions_state/signed-out">the sign-out page</a> again, and load the browser state from <code>tmp/sessions-state.json</code>.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"} --><!-- step {"loadState":{"path":"sessions-state.json","directory":"tmp"}} --></li><li>Go to <a href="http://localhost:8092/cookies">the cookie report</a> again, and check that it shows <strong>sessions_state=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_state=signed-in"} --></li></ol><!-- test end --></body></html>
Reuse a signed-in browser state===============================.. test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]}Run these steps in Firefox and in Chrome.#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_state/signed-in>`__. The server sets the ``sessions_state`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}#. Save the browser state to ``sessions-state.json`` in the output folder, and to ``sessions-state.json`` in a ``tmp`` folder next to this file... step {"saveState":{"path":"sessions-state.json","overwrite":true}}.. step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"}#. Load the browser state from ``sessions-state.json`` in the output folder... step {"loadState":"sessions-state.json"}#. Go to `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_state=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_state=signed-in"}#. Go to `the sign-out page <http://localhost:8092/cookies/set/sessions_state/signed-out>`__ again, and load the browser state from ``tmp/sessions-state.json``... step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"}.. step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}#. Go to `the cookie report <http://localhost:8092/cookies>`__ again, and check that it shows **sessions_state=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_state=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state"><title>Reuse a signed-in browser state</title><taskbody><context><p>Run these steps in Firefox and in Chrome.</p></context><data name="doc-detective" value='test {"testId":"sessions-state","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":[{"name":"firefox","headless":true,"window":{"width":1280,"height":900},"viewport":{"width":1200,"height":800}}],"browserFallback":"off","retries":2},{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true}}]}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_state/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_state</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-state.json</codeph> in the output folder, and to <codeph>sessions-state.json</codeph> in a <codeph>tmp</codeph> folder next to this file.</cmd><info><data name="doc-detective" value='step {"saveState":{"path":"sessions-state.json","overwrite":true}}'/><data name="doc-detective" value='step {"saveState":{"path":"sessions-state.json","directory":"tmp","overwrite":true}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"}'/></info></step><step><cmd>Load the browser state from <codeph>sessions-state.json</codeph> in the output folder.</cmd><info><data name="doc-detective" value='step {"loadState":"sessions-state.json"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_state=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_state=signed-in"}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies/set/sessions_state/signed-out" scope="external" format="html">the sign-out page</xref> again, and load the browser state from <codeph>tmp/sessions-state.json</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_state/signed-out"}'/><data name="doc-detective" value='step {"loadState":{"path":"sessions-state.json","directory":"tmp"}}'/></info></step><step><cmd>Go to <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref> again, and check that it shows <b>sessions_state=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_state=signed-in"}'/></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","runOn": [{"platforms": ["linux","mac","windows"],"browsers": [{"name": "firefox","headless": true,"window": {"width": 1280,"height": 900},"viewport": {"width": 1200,"height": 800}}],"browserFallback": "off","retries": 2},{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true}}],"tests": [{"testId": "sessions-state","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_state/signed-in"},{"saveState": {"path": "sessions-state.json","overwrite": true}},{"saveState": {"path": "sessions-state.json","directory": "tmp","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_state/signed-out"},{"loadState": "sessions-state.json"},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_state=signed-in"},{"goTo": "http://localhost:8092/cookies/set/sessions_state/signed-out"},{"loadState": {"path": "sessions-state.json","directory": "tmp"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_state=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsonrunOn:- platforms: &a1- linux- mac- windowsbrowsers:- name: firefoxheadless: truewindow:width: 1280height: 900viewport:width: 1200height: 800browserFallback: offretries: 2- platforms: *a1browsers:name: chromeheadless: truetests:- testId: sessions-statesteps:- goTo: http://localhost:8092/cookies/set/sessions_state/signed-in- saveState:path: sessions-state.jsonoverwrite: true- saveState:path: sessions-state.jsondirectory: tmpoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_state/signed-out- loadState: sessions-state.json- goTo: http://localhost:8092/cookies- find: sessions_state=signed-in- goTo: http://localhost:8092/cookies/set/sessions_state/signed-out- loadState:path: sessions-state.jsondirectory: tmp- goTo: http://localhost:8092/cookies- find: sessions_state=signed-in
Where the contexts live
The test statement carries runOn in the detected and inline variants, so it applies to that test. The standalone specs set runOn on the spec, where it applies to every test in the file. A test’s own runOn overrides the spec’s. Both shapes resolve to the same two contexts here.
The Firefox context sets browserFallback to off, so a run without a working Firefox skips that context rather than running it in another browser. It also sets retries to 2, so a session that breaks mid-run gets two fresh attempts.
The platforms that don’t match the host report SKIPPED, never FAIL.
Forms in this example
saveStatewithpathandoverwritewrites tooutputDir. Addingdirectorywrites next to the file that holds the test instead.loadStatetakes a path inoutputDiras a string, or an object withpathanddirectory.- The string form of
saveState, such as"saveState": "sessions-state.json", never overwrites a file, so a second run into the sameoutputDirfails. Use the object form withoverwritefor a test that runs more than once.
What detection finds
As in the cookie example, each link becomes a checkLink step, the “Go to” links also become goTo steps, and the bold text becomes a find step. saveState and loadState are statements.
Compare pages in tabs, windows, and sessions
This procedure uses goTo with newTab, newWindow, and surface, startSurface with an array of browser descriptors, find and type with a browser surface, and closeSurface with an array of surfaces.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Click the Open child in new tab link. The child page opens in a new tab.3. In the newest tab, check that the page reads "PAGE linked".4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.
# Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Click the Open child in new tab link. The child page opens in a new tab.3. In the newest tab, check that the page reads "PAGE linked".4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.
= Compare pages in tabs, windows, and sessions. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Click the Open child in new tab link. The child page opens in a new tab.. In the newest tab, check that the page reads "PAGE linked".. In a new tab named `report`, load http://localhost:8092/multi-tab-child.html?page=report[the report page]. Then load http://localhost:8092/multi-tab-child.html?page=scratch[the scratch page] in another new tab.. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".. In a new window named `settings`, with its first tab named `general`, load http://localhost:8092/multi-tab-child.html?page=settings[the settings page]. Then load http://localhost:8092/multi-tab-child.html?page=help[the help page] in another new window.. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.. Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`, and http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`. Check that each one reads its page name.. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load http://localhost:8092/multi-tab-child.html?page=review[the review page] in `reviewer`.. In the first session, go back to http://localhost:8092/multi-tab.html[the multi-tab page], and check that it reads "MULTI-TAB HOME".. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.
<!DOCTYPE html><html lang="en"><head><title>Compare pages in tabs, windows, and sessions</title></head><body><h1>Compare pages in tabs, windows, and sessions</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Click the Open child in new tab link. The child page opens in a new tab.</li><li>In the newest tab, check that the page reads "PAGE linked".</li><li>In a new tab named <code>report</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=scratch">the scratch page</a> in another new tab.</li><li>Check that the <code>report</code> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".</li><li>In a new window named <code>settings</code>, with its first tab named <code>general</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=help">the help page</a> in another new window.</li><li>Check that the <code>settings</code> window and its <code>general</code> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".</li><li>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".</li><li>Type <code>hello</code> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>, and <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>. Check that each one reads its page name.</li><li>Start two more Firefox sessions: <code>reviewer</code>, with an 800 by 600 viewport, and <code>editor</code>, with a 1024 by 768 window. Load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a> in <code>reviewer</code>.</li><li>In the first session, go back to <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>, and check that it reads "MULTI-TAB HOME".</li><li>Close the <code>report</code> and <code>notes</code> tabs, the scratch tab, the child tab, the help, <code>settings</code>, and <code>about</code> windows, and the <code>reviewer</code> and <code>editor</code> sessions.</li></ol></body></html>
Compare pages in tabs, windows, and sessions============================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Click the Open child in new tab link. The child page opens in a new tab.#. In the newest tab, check that the page reads "PAGE linked".#. In a new tab named ``report``, load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__. Then load `the scratch page <http://localhost:8092/multi-tab-child.html?page=scratch>`__ in another new tab.#. Check that the ``report`` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".#. In a new window named ``settings``, with its first tab named ``general``, load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__. Then load `the help page <http://localhost:8092/multi-tab-child.html?page=help>`__ in another new window.#. Check that the ``settings`` window and its ``general`` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".#. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".#. Type ``hello`` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``, and `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``. Check that each one reads its page name.#. Start two more Firefox sessions: ``reviewer``, with an 800 by 600 viewport, and ``editor``, with a 1024 by 768 window. Load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__ in ``reviewer``.#. In the first session, go back to `the multi-tab page <http://localhost:8092/multi-tab.html>`__, and check that it reads "MULTI-TAB HOME".#. Close the ``report`` and ``notes`` tabs, the scratch tab, the child tab, the help, ``settings``, and ``about`` windows, and the ``reviewer`` and ``editor`` sessions.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-tabs"><title>Compare pages in tabs, windows, and sessions</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd></step><step><cmd>In the newest tab, check that the page reads "PAGE linked".</cmd></step><step><cmd>In a new tab named <codeph>report</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=scratch" scope="external" format="html">the scratch page</xref> in another new tab.</cmd></step><step><cmd>Check that the <codeph>report</codeph> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".</cmd></step><step><cmd>In a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=help" scope="external" format="html">the help page</xref> in another new window.</cmd></step><step><cmd>Check that the <codeph>settings</codeph> window and its <codeph>general</codeph> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".</cmd></step><step><cmd>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".</cmd></step><step><cmd>Type <codeph>hello</codeph> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>, and <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>. Check that each one reads its page name.</cmd></step><step><cmd>Start two more Firefox sessions: <codeph>reviewer</codeph>, with an 800 by 600 viewport, and <codeph>editor</codeph>, with a 1024 by 768 window. Load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref> in <codeph>reviewer</codeph>.</cmd></step><step><cmd>In the first session, go back to <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>, and check that it reads "MULTI-TAB HOME".</cmd></step><step><cmd>Close the <codeph>report</codeph> and <codeph>notes</codeph> tabs, the scratch tab, the child tab, the help, <codeph>settings</codeph>, and <codeph>about</codeph> windows, and the <codeph>reviewer</codeph> and <codeph>editor</codeph> sessions.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} -->3. In the newest tab, check that the page reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} -->4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} -->5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".<!-- step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} --><!-- step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} -->6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} -->7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} --><!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} -->8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} -->9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.<!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} --><!-- step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} -->10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --><!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --><!-- step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} -->11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.<!-- step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} -->12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} --><!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} -->13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.<!-- step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} --><!-- test end -->
{/* test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Click the Open child in new tab link. The child page opens in a new tab.{/* step {"click":"Open child in new tab"} */}3. In the newest tab, check that the page reads "PAGE linked".{/* step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} */}4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} */}5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".{/* step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} */}{/* step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} */}6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} */}7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} */}{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} */}8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} */}9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} */}{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} */}{/* step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} */}{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} */}10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} */}{/* step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} */}{/* step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} */}11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.{/* step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} */}12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".{/* step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} */}{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} */}13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.{/* step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} */}{/* test end */}
= Compare pages in tabs, windows, and sessions// (test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Click the Open child in new tab link. The child page opens in a new tab.+// (step {"click":"Open child in new tab"}). In the newest tab, check that the page reads "PAGE linked".+// (step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}). In a new tab named `report`, load http://localhost:8092/multi-tab-child.html?page=report[the report page]. Then load http://localhost:8092/multi-tab-child.html?page=scratch[the scratch page] in another new tab.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}). Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".+// (step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}})+// (step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}). In a new window named `settings`, with its first tab named `general`, load http://localhost:8092/multi-tab-child.html?page=settings[the settings page]. Then load http://localhost:8092/multi-tab-child.html?page=help[the help page] in another new window.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}). Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}})+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}). In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}). Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}})+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}})+// (step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}})+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}). Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`, and http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`. Check that each one reads its page name.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}})+// (step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}})+// (step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}). Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load http://localhost:8092/multi-tab-child.html?page=review[the review page] in `reviewer`.+// (step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}). In the first session, go back to http://localhost:8092/multi-tab.html[the multi-tab page], and check that it reads "MULTI-TAB HOME".+// (step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}})+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}). Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.+// (step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare pages in tabs, windows, and sessions</title></head><body><!-- test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Compare pages in tabs, windows, and sessions</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} --></li><li>In the newest tab, check that the page reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} --></li><li>In a new tab named <code>report</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=scratch">the scratch page</a> in another new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} --></li><li>Check that the <code>report</code> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".<!-- step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} --><!-- step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} --></li><li>In a new window named <code>settings</code>, with its first tab named <code>general</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=help">the help page</a> in another new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} --></li><li>Check that the <code>settings</code> window and its <code>general</code> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} --><!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --></li><li>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} --></li><li>Type <code>hello</code> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.<!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} --><!-- step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>, and <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>. Check that each one reads its page name.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --><!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --><!-- step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} --></li><li>Start two more Firefox sessions: <code>reviewer</code>, with an 800 by 600 viewport, and <code>editor</code>, with a 1024 by 768 window. Load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a> in <code>reviewer</code>.<!-- step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>In the first session, go back to <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>, and check that it reads "MULTI-TAB HOME".<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} --><!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} --></li><li>Close the <code>report</code> and <code>notes</code> tabs, the scratch tab, the child tab, the help, <code>settings</code>, and <code>about</code> windows, and the <code>reviewer</code> and <code>editor</code> sessions.<!-- step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} --></li></ol><!-- test end --></body></html>
Compare pages in tabs, windows, and sessions============================================.. test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Click the Open child in new tab link. The child page opens in a new tab... step {"click":"Open child in new tab"}#. In the newest tab, check that the page reads "PAGE linked"... step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}#. In a new tab named ``report``, load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__. Then load `the scratch page <http://localhost:8092/multi-tab-child.html?page=scratch>`__ in another new tab... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}#. Check that the ``report`` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch"... step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}}.. step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}#. In a new window named ``settings``, with its first tab named ``general``, load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__. Then load `the help page <http://localhost:8092/multi-tab-child.html?page=help>`__ in another new window... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}#. Check that the ``settings`` window and its ``general`` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help"... step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}}.. step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}#. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}#. Type ``hello`` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened... step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}.. step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}}.. step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}}.. step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``, and `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``. Check that each one reads its page name... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}.. step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}.. step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}#. Start two more Firefox sessions: ``reviewer``, with an 800 by 600 viewport, and ``editor``, with a 1024 by 768 window. Load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__ in ``reviewer``... step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}#. In the first session, go back to `the multi-tab page <http://localhost:8092/multi-tab.html>`__, and check that it reads "MULTI-TAB HOME"... step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}}.. step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}#. Close the ``report`` and ``notes`` tabs, the scratch tab, the child tab, the help, ``settings``, and ``about`` windows, and the ``reviewer`` and ``editor`` sessions... step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-tabs"><title>Compare pages in tabs, windows, and sessions</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-tabs","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd><info><data name="doc-detective" value='step {"click":"Open child in new tab"}'/></info></step><step><cmd>In the newest tab, check that the page reads "PAGE linked".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}'/></info></step><step><cmd>In a new tab named <codeph>report</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=scratch" scope="external" format="html">the scratch page</xref> in another new tab.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}'/></info></step><step><cmd>Check that the <codeph>report</codeph> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}'/></info></step><step><cmd>In a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=help" scope="external" format="html">the help page</xref> in another new window.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}'/></info></step><step><cmd>Check that the <codeph>settings</codeph> window and its <codeph>general</codeph> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}'/></info></step><step><cmd>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}'/></info></step><step><cmd>Type <codeph>hello</codeph> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.</cmd><info><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}'/><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}}'/><data name="doc-detective" value='step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}}'/><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>, and <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>. Check that each one reads its page name.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}'/></info></step><step><cmd>Start two more Firefox sessions: <codeph>reviewer</codeph>, with an 800 by 600 viewport, and <codeph>editor</codeph>, with a 1024 by 768 window. Load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref> in <codeph>reviewer</codeph>.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>In the first session, go back to <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>, and check that it reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}}'/><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}'/></info></step><step><cmd>Close the <codeph>report</codeph> and <codeph>notes</codeph> tabs, the scratch tab, the child tab, the help, <codeph>settings</codeph>, and <codeph>about</codeph> windows, and the <codeph>reviewer</codeph> and <codeph>editor</codeph> sessions.</cmd><info><data name="doc-detective" value='step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} -->3. In the newest tab, check that the page reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} -->4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} -->5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".<!-- step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} --><!-- step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} -->6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} -->7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} --><!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} -->8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} -->9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.<!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} --><!-- step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} -->10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --><!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --><!-- step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} -->11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.<!-- step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} -->12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} --><!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} -->13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.<!-- step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} --><!-- test end -->
{/* test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Compare pages in tabs, windows, and sessions1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Click the Open child in new tab link. The child page opens in a new tab.{/* step {"click":"Open child in new tab"} */}3. In the newest tab, check that the page reads "PAGE linked".{/* step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} */}4. In a new tab named `report`, load [the report page](http://localhost:8092/multi-tab-child.html?page=report). Then load [the scratch page](http://localhost:8092/multi-tab-child.html?page=scratch) in another new tab.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} */}5. Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".{/* step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} */}{/* step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} */}6. In a new window named `settings`, with its first tab named `general`, load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings). Then load [the help page](http://localhost:8092/multi-tab-child.html?page=help) in another new window.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} */}7. Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} */}{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} */}{/* step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} */}8. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} */}9. Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} */}{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} */}{/* step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} */}{/* step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} */}10. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`, and [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`. Check that each one reads its page name.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} */}{/* step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} */}{/* step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} */}11. Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load [the review page](http://localhost:8092/multi-tab-child.html?page=review) in `reviewer`.{/* step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} */}{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} */}12. In the first session, go back to [the multi-tab page](http://localhost:8092/multi-tab.html), and check that it reads "MULTI-TAB HOME".{/* step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} */}{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} */}13. Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.{/* step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} */}{/* test end */}
= Compare pages in tabs, windows, and sessions// (test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Click the Open child in new tab link. The child page opens in a new tab.+// (step {"click":"Open child in new tab"}). In the newest tab, check that the page reads "PAGE linked".+// (step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}). In a new tab named `report`, load http://localhost:8092/multi-tab-child.html?page=report[the report page]. Then load http://localhost:8092/multi-tab-child.html?page=scratch[the scratch page] in another new tab.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}). Check that the `report` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".+// (step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}})+// (step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}). In a new window named `settings`, with its first tab named `general`, load http://localhost:8092/multi-tab-child.html?page=settings[the settings page]. Then load http://localhost:8092/multi-tab-child.html?page=help[the help page] in another new window.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}). Check that the `settings` window and its `general` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}})+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}})+// (step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}). In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}). Type `hello` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}})+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}})+// (step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}})+// (step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}). Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`, and http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`. Check that each one reads its page name.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}})+// (step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}})+// (step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}). Start two more Firefox sessions: `reviewer`, with an 800 by 600 viewport, and `editor`, with a 1024 by 768 window. Load http://localhost:8092/multi-tab-child.html?page=review[the review page] in `reviewer`.+// (step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]})+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}). In the first session, go back to http://localhost:8092/multi-tab.html[the multi-tab page], and check that it reads "MULTI-TAB HOME".+// (step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}})+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}). Close the `report` and `notes` tabs, the scratch tab, the child tab, the help, `settings`, and `about` windows, and the `reviewer` and `editor` sessions.+// (step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare pages in tabs, windows, and sessions</title></head><body><!-- test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Compare pages in tabs, windows, and sessions</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} --></li><li>In the newest tab, check that the page reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}} --></li><li>In a new tab named <code>report</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=scratch">the scratch page</a> in another new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}} --></li><li>Check that the <code>report</code> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".<!-- step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}} --><!-- step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}} --></li><li>In a new window named <code>settings</code>, with its first tab named <code>general</code>, load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a>. Then load <a href="http://localhost:8092/multi-tab-child.html?page=help">the help page</a> in another new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}} --></li><li>Check that the <code>settings</code> window and its <code>general</code> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}} --><!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}} --><!-- step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --></li><li>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}} --></li><li>Type <code>hello</code> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.<!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}} --><!-- step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}} --><!-- step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>, and <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>. Check that each one reads its page name.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --><!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --><!-- step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}} --></li><li>Start two more Firefox sessions: <code>reviewer</code>, with an 800 by 600 viewport, and <code>editor</code>, with a 1024 by 768 window. Load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a> in <code>reviewer</code>.<!-- step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]} --><!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>In the first session, go back to <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>, and check that it reads "MULTI-TAB HOME".<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}} --><!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}} --></li><li>Close the <code>report</code> and <code>notes</code> tabs, the scratch tab, the child tab, the help, <code>settings</code>, and <code>about</code> windows, and the <code>reviewer</code> and <code>editor</code> sessions.<!-- step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]} --></li></ol><!-- test end --></body></html>
Compare pages in tabs, windows, and sessions============================================.. test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Click the Open child in new tab link. The child page opens in a new tab... step {"click":"Open child in new tab"}#. In the newest tab, check that the page reads "PAGE linked"... step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}#. In a new tab named ``report``, load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__. Then load `the scratch page <http://localhost:8092/multi-tab-child.html?page=scratch>`__ in another new tab... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}#. Check that the ``report`` tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch"... step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}}.. step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}#. In a new window named ``settings``, with its first tab named ``general``, load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__. Then load `the help page <http://localhost:8092/multi-tab-child.html?page=help>`__ in another new window... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}#. Check that the ``settings`` window and its ``general`` tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help"... step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}}.. step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}}.. step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}#. In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}#. Type ``hello`` in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened... step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}.. step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}}.. step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}}.. step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``, and `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``. Check that each one reads its page name... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}.. step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}.. step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}#. Start two more Firefox sessions: ``reviewer``, with an 800 by 600 viewport, and ``editor``, with a 1024 by 768 window. Load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__ in ``reviewer``... step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]}.. step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}#. In the first session, go back to `the multi-tab page <http://localhost:8092/multi-tab.html>`__, and check that it reads "MULTI-TAB HOME"... step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}}.. step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}#. Close the ``report`` and ``notes`` tabs, the scratch tab, the child tab, the help, ``settings``, and ``about`` windows, and the ``reviewer`` and ``editor`` sessions... step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-tabs"><title>Compare pages in tabs, windows, and sessions</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-tabs","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd><info><data name="doc-detective" value='step {"click":"Open child in new tab"}'/></info></step><step><cmd>In the newest tab, check that the page reads "PAGE linked".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","tab":{"index":-1}}}}'/></info></step><step><cmd>In a new tab named <codeph>report</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=scratch" scope="external" format="html">the scratch page</xref> in another new tab.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch","newTab":true}}'/></info></step><step><cmd>Check that the <codeph>report</codeph> tab reads "PAGE report", and that the tab showing the scratch page reads "PAGE scratch".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE report","surface":{"browser":"firefox","tab":"report"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE scratch","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}}}}'/></info></step><step><cmd>In a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>, load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref>. Then load <xref href="http://localhost:8092/multi-tab-child.html?page=help" scope="external" format="html">the help page</xref> in another new window.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=help","newWindow":true}}'/></info></step><step><cmd>Check that the <codeph>settings</codeph> window and its <codeph>general</codeph> tab read "PAGE settings", and that the newest window, titled "Child help", reads "PAGE help".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":"settings"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":-1}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"title":"Child help"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE help","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}'/></info></step><step><cmd>In the first window, check that the tab titled "Multi-tab home" still reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","window":{"index":0},"tab":{"title":"Multi-tab home"}}}}'/></info></step><step><cmd>Type <codeph>hello</codeph> in the echo box of the help window, which is also the newest window, and of the child tab, the second tab opened.</cmd><info><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":{"url":"http://localhost:8092/multi-tab-child.html?page=help"}}}}'/><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","window":-1}}}'/><data name="doc-detective" value='step {"type":{"keys":" again","selector":"#echo-input","surface":{"browser":"firefox","window":{"index":-1}}}}'/><data name="doc-detective" value='step {"type":{"keys":"hello","selector":"#echo-input","surface":{"browser":"firefox","tab":1}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>, and <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>. Check that each one reads its page name.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"PAGE about","surface":{"browser":"firefox","window":"about"}}}'/></info></step><step><cmd>Start two more Firefox sessions: <codeph>reviewer</codeph>, with an 800 by 600 viewport, and <codeph>editor</codeph>, with a 1024 by 768 window. Load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref> in <codeph>reviewer</codeph>.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"browser":"firefox","name":"reviewer","headless":true,"viewport":{"width":800,"height":600}},{"browser":"firefox","name":"editor","headless":true,"size":{"width":1024,"height":768}}]}'/><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>In the first session, go back to <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>, and check that it reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab.html","surface":"firefox"}}'/><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":"firefox"}}'/></info></step><step><cmd>Close the <codeph>report</codeph> and <codeph>notes</codeph> tabs, the scratch tab, the child tab, the help, <codeph>settings</codeph>, and <codeph>about</codeph> windows, and the <codeph>reviewer</codeph> and <codeph>editor</codeph> sessions.</cmd><info><data name="doc-detective" value='step {"closeSurface":[{"browser":"firefox","tab":{"name":"report"}},{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser":"firefox","tab":{"index":1}},{"browser":"firefox","window":{"title":"Child help"}},{"browser":"firefox","window":{"name":"settings"}},{"browser":"firefox","tab":"notes"},{"browser":"firefox","window":"about"},{"browser":"firefox","name":"reviewer"},"editor"]}'/></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": "sessions-tabs","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"click": "Open child in new tab"},{"find": {"elementText": "PAGE linked","surface": {"browser": "firefox","tab": {"index": -1}}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=report","newTab": {"name": "report"}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=scratch","newTab": true}},{"find": {"elementText": "PAGE report","surface": {"browser": "firefox","tab": "report"}}},{"find": {"elementText": "PAGE scratch","surface": {"browser": "firefox","tab": {"url": "http://localhost:8092/multi-tab-child.html?page=scratch"}}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=settings","newWindow": {"name": "settings","tab": "general"}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=help","newWindow": true}},{"find": {"elementText": "PAGE settings","surface": {"browser": "firefox","window": "settings"}}},{"find": {"elementText": "PAGE settings","surface": {"browser": "firefox","window": {"name": "settings"},"tab": {"name": "general"}}}},{"find": {"elementText": "PAGE help","surface": {"browser": "firefox","window": -1}}},{"find": {"elementText": "PAGE help","surface": {"browser": "firefox","window": {"title": "Child help"}}}},{"find": {"elementText": "PAGE help","surface": {"browser": "firefox","window": {"url": "http://localhost:8092/multi-tab-child.html?page=help"}}}},{"find": {"elementText": "MULTI-TAB HOME","surface": {"browser": "firefox","window": {"index": 0},"tab": {"title": "Multi-tab home"}}}},{"type": {"keys": "hello","selector": "#echo-input","surface": {"browser": "firefox","window": {"url": "http://localhost:8092/multi-tab-child.html?page=help"}}}},{"type": {"keys": "hello","selector": "#echo-input","surface": {"browser": "firefox","window": -1}}},{"type": {"keys": " again","selector": "#echo-input","surface": {"browser": "firefox","window": {"index": -1}}}},{"type": {"keys": "hello","selector": "#echo-input","surface": {"browser": "firefox","tab": 1}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=notes","newTab": "notes"}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=about","newWindow": "about"}},{"find": {"elementText": "PAGE notes","surface": {"browser": "firefox","tab": "notes"}}},{"find": {"elementText": "PAGE about","surface": {"browser": "firefox","window": "about"}}},{"startSurface": [{"browser": "firefox","name": "reviewer","headless": true,"viewport": {"width": 800,"height": 600}},{"browser": "firefox","name": "editor","headless": true,"size": {"width": 1024,"height": 768}}]},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=review","surface": {"browser": "firefox","name": "reviewer"}}},{"goTo": {"url": "http://localhost:8092/multi-tab.html","surface": "firefox"}},{"find": {"elementText": "MULTI-TAB HOME","surface": "firefox"}},{"closeSurface": [{"browser": "firefox","tab": {"name": "report"}},{"browser": "firefox","tab": {"url": "http://localhost:8092/multi-tab-child.html?page=scratch"}},{"browser": "firefox","tab": {"index": 1}},{"browser": "firefox","window": {"title": "Child help"}},{"browser": "firefox","window": {"name": "settings"}},{"browser": "firefox","tab": "notes"},{"browser": "firefox","window": "about"},{"browser": "firefox","name": "reviewer"},"editor"]}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-tabsrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- click: Open child in new tab- find:elementText: PAGE linkedsurface:browser: firefoxtab:index: -1- goTo:url: http://localhost:8092/multi-tab-child.html?page=reportnewTab:name: report- goTo:url: http://localhost:8092/multi-tab-child.html?page=scratchnewTab: true- find:elementText: PAGE reportsurface:browser: firefoxtab: report- find:elementText: PAGE scratchsurface:browser: firefoxtab:url: http://localhost:8092/multi-tab-child.html?page=scratch- goTo:url: http://localhost:8092/multi-tab-child.html?page=settingsnewWindow:name: settingstab: general- goTo:url: http://localhost:8092/multi-tab-child.html?page=helpnewWindow: true- find:elementText: PAGE settingssurface:browser: firefoxwindow: settings- find:elementText: PAGE settingssurface:browser: firefoxwindow:name: settingstab:name: general- find:elementText: PAGE helpsurface:browser: firefoxwindow: -1- find:elementText: PAGE helpsurface:browser: firefoxwindow:title: Child help- find:elementText: PAGE helpsurface:browser: firefoxwindow:url: http://localhost:8092/multi-tab-child.html?page=help- find:elementText: MULTI-TAB HOMEsurface:browser: firefoxwindow:index: 0tab:title: Multi-tab home- type:keys: helloselector: "#echo-input"surface:browser: firefoxwindow:url: http://localhost:8092/multi-tab-child.html?page=help- type:keys: helloselector: "#echo-input"surface:browser: firefoxwindow: -1- type:keys: " again"selector: "#echo-input"surface:browser: firefoxwindow:index: -1- type:keys: helloselector: "#echo-input"surface:browser: firefoxtab: 1- goTo:url: http://localhost:8092/multi-tab-child.html?page=notesnewTab: notes- goTo:url: http://localhost:8092/multi-tab-child.html?page=aboutnewWindow: about- find:elementText: PAGE notessurface:browser: firefoxtab: notes- find:elementText: PAGE aboutsurface:browser: firefoxwindow: about- startSurface:- browser: firefoxname: reviewerheadless: trueviewport:width: 800height: 600- browser: firefoxname: editorheadless: truesize:width: 1024height: 768- goTo:url: http://localhost:8092/multi-tab-child.html?page=reviewsurface:browser: firefoxname: reviewer- goTo:url: http://localhost:8092/multi-tab.htmlsurface: firefox- find:elementText: MULTI-TAB HOMEsurface: firefox- closeSurface:- browser: firefoxtab:name: report- browser: firefoxtab:url: http://localhost:8092/multi-tab-child.html?page=scratch- browser: firefoxtab:index: 1- browser: firefoxwindow:title: Child help- browser: firefoxwindow:name: settings- browser: firefoxtab: notes- browser: firefoxwindow: about- browser: firefoxname: reviewer- editor
Opening tabs, windows, and sessions
| Step | Opens |
|---|---|
"newTab": { "name": "report" }, "newTab": "notes" | A tab with that name. |
"newTab": true | A tab with no name. |
"newWindow": { "name": "settings", "tab": "general" } | A window named settings, with its first tab named general. |
"newWindow": "about" | A window with that name. |
"newWindow": true | A window with no name. |
"startSurface": [ … ] | Each browser session in the array: reviewer with a set viewport, and editor with a set window size. |
Selecting a surface
A window or tab selector takes a number, a name, or an object.
| Selector | Picks |
|---|---|
"tab": 1, "tab": { "index": 1 } | The tab at that position in creation order. |
"tab": { "index": -1 }, "window": -1, "window": { "index": -1 } | The newest tab or window. |
"window": { "index": 0 } | The first window. |
"tab": "report", "tab": { "name": "report" } | The tab with that name. |
"window": "settings", "window": { "name": "settings" } | The window with that name. |
"tab": { "title": "…" }, "window": { "title": "…" } | The tab or window whose title matches. |
"tab": { "url": "…" }, "window": { "url": "…" } | The tab or window whose URL matches. |
"firefox" | The default Firefox session, by engine name. |
{ "browser": "firefox", "name": "reviewer" }, "reviewer" | The session that startSurface named. |
Browser surface selectors name the engine, so the test pins its context to headless Firefox with browserFallback set to off. Without Firefox, the test skips rather than addressing an engine that isn’t running.
What detection finds
Each link becomes a checkLink step. None of the links follows a navigation verb, so detection opens no pages, and statements hold every navigation, click, and surface step.
Check what the page sees in an emulated browser
This procedure runs in one context, named with contextId, whose Chrome browser sets colorScheme, locale, timezone, deviceScaleFactor, reducedMotion, and clock. runBrowserScript steps read each setting back from the page.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).2. Check that the page prefers the dark color scheme and reduced motion.3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.
# Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).2. Check that the page prefers the dark color scheme and reduced motion.3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.
= Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.. Start at http://localhost:8092/index.html[the test site's home page].. Check that the page prefers the dark color scheme and reduced motion.. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.
<!DOCTYPE html><html lang="en"><head><title>Check what the page sees in an emulated browser</title></head><body><h1>Check what the page sees in an emulated browser</h1><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p><ol><li>Start at <a href="http://localhost:8092/index.html">the test site's home page</a>.</li><li>Check that the page prefers the dark color scheme and reduced motion.</li><li>Check that the page's language is <code>de-DE</code> and its time zone is <code>Europe/Berlin</code>.</li><li>Check that the device pixel ratio is <code>2</code>, and that the clock reads December 3, 2026, 09:00 UTC.</li></ol></body></html>
Check what the page sees in an emulated browser===============================================Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.#. Start at `the test site's home page <http://localhost:8092/index.html>`__.#. Check that the page prefers the dark color scheme and reduced motion.#. Check that the page's language is ``de-DE`` and its time zone is ``Europe/Berlin``.#. Check that the device pixel ratio is ``2``, and that the clock reads December 3, 2026, 09:00 UTC.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-contexts"><title>Check what the page sees in an emulated browser</title><taskbody><context><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p></context><steps><step><cmd>Start at <xref href="http://localhost:8092/index.html" scope="external" format="html">the test site's home page</xref>.</cmd></step><step><cmd>Check that the page prefers the dark color scheme and reduced motion.</cmd></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph> and its time zone is <codeph>Europe/Berlin</codeph>.</cmd></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>, and that the clock reads December 3, 2026, 09:00 UTC.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} --># Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).<!-- step {"goTo":"http://localhost:8092/index.html"} -->2. Check that the page prefers the dark color scheme and reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} -->3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} -->4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --><!-- test end -->
{/* test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} */}# Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).{/* step {"goTo":"http://localhost:8092/index.html"} */}2. Check that the page prefers the dark color scheme and reduced motion.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} */}{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} */}3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} */}{/* step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} */}4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} */}{/* step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} */}{/* test end */}
= Check what the page sees in an emulated browser// (test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]})Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.. Start at http://localhost:8092/index.html[the test site's home page].+// (step {"goTo":"http://localhost:8092/index.html"}). Check that the page prefers the dark color scheme and reduced motion.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}})+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}). Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}})+// (step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}). Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}})+// (step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check what the page sees in an emulated browser</title></head><body><!-- test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} --><h1>Check what the page sees in an emulated browser</h1><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p><ol><li>Start at <a href="http://localhost:8092/index.html">the test site's home page</a>.<!-- step {"goTo":"http://localhost:8092/index.html"} --></li><li>Check that the page prefers the dark color scheme and reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --></li><li>Check that the page's language is <code>de-DE</code> and its time zone is <code>Europe/Berlin</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --></li><li>Check that the device pixel ratio is <code>2</code>, and that the clock reads December 3, 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --></li></ol><!-- test end --></body></html>
Check what the page sees in an emulated browser===============================================.. test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]}Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.#. Start at `the test site's home page <http://localhost:8092/index.html>`__... step {"goTo":"http://localhost:8092/index.html"}#. Check that the page prefers the dark color scheme and reduced motion... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}.. step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}#. Check that the page's language is ``de-DE`` and its time zone is ``Europe/Berlin``... step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}.. step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}#. Check that the device pixel ratio is ``2``, and that the clock reads December 3, 2026, 09:00 UTC... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}.. step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-contexts"><title>Check what the page sees in an emulated browser</title><taskbody><context><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p></context><data name="doc-detective" value='test {"testId":"sessions-contexts","detectSteps":true,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/index.html" scope="external" format="html">the test site's home page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/index.html"}'/></info></step><step><cmd>Check that the page prefers the dark color scheme and reduced motion.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}'/></info></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph> and its time zone is <codeph>Europe/Berlin</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}'/></info></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>, and that the clock reads December 3, 2026, 09:00 UTC.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} --># Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).<!-- step {"goTo":"http://localhost:8092/index.html"} -->2. Check that the page prefers the dark color scheme and reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} -->3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} -->4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --><!-- test end -->
{/* test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} */}# Check what the page sees in an emulated browserRun these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.1. Start at [the test site's home page](http://localhost:8092/index.html).{/* step {"goTo":"http://localhost:8092/index.html"} */}2. Check that the page prefers the dark color scheme and reduced motion.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} */}{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} */}3. Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} */}{/* step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} */}4. Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} */}{/* step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} */}{/* test end */}
= Check what the page sees in an emulated browser// (test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]})Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.. Start at http://localhost:8092/index.html[the test site's home page].+// (step {"goTo":"http://localhost:8092/index.html"}). Check that the page prefers the dark color scheme and reduced motion.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}})+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}). Check that the page's language is `de-DE` and its time zone is `Europe/Berlin`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}})+// (step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}). Check that the device pixel ratio is `2`, and that the clock reads December 3, 2026, 09:00 UTC.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}})+// (step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check what the page sees in an emulated browser</title></head><body><!-- test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]} --><h1>Check what the page sees in an emulated browser</h1><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p><ol><li>Start at <a href="http://localhost:8092/index.html">the test site's home page</a>.<!-- step {"goTo":"http://localhost:8092/index.html"} --></li><li>Check that the page prefers the dark color scheme and reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --></li><li>Check that the page's language is <code>de-DE</code> and its time zone is <code>Europe/Berlin</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --></li><li>Check that the device pixel ratio is <code>2</code>, and that the clock reads December 3, 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --></li></ol><!-- test end --></body></html>
Check what the page sees in an emulated browser===============================================.. test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]}Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.#. Start at `the test site's home page <http://localhost:8092/index.html>`__... step {"goTo":"http://localhost:8092/index.html"}#. Check that the page prefers the dark color scheme and reduced motion... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}.. step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}#. Check that the page's language is ``de-DE`` and its time zone is ``Europe/Berlin``... step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}.. step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}#. Check that the device pixel ratio is ``2``, and that the clock reads December 3, 2026, 09:00 UTC... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}.. step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-contexts"><title>Check what the page sees in an emulated browser</title><taskbody><context><p>Run these steps in headless Chrome set to dark mode, German, Berlin time, a 2x display, reduced motion, and a fixed clock.</p></context><data name="doc-detective" value='test {"testId":"sessions-contexts","detectSteps":false,"runOn":[{"contextId":"sessions-emulated-chrome","platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark","locale":"de-DE","timezone":"Europe/Berlin","deviceScaleFactor":2,"reducedMotion":"reduce","clock":"2026-12-03T09:00:00Z"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/index.html" scope="external" format="html">the test site's home page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/index.html"}'/></info></step><step><cmd>Check that the page prefers the dark color scheme and reduced motion.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}'/></info></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph> and its time zone is <codeph>Europe/Berlin</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}'/></info></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>, and that the clock reads December 3, 2026, 09:00 UTC.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}'/><data name="doc-detective" value='step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}'/></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": "sessions-contexts","runOn": [{"contextId": "sessions-emulated-chrome","platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"colorScheme": "dark","locale": "de-DE","timezone": "Europe/Berlin","deviceScaleFactor": 2,"reducedMotion": "reduce","clock": "2026-12-03T09:00:00Z"}}],"steps": [{"goTo": "http://localhost:8092/index.html"},{"runBrowserScript": {"script": "return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output": "true"}},{"runBrowserScript": {"script": "return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output": "true"}},{"runBrowserScript": {"script": "return navigator.language;","output": "de-DE"}},{"runBrowserScript": {"script": "return Intl.DateTimeFormat().resolvedOptions().timeZone;","output": "Europe/Berlin"}},{"runBrowserScript": {"script": "return String(devicePixelRatio);","output": "2"}},{"runBrowserScript": {"script": "return new Date().toISOString();","output": "/^2026-12-03T09:00/"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-contextsrunOn:- contextId: sessions-emulated-chromeplatforms:- linux- mac- windowsbrowsers:name: chromeheadless: truecolorScheme: darklocale: de-DEtimezone: Europe/BerlindeviceScaleFactor: 2reducedMotion: reduceclock: 2026-12-03T09:00:00Zsteps:- goTo: http://localhost:8092/index.html- runBrowserScript:script: 'return String(matchMedia("(prefers-color-scheme: dark)").matches);'output: "true"- runBrowserScript:script: 'return String(matchMedia("(prefers-reduced-motion: reduce)").matches);'output: "true"- runBrowserScript:script: return navigator.language;output: de-DE- runBrowserScript:script: return Intl.DateTimeFormat().resolvedOptions().timeZone;output: Europe/Berlin- runBrowserScript:script: return String(devicePixelRatio);output: "2"- runBrowserScript:script: return new Date().toISOString();output: /^2026-12-03T09:00/
Chrome sets every one of these keys. Firefox sets all but timezone and clock, and skips a context that asks for either. See Platforms and browsers.
What detection finds
The only link comes after Start at, which isn’t a navigation verb, so detection adds a checkLink step, and a goTo statement opens the page.
Test pages on your own site
This procedure gives goTo paths rather than full URLs. The config’s origin supplies the scheme and host, and originParams adds query parameters to each URL it builds.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.
# Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.
= Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.. Go to `/cookies/set/sessions_origin/visited`.. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.
<!DOCTYPE html><html lang="en"><head><title>Test pages on your own site</title></head><body><h1>Test pages on your own site</h1><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p><ol><li>Go to <code>/cookies/set/sessions_origin/visited</code>.</li><li>Go to <code>/cookies</code>, and check that the page shows <code>sessions_origin=visited</code>.</li><li>Go to <code>/api/echo</code>, and check that the response echoes the <code>from</code> parameter that the config adds: <code>"from":"docs"</code>.</li></ol></body></html>
Test pages on your own site===========================These steps use paths, not full URLs. The run's config sets the site's origin.#. Go to ``/cookies/set/sessions_origin/visited``.#. Go to ``/cookies``, and check that the page shows ``sessions_origin=visited``.#. Go to ``/api/echo``, and check that the response echoes the ``from`` parameter that the config adds: ``"from":"docs"``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-origin"><title>Test pages on your own site</title><taskbody><context><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p></context><steps><step><cmd>Go to <codeph>/cookies/set/sessions_origin/visited</codeph>.</cmd></step><step><cmd>Go to <codeph>/cookies</codeph>, and check that the page shows <codeph>sessions_origin=visited</codeph>.</cmd></step><step><cmd>Go to <codeph>/api/echo</codeph>, and check that the response echoes the <codeph>from</codeph> parameter that the config adds: <codeph>"from":"docs"</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} --># Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.<!-- step {"goTo":"/cookies/set/sessions_origin/visited"} -->2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.<!-- step {"goTo":"/cookies"} --><!-- step {"find":"sessions_origin=visited"} -->3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.<!-- step {"goTo":"/api/echo"} --><!-- step {"find":"/\"from\":\"docs\"/"} --><!-- test end -->
{/* test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} */}# Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.{/* step {"goTo":"/cookies/set/sessions_origin/visited"} */}2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.{/* step {"goTo":"/cookies"} */}{/* step {"find":"sessions_origin=visited"} */}3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.{/* step {"goTo":"/api/echo"} */}{/* step {"find":"/\"from\":\"docs\"/"} */}{/* test end */}
= Test pages on your own site// (test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]})These steps use paths, not full URLs. The run's config sets the site's origin.. Go to `/cookies/set/sessions_origin/visited`.+// (step {"goTo":"/cookies/set/sessions_origin/visited"}). Go to `/cookies`, and check that the page shows `sessions_origin=visited`.+// (step {"goTo":"/cookies"})+// (step {"find":"sessions_origin=visited"}). Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.+// (step {"goTo":"/api/echo"})+// (step {"find":"/\"from\":\"docs\"/"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Test pages on your own site</title></head><body><!-- test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} --><h1>Test pages on your own site</h1><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p><ol><li>Go to <code>/cookies/set/sessions_origin/visited</code>.<!-- step {"goTo":"/cookies/set/sessions_origin/visited"} --></li><li>Go to <code>/cookies</code>, and check that the page shows <code>sessions_origin=visited</code>.<!-- step {"goTo":"/cookies"} --><!-- step {"find":"sessions_origin=visited"} --></li><li>Go to <code>/api/echo</code>, and check that the response echoes the <code>from</code> parameter that the config adds: <code>"from":"docs"</code>.<!-- step {"goTo":"/api/echo"} --><!-- step {"find":"/\"from\":\"docs\"/"} --></li></ol><!-- test end --></body></html>
Test pages on your own site===========================.. test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]}These steps use paths, not full URLs. The run's config sets the site's origin.#. Go to ``/cookies/set/sessions_origin/visited``... step {"goTo":"/cookies/set/sessions_origin/visited"}#. Go to ``/cookies``, and check that the page shows ``sessions_origin=visited``... step {"goTo":"/cookies"}.. step {"find":"sessions_origin=visited"}#. Go to ``/api/echo``, and check that the response echoes the ``from`` parameter that the config adds: ``"from":"docs"``... step {"goTo":"/api/echo"}.. step {"find":"/\"from\":\"docs\"/"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-origin"><title>Test pages on your own site</title><taskbody><context><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p></context><data name="doc-detective" value='test {"testId":"sessions-origin","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]}'/><steps><step><cmd>Go to <codeph>/cookies/set/sessions_origin/visited</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/cookies/set/sessions_origin/visited"}'/></info></step><step><cmd>Go to <codeph>/cookies</codeph>, and check that the page shows <codeph>sessions_origin=visited</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_origin=visited"}'/></info></step><step><cmd>Go to <codeph>/api/echo</codeph>, and check that the response echoes the <codeph>from</codeph> parameter that the config adds: <codeph>"from":"docs"</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/api/echo"}'/><data name="doc-detective" value='step {"find":"/\"from\":\"docs\"/"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} --># Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.<!-- step {"goTo":"/cookies/set/sessions_origin/visited"} -->2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.<!-- step {"goTo":"/cookies"} --><!-- step {"find":"sessions_origin=visited"} -->3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.<!-- step {"goTo":"/api/echo"} --><!-- step {"find":"/\"from\":\"docs\"/"} --><!-- test end -->
{/* test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} */}# Test pages on your own siteThese steps use paths, not full URLs. The run's config sets the site's origin.1. Go to `/cookies/set/sessions_origin/visited`.{/* step {"goTo":"/cookies/set/sessions_origin/visited"} */}2. Go to `/cookies`, and check that the page shows `sessions_origin=visited`.{/* step {"goTo":"/cookies"} */}{/* step {"find":"sessions_origin=visited"} */}3. Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.{/* step {"goTo":"/api/echo"} */}{/* step {"find":"/\"from\":\"docs\"/"} */}{/* test end */}
= Test pages on your own site// (test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]})These steps use paths, not full URLs. The run's config sets the site's origin.. Go to `/cookies/set/sessions_origin/visited`.+// (step {"goTo":"/cookies/set/sessions_origin/visited"}). Go to `/cookies`, and check that the page shows `sessions_origin=visited`.+// (step {"goTo":"/cookies"})+// (step {"find":"sessions_origin=visited"}). Go to `/api/echo`, and check that the response echoes the `from` parameter that the config adds: `"from":"docs"`.+// (step {"goTo":"/api/echo"})+// (step {"find":"/\"from\":\"docs\"/"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Test pages on your own site</title></head><body><!-- test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]} --><h1>Test pages on your own site</h1><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p><ol><li>Go to <code>/cookies/set/sessions_origin/visited</code>.<!-- step {"goTo":"/cookies/set/sessions_origin/visited"} --></li><li>Go to <code>/cookies</code>, and check that the page shows <code>sessions_origin=visited</code>.<!-- step {"goTo":"/cookies"} --><!-- step {"find":"sessions_origin=visited"} --></li><li>Go to <code>/api/echo</code>, and check that the response echoes the <code>from</code> parameter that the config adds: <code>"from":"docs"</code>.<!-- step {"goTo":"/api/echo"} --><!-- step {"find":"/\"from\":\"docs\"/"} --></li></ol><!-- test end --></body></html>
Test pages on your own site===========================.. test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]}These steps use paths, not full URLs. The run's config sets the site's origin.#. Go to ``/cookies/set/sessions_origin/visited``... step {"goTo":"/cookies/set/sessions_origin/visited"}#. Go to ``/cookies``, and check that the page shows ``sessions_origin=visited``... step {"goTo":"/cookies"}.. step {"find":"sessions_origin=visited"}#. Go to ``/api/echo``, and check that the response echoes the ``from`` parameter that the config adds: ``"from":"docs"``... step {"goTo":"/api/echo"}.. step {"find":"/\"from\":\"docs\"/"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-origin"><title>Test pages on your own site</title><taskbody><context><p>These steps use paths, not full URLs. The run's config sets the site's origin.</p></context><data name="doc-detective" value='test {"testId":"sessions-origin","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"browsers":"chrome","requires":{"env":["SESSIONS_ORIGIN"]}}]}'/><steps><step><cmd>Go to <codeph>/cookies/set/sessions_origin/visited</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/cookies/set/sessions_origin/visited"}'/></info></step><step><cmd>Go to <codeph>/cookies</codeph>, and check that the page shows <codeph>sessions_origin=visited</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_origin=visited"}'/></info></step><step><cmd>Go to <codeph>/api/echo</codeph>, and check that the response echoes the <codeph>from</codeph> parameter that the config adds: <codeph>"from":"docs"</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":"/api/echo"}'/><data name="doc-detective" value='step {"find":"/\"from\":\"docs\"/"}'/></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": "sessions-origin","runOn": [{"platforms": ["linux","mac"],"browsers": "chrome","requires": {"env": ["SESSIONS_ORIGIN"]}}],"steps": [{"goTo": "/cookies/set/sessions_origin/visited"},{"goTo": "/cookies"},{"find": "sessions_origin=visited"},{"goTo": "/api/echo"},{"find": "/\"from\":\"docs\"/"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-originrunOn:- platforms:- linux- macbrowsers: chromerequires:env:- SESSIONS_ORIGINsteps:- goTo: /cookies/set/sessions_origin/visited- goTo: /cookies- find: sessions_origin=visited- goTo: /api/echo- find: /"from":"docs"/
This example’s config
The example’s folder holds a doc-detective.json and the sessions.env file it loads:
{"detectSteps": true,"loadVariables": "sessions.env","origin": "$SESSIONS_ORIGIN","originParams": {"from": "docs"}}
SESSIONS_ORIGIN=http://localhost:8092
loadVariables resolves against the config file’s folder, and origin reads the variable the file sets. The /api/echo endpoint returns the query parameters it gets, so the last check passes only when the config adds from=docs.
The test’s context requires the SESSIONS_ORIGIN variable. A run with another config, which can’t resolve the paths, skips the test rather than failing it.
What detection finds
The paths are code, not links, so detection adds no steps. Statements hold every step.
Evaluate expressions in the Node.js REPL
One procedure starts a process with runShell and background. The others use startSurface with a process descriptor (one of them passes an array of descriptors). Each then sends keys with type to a process surface and closes it with closeSurface. The contexts use requires to skip a test where node isn’t installed.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. Close the REPL.## Run the REPL in the background1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.3. Close the REPL.## Start a server and a REPL together1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.3. Close the REPL and the server.
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. Close the REPL.## Run the REPL in the background1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.3. Close the REPL.## Start a server and a REPL together1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.3. Close the REPL and the server.
= Evaluate expressions in the Node.js REPL== Start the REPL as a surface. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.. Close the REPL.== Run the REPL in the background. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.. Close the REPL.== Start a server and a REPL together. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.. In the REPL, fetch the server's root URL, and wait for it to print `ok`.. Close the REPL and the server.
<!DOCTYPE html><html lang="en"><head><title>Evaluate expressions in the Node.js REPL</title></head><body><h1>Evaluate expressions in the Node.js REPL</h1><h2>Start the REPL as a surface</h2><ol><li>Start <code>node -i</code> in a terminal as a process named <code>sessions-repl</code>, and wait for the <code>></code> prompt.</li><li>In the REPL, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.</li><li>Close the REPL.</li></ol><h2>Run the REPL in the background</h2><ol><li>Run <code>node -i</code> in the background as a process named <code>sessions-bg-repl</code>, and wait for the <code>></code> prompt.</li><li>In the REPL, enter <code>Math.pow(2, 10)</code> and press Enter. Wait at least half a second, and until the REPL prints <code>1024</code>.</li><li>Close the REPL.</li></ol><h2>Start a server and a REPL together</h2><ol><li>From the <code>docs/actions</code> folder, start <code>node simple-json-server.cjs</code> as <code>sessions-api</code>, and wait until port <code>8087</code> answers. At the same time, start <code>node -i</code> in a 100 by 30 terminal as <code>sessions-client</code>, and give it a second to start.</li><li>In the REPL, fetch the server's root URL, and wait for it to print <code>ok</code>.</li><li>Close the REPL and the server.</li></ol></body></html>
Evaluate expressions in the Node.js REPL========================================Start the REPL as a surface---------------------------#. Start ``node -i`` in a terminal as a process named ``sessions-repl``, and wait for the ``>`` prompt.#. In the REPL, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``.#. Close the REPL.Run the REPL in the background------------------------------#. Run ``node -i`` in the background as a process named ``sessions-bg-repl``, and wait for the ``>`` prompt.#. In the REPL, enter ``Math.pow(2, 10)`` and press Enter. Wait at least half a second, and until the REPL prints ``1024``.#. Close the REPL.Start a server and a REPL together----------------------------------#. From the ``docs/actions`` folder, start ``node simple-json-server.cjs`` as ``sessions-api``, and wait until port ``8087`` answers. At the same time, start ``node -i`` in a 100 by 30 terminal as ``sessions-client``, and give it a second to start.#. In the REPL, fetch the server's root URL, and wait for it to print ``ok``.#. Close the REPL and the server.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-process"><title>Evaluate expressions in the Node.js REPL</title></topic><task id="sessions-process-surface"><title>Start the REPL as a surface</title><taskbody><steps><step><cmd>Start <codeph>node -i</codeph> in a terminal as a process named <codeph>sessions-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd></step><step><cmd>In the REPL, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd></step><step><cmd>Close the REPL.</cmd></step></steps></taskbody></task><task id="sessions-process-background"><title>Run the REPL in the background</title><taskbody><steps><step><cmd>Run <codeph>node -i</codeph> in the background as a process named <codeph>sessions-bg-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd></step><step><cmd>In the REPL, enter <codeph>Math.pow(2, 10)</codeph> and press Enter. Wait at least half a second, and until the REPL prints <codeph>1024</codeph>.</cmd></step><step><cmd>Close the REPL.</cmd></step></steps></taskbody></task><task id="sessions-process-server"><title>Start a server and a REPL together</title><taskbody><steps><step><cmd>From the <codeph>docs/actions</codeph> folder, start <codeph>node simple-json-server.cjs</codeph> as <codeph>sessions-api</codeph>, and wait until port <codeph>8087</codeph> answers. At the same time, start <codeph>node -i</codeph> in a 100 by 30 terminal as <codeph>sessions-client</codeph>, and give it a second to start.</cmd></step><step><cmd>In the REPL, fetch the server's root URL, and wait for it to print <codeph>ok</codeph>.</cmd></step><step><cmd>Close the REPL and the server.</cmd></step></steps></taskbody></task></dita>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface<!-- test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} -->1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} -->2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. Close the REPL.<!-- step {"closeSurface":{"process":"sessions-repl"}} --><!-- test end -->## Run the REPL in the background<!-- test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} -->1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.<!-- step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} -->2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.<!-- step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} -->3. Close the REPL.<!-- step {"closeSurface":"sessions-bg-repl"} --><!-- test end -->## Start a server and a REPL together<!-- test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} -->1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.<!-- step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} -->2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.<!-- step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} -->3. Close the REPL and the server.<!-- step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} --><!-- test end -->
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface{/* test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.{/* step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} */}2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. Close the REPL.{/* step {"closeSurface":{"process":"sessions-repl"}} */}{/* test end */}## Run the REPL in the background{/* test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} */}1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.{/* step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} */}2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.{/* step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} */}3. Close the REPL.{/* step {"closeSurface":"sessions-bg-repl"} */}{/* test end */}## Start a server and a REPL together{/* test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} */}1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.{/* step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} */}2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.{/* step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} */}3. Close the REPL and the server.{/* step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} */}{/* test end */}
= Evaluate expressions in the Node.js REPL== Start the REPL as a surface// (test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.+// (step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}). In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close the REPL.+// (step {"closeSurface":{"process":"sessions-repl"}})// (test end)== Run the REPL in the background// (test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}). Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.+// (step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}). In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.+// (step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}). Close the REPL.+// (step {"closeSurface":"sessions-bg-repl"})// (test end)== Start a server and a REPL together// (test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}). From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.+// (step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}). In the REPL, fetch the server's root URL, and wait for it to print `ok`.+// (step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}). Close the REPL and the server.+// (step {"closeSurface":["sessions-client",{"process":"sessions-api"}]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Evaluate expressions in the Node.js REPL</title></head><body><h1>Evaluate expressions in the Node.js REPL</h1><h2>Start the REPL as a surface</h2><!-- test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><ol><li>Start <code>node -i</code> in a terminal as a process named <code>sessions-repl</code>, and wait for the <code>></code> prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} --></li><li>In the REPL, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close the REPL.<!-- step {"closeSurface":{"process":"sessions-repl"}} --></li></ol><!-- test end --><h2>Run the REPL in the background</h2><!-- test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} --><ol><li>Run <code>node -i</code> in the background as a process named <code>sessions-bg-repl</code>, and wait for the <code>></code> prompt.<!-- step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} --></li><li>In the REPL, enter <code>Math.pow(2, 10)</code> and press Enter. Wait at least half a second, and until the REPL prints <code>1024</code>.<!-- step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} --></li><li>Close the REPL.<!-- step {"closeSurface":"sessions-bg-repl"} --></li></ol><!-- test end --><h2>Start a server and a REPL together</h2><!-- test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --><ol><li>From the <code>docs/actions</code> folder, start <code>node simple-json-server.cjs</code> as <code>sessions-api</code>, and wait until port <code>8087</code> answers. At the same time, start <code>node -i</code> in a 100 by 30 terminal as <code>sessions-client</code>, and give it a second to start.<!-- step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} --></li><li>In the REPL, fetch the server's root URL, and wait for it to print <code>ok</code>.<!-- step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} --></li><li>Close the REPL and the server.<!-- step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} --></li></ol><!-- test end --></body></html>
Evaluate expressions in the Node.js REPL========================================Start the REPL as a surface---------------------------.. test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start ``node -i`` in a terminal as a process named ``sessions-repl``, and wait for the ``>`` prompt... step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}#. In the REPL, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close the REPL... step {"closeSurface":{"process":"sessions-repl"}}.. test endRun the REPL in the background------------------------------.. test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}#. Run ``node -i`` in the background as a process named ``sessions-bg-repl``, and wait for the ``>`` prompt... step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}#. In the REPL, enter ``Math.pow(2, 10)`` and press Enter. Wait at least half a second, and until the REPL prints ``1024``... step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}#. Close the REPL... step {"closeSurface":"sessions-bg-repl"}.. test endStart a server and a REPL together----------------------------------.. test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}#. From the ``docs/actions`` folder, start ``node simple-json-server.cjs`` as ``sessions-api``, and wait until port ``8087`` answers. At the same time, start ``node -i`` in a 100 by 30 terminal as ``sessions-client``, and give it a second to start... step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}#. In the REPL, fetch the server's root URL, and wait for it to print ``ok``... step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}#. Close the REPL and the server... step {"closeSurface":["sessions-client",{"process":"sessions-api"}]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-process"><title>Evaluate expressions in the Node.js REPL</title></topic><task id="sessions-process-surface"><title>Start the REPL as a surface</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-surface","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start <codeph>node -i</codeph> in a terminal as a process named <codeph>sessions-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}'/></info></step><step><cmd>In the REPL, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close the REPL.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"process":"sessions-repl"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-process-background"><title>Run the REPL in the background</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-background","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}'/><steps><step><cmd>Run <codeph>node -i</codeph> in the background as a process named <codeph>sessions-bg-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}'/></info></step><step><cmd>In the REPL, enter <codeph>Math.pow(2, 10)</codeph> and press Enter. Wait at least half a second, and until the REPL prints <codeph>1024</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}'/></info></step><step><cmd>Close the REPL.</cmd><info><data name="doc-detective" value='step {"closeSurface":"sessions-bg-repl"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-process-server"><title>Start a server and a REPL together</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-server","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}'/><steps><step><cmd>From the <codeph>docs/actions</codeph> folder, start <codeph>node simple-json-server.cjs</codeph> as <codeph>sessions-api</codeph>, and wait until port <codeph>8087</codeph> answers. At the same time, start <codeph>node -i</codeph> in a 100 by 30 terminal as <codeph>sessions-client</codeph>, and give it a second to start.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}'/></info></step><step><cmd>In the REPL, fetch the server's root URL, and wait for it to print <codeph>ok</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}'/></info></step><step><cmd>Close the REPL and the server.</cmd><info><data name="doc-detective" value='step {"closeSurface":["sessions-client",{"process":"sessions-api"}]}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></dita>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface<!-- test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} -->1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} -->2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. Close the REPL.<!-- step {"closeSurface":{"process":"sessions-repl"}} --><!-- test end -->## Run the REPL in the background<!-- test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} -->1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.<!-- step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} -->2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.<!-- step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} -->3. Close the REPL.<!-- step {"closeSurface":"sessions-bg-repl"} --><!-- test end -->## Start a server and a REPL together<!-- test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} -->1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.<!-- step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} -->2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.<!-- step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} -->3. Close the REPL and the server.<!-- step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} --><!-- test end -->
# Evaluate expressions in the Node.js REPL## Start the REPL as a surface{/* test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}1. Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.{/* step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} */}2. In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. Close the REPL.{/* step {"closeSurface":{"process":"sessions-repl"}} */}{/* test end */}## Run the REPL in the background{/* test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} */}1. Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.{/* step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} */}2. In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.{/* step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} */}3. Close the REPL.{/* step {"closeSurface":"sessions-bg-repl"} */}{/* test end */}## Start a server and a REPL together{/* test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} */}1. From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.{/* step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} */}2. In the REPL, fetch the server's root URL, and wait for it to print `ok`.{/* step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} */}3. Close the REPL and the server.{/* step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} */}{/* test end */}
= Evaluate expressions in the Node.js REPL== Start the REPL as a surface// (test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start `node -i` in a terminal as a process named `sessions-repl`, and wait for the `>` prompt.+// (step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}). In the REPL, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close the REPL.+// (step {"closeSurface":{"process":"sessions-repl"}})// (test end)== Run the REPL in the background// (test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}). Run `node -i` in the background as a process named `sessions-bg-repl`, and wait for the `>` prompt.+// (step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}). In the REPL, enter `Math.pow(2, 10)` and press Enter. Wait at least half a second, and until the REPL prints `1024`.+// (step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}). Close the REPL.+// (step {"closeSurface":"sessions-bg-repl"})// (test end)== Start a server and a REPL together// (test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}). From the `docs/actions` folder, start `node simple-json-server.cjs` as `sessions-api`, and wait until port `8087` answers. At the same time, start `node -i` in a 100 by 30 terminal as `sessions-client`, and give it a second to start.+// (step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}). In the REPL, fetch the server's root URL, and wait for it to print `ok`.+// (step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}). Close the REPL and the server.+// (step {"closeSurface":["sessions-client",{"process":"sessions-api"}]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Evaluate expressions in the Node.js REPL</title></head><body><h1>Evaluate expressions in the Node.js REPL</h1><h2>Start the REPL as a surface</h2><!-- test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><ol><li>Start <code>node -i</code> in a terminal as a process named <code>sessions-repl</code>, and wait for the <code>></code> prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}} --></li><li>In the REPL, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close the REPL.<!-- step {"closeSurface":{"process":"sessions-repl"}} --></li></ol><!-- test end --><h2>Run the REPL in the background</h2><!-- test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]} --><ol><li>Run <code>node -i</code> in the background as a process named <code>sessions-bg-repl</code>, and wait for the <code>></code> prompt.<!-- step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}} --></li><li>In the REPL, enter <code>Math.pow(2, 10)</code> and press Enter. Wait at least half a second, and until the REPL prints <code>1024</code>.<!-- step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}} --></li><li>Close the REPL.<!-- step {"closeSurface":"sessions-bg-repl"} --></li></ol><!-- test end --><h2>Start a server and a REPL together</h2><!-- test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --><ol><li>From the <code>docs/actions</code> folder, start <code>node simple-json-server.cjs</code> as <code>sessions-api</code>, and wait until port <code>8087</code> answers. At the same time, start <code>node -i</code> in a 100 by 30 terminal as <code>sessions-client</code>, and give it a second to start.<!-- step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]} --></li><li>In the REPL, fetch the server's root URL, and wait for it to print <code>ok</code>.<!-- step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}} --></li><li>Close the REPL and the server.<!-- step {"closeSurface":["sessions-client",{"process":"sessions-api"}]} --></li></ol><!-- test end --></body></html>
Evaluate expressions in the Node.js REPL========================================Start the REPL as a surface---------------------------.. test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start ``node -i`` in a terminal as a process named ``sessions-repl``, and wait for the ``>`` prompt... step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}#. In the REPL, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close the REPL... step {"closeSurface":{"process":"sessions-repl"}}.. test endRun the REPL in the background------------------------------.. test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}#. Run ``node -i`` in the background as a process named ``sessions-bg-repl``, and wait for the ``>`` prompt... step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}#. In the REPL, enter ``Math.pow(2, 10)`` and press Enter. Wait at least half a second, and until the REPL prints ``1024``... step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}#. Close the REPL... step {"closeSurface":"sessions-bg-repl"}.. test endStart a server and a REPL together----------------------------------.. test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}#. From the ``docs/actions`` folder, start ``node simple-json-server.cjs`` as ``sessions-api``, and wait until port ``8087`` answers. At the same time, start ``node -i`` in a 100 by 30 terminal as ``sessions-client``, and give it a second to start... step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}#. In the REPL, fetch the server's root URL, and wait for it to print ``ok``... step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}#. Close the REPL and the server... step {"closeSurface":["sessions-client",{"process":"sessions-api"}]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-process"><title>Evaluate expressions in the Node.js REPL</title></topic><task id="sessions-process-surface"><title>Start the REPL as a surface</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-surface","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start <codeph>node -i</codeph> in a terminal as a process named <codeph>sessions-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-repl","tty":true,"waitUntil":{"stdio":"/>/"},"timeout":30000}}'/></info></step><step><cmd>In the REPL, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-repl","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close the REPL.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"process":"sessions-repl"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-process-background"><title>Run the REPL in the background</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-background","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":{"commands":["node"],"env":["PATH"]}}]}'/><steps><step><cmd>Run <codeph>node -i</codeph> in the background as a process named <codeph>sessions-bg-repl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"runShell":{"command":"node -i","background":{"name":"sessions-bg-repl","waitUntil":{"stdio":"/>/"}},"timeout":30000}}'/></info></step><step><cmd>In the REPL, enter <codeph>Math.pow(2, 10)</codeph> and press Enter. Wait at least half a second, and until the REPL prints <codeph>1024</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["Math.pow(2, 10)","$ENTER$"],"surface":{"process":"sessions-bg-repl"},"waitUntil":{"stdio":"/1024/","delayMs":500},"timeout":10000}}'/></info></step><step><cmd>Close the REPL.</cmd><info><data name="doc-detective" value='step {"closeSurface":"sessions-bg-repl"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-process-server"><title>Start a server and a REPL together</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-process-server","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}'/><steps><step><cmd>From the <codeph>docs/actions</codeph> folder, start <codeph>node simple-json-server.cjs</codeph> as <codeph>sessions-api</codeph>, and wait until port <codeph>8087</codeph> answers. At the same time, start <codeph>node -i</codeph> in a 100 by 30 terminal as <codeph>sessions-client</codeph>, and give it a second to start.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"process":"node","args":["simple-json-server.cjs"],"name":"sessions-api","workingDirectory":"../../../fern/pages/docs/actions","waitUntil":{"port":8087,"httpGet":"http://localhost:8087"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-client","tty":{"cols":100,"rows":30},"waitUntil":{"delayMs":1000}}]}'/></info></step><step><cmd>In the REPL, fetch the server's root URL, and wait for it to print <codeph>ok</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface":"sessions-client","waitUntil":{"stdio":"/\"status\":\"ok\"/"},"timeout":10000}}'/></info></step><step><cmd>Close the REPL and the server.</cmd><info><data name="doc-detective" value='step {"closeSurface":["sessions-client",{"process":"sessions-api"}]}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></dita>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "sessions-process-surface","runOn": [{"platforms": ["linux","mac","windows"],"requires": "node"}],"steps": [{"startSurface": {"process": "node","args": ["-i"],"name": "sessions-repl","tty": true,"waitUntil": {"stdio": "/>/"},"timeout": 30000}},{"type": {"keys": ["40 + 2","$ENTER$"],"surface": "sessions-repl","waitUntil": {"stdio": "/42/"},"timeout": 10000}},{"closeSurface": {"process": "sessions-repl"}}]},{"testId": "sessions-process-background","runOn": [{"platforms": ["linux","mac","windows"],"requires": {"commands": ["node"],"env": ["PATH"]}}],"steps": [{"runShell": {"command": "node -i","background": {"name": "sessions-bg-repl","waitUntil": {"stdio": "/>/"}},"timeout": 30000}},{"type": {"keys": ["Math.pow(2, 10)","$ENTER$"],"surface": {"process": "sessions-bg-repl"},"waitUntil": {"stdio": "/1024/","delayMs": 500},"timeout": 10000}},{"closeSurface": "sessions-bg-repl"}]},{"testId": "sessions-process-server","runOn": [{"platforms": ["linux","mac","windows"],"requires": ["node","npm"]}],"steps": [{"startSurface": [{"process": "node","args": ["simple-json-server.cjs"],"name": "sessions-api","workingDirectory": "../../../fern/pages/docs/actions","waitUntil": {"port": 8087,"httpGet": "http://localhost:8087"},"timeout": 30000},{"process": "node","args": ["-i"],"name": "sessions-client","tty": {"cols": 100,"rows": 30},"waitUntil": {"delayMs": 1000}}]},{"type": {"keys": ["fetch(\"http://localhost:8087\").then((r) => r.text()).then(console.log)","$ENTER$"],"surface": "sessions-client","waitUntil": {"stdio": "/\"status\":\"ok\"/"},"timeout": 10000}},{"closeSurface": ["sessions-client",{"process": "sessions-api"}]}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-process-surfacerunOn:- platforms: &a1- linux- mac- windowsrequires: nodesteps:- startSurface:process: nodeargs:- -iname: sessions-repltty: truewaitUntil:stdio: />/timeout: 30000- type:keys:- 40 + 2- $ENTER$surface: sessions-replwaitUntil:stdio: /42/timeout: 10000- closeSurface:process: sessions-repl- testId: sessions-process-backgroundrunOn:- platforms: *a1requires:commands:- nodeenv:- PATHsteps:- runShell:command: node -ibackground:name: sessions-bg-replwaitUntil:stdio: />/timeout: 30000- type:keys:- Math.pow(2, 10)- $ENTER$surface:process: sessions-bg-replwaitUntil:stdio: /1024/delayMs: 500timeout: 10000- closeSurface: sessions-bg-repl- testId: sessions-process-serverrunOn:- platforms: *a1requires:- node- npmsteps:- startSurface:- process: nodeargs:- simple-json-server.cjsname: sessions-apiworkingDirectory: ../../../fern/pages/docs/actionswaitUntil:port: 8087httpGet: http://localhost:8087timeout: 30000- process: nodeargs:- -iname: sessions-clienttty:cols: 100rows: 30waitUntil:delayMs: 1000- type:keys:- fetch("http://localhost:8087").then((r) => r.text()).then(console.log)- $ENTER$surface: sessions-clientwaitUntil:stdio: /"status":"ok"/timeout: 10000- closeSurface:- sessions-client- process: sessions-api
Forms in this example
requirestakes a command name ("node"), an array of command names (["node", "npm"]), or an object that listscommands,files, andenvvariables.ttyruns the process in a terminal:truefor the default 120 by 30 size, or an object withcolsandrows.waitUntilholds the step until the process prints a match (stdio), aportaccepts connections, anhttpGetURL answers, ordelayMspasses. Conditions in one object must all hold.workingDirectorysets where the process starts. A relative path resolves against the file that holds the test.typeandcloseSurfaceaddress a process by its name ("sessions-repl") or with the object form ({ "process": "sessions-bg-repl" }).
What detection finds
The prose has no links, bold text, or quoted text after Type, so detection adds no steps. Code spans aren’t detected, which keeps 40 + 2 from turning into a type step without a surface.
Open a built-in app
These procedures use startSurface with an app descriptor, click, find, and closeSurface with an app surface, on Windows, macOS, Android, and iOS. Each test’s runOn names one platform.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open a built-in app## Windows: Character Map1. Open Character Map, and wait for its Select button.2. Click **Select**.3. Check that the window shows the **Copy** button.4. Check the Copy button again, picking the window by its title, by name, and as the newest window.5. Close Character Map.## macOS: Calculator1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.2. In the first window, press the `1` button.3. Close Calculator.## Android: Settings1. Open the Settings app, and wait for the Network & internet entry.2. Tap the Network & internet entry.3. Check that the screen shows **Internet**.4. Close the Settings app.## Android: your own app1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.2. Close the app.## iOS: Settings1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.2. Tap the General entry.3. Check that the screen shows **About**.4. Close the Settings app.
# Open a built-in app## Windows: Character Map1. Open Character Map, and wait for its Select button.2. Click **Select**.3. Check that the window shows the **Copy** button.4. Check the Copy button again, picking the window by its title, by name, and as the newest window.5. Close Character Map.## macOS: Calculator1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.2. In the first window, press the `1` button.3. Close Calculator.## Android: Settings1. Open the Settings app, and wait for the Network & internet entry.2. Tap the Network & internet entry.3. Check that the screen shows **Internet**.4. Close the Settings app.## Android: your own app1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.2. Close the app.## iOS: Settings1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.2. Tap the General entry.3. Check that the screen shows **About**.4. Close the Settings app.
= Open a built-in app== Windows: Character Map. Open Character Map, and wait for its Select button.. Click *Select*.. Check that the window shows the *Copy* button.. Check the Copy button again, picking the window by its title, by name, and as the newest window.. Close Character Map.== macOS: Calculator. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.. In the first window, press the `1` button.. Close Calculator.== Android: Settings. Open the Settings app, and wait for the Network & internet entry.. Tap the Network & internet entry.. Check that the screen shows *Internet*.. Close the Settings app.== Android: your own app. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.. Close the app.== iOS: Settings. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.. Tap the General entry.. Check that the screen shows *About*.. Close the Settings app.
<!DOCTYPE html><html lang="en"><head><title>Open a built-in app</title></head><body><h1>Open a built-in app</h1><h2>Windows: Character Map</h2><ol><li>Open Character Map, and wait for its Select button.</li><li>Click <strong>Select</strong>.</li><li>Check that the window shows the <strong>Copy</strong> button.</li><li>Check the Copy button again, picking the window by its title, by name, and as the newest window.</li><li>Close Character Map.</li></ol><h2>macOS: Calculator</h2><ol><li>Open Calculator with <code>SESSIONS_DOCS=1</code> in its environment, and wait for its <code>1</code> button.</li><li>In the first window, press the <code>1</code> button.</li><li>Close Calculator.</li></ol><h2>Android: Settings</h2><ol><li>Open the Settings app, and wait for the Network & internet entry.</li><li>Tap the Network & internet entry.</li><li>Check that the screen shows <strong>Internet</strong>.</li><li>Close the Settings app.</li></ol><h2>Android: your own app</h2><ol><li>Install <code>build/sessions-demo.apk</code> on a headless Android 14 phone emulator named <code>sessions-pixel</code>, open its main activity, and wait for the Welcome screen.</li><li>Close the app.</li></ol><h2>iOS: Settings</h2><ol><li>On the iPhone simulator named <code>sessions-iphone</code>, open the Settings app, and wait for the General entry.</li><li>Tap the General entry.</li><li>Check that the screen shows <strong>About</strong>.</li><li>Close the Settings app.</li></ol></body></html>
Open a built-in app===================Windows: Character Map----------------------#. Open Character Map, and wait for its Select button.#. Click **Select**.#. Check that the window shows the **Copy** button.#. Check the Copy button again, picking the window by its title, by name, and as the newest window.#. Close Character Map.macOS: Calculator-----------------#. Open Calculator with ``SESSIONS_DOCS=1`` in its environment, and wait for its ``1`` button.#. In the first window, press the ``1`` button.#. Close Calculator.Android: Settings-----------------#. Open the Settings app, and wait for the Network & internet entry.#. Tap the Network & internet entry.#. Check that the screen shows **Internet**.#. Close the Settings app.Android: your own app---------------------#. Install ``build/sessions-demo.apk`` on a headless Android 14 phone emulator named ``sessions-pixel``, open its main activity, and wait for the Welcome screen.#. Close the app.iOS: Settings-------------#. On the iPhone simulator named ``sessions-iphone``, open the Settings app, and wait for the General entry.#. Tap the General entry.#. Check that the screen shows **About**.#. Close the Settings app.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-apps"><title>Open a built-in app</title></topic><task id="sessions-apps-windows"><title>Windows: Character Map</title><taskbody><steps><step><cmd>Open Character Map, and wait for its Select button.</cmd></step><step><cmd>Click <uicontrol>Select</uicontrol>.</cmd></step><step><cmd>Check that the window shows the <b>Copy</b> button.</cmd></step><step><cmd>Check the Copy button again, picking the window by its title, by name, and as the newest window.</cmd></step><step><cmd>Close Character Map.</cmd></step></steps></taskbody></task><task id="sessions-apps-mac"><title>macOS: Calculator</title><taskbody><steps><step><cmd>Open Calculator with <codeph>SESSIONS_DOCS=1</codeph> in its environment, and wait for its <codeph>1</codeph> button.</cmd></step><step><cmd>In the first window, press the <codeph>1</codeph> button.</cmd></step><step><cmd>Close Calculator.</cmd></step></steps></taskbody></task><task id="sessions-apps-android"><title>Android: Settings</title><taskbody><steps><step><cmd>Open the Settings app, and wait for the Network & internet entry.</cmd></step><step><cmd>Tap the Network & internet entry.</cmd></step><step><cmd>Check that the screen shows <b>Internet</b>.</cmd></step><step><cmd>Close the Settings app.</cmd></step></steps></taskbody></task><task id="sessions-apps-android-install"><title>Android: your own app</title><taskbody><steps><step><cmd>Install <codeph>build/sessions-demo.apk</codeph> on a headless Android 14 phone emulator named <codeph>sessions-pixel</codeph>, open its main activity, and wait for the Welcome screen.</cmd></step><step><cmd>Close the app.</cmd></step></steps></taskbody></task><task id="sessions-apps-ios"><title>iOS: Settings</title><taskbody><steps><step><cmd>On the iPhone simulator named <codeph>sessions-iphone</codeph>, open the Settings app, and wait for the General entry.</cmd></step><step><cmd>Tap the General entry.</cmd></step><step><cmd>Check that the screen shows <b>About</b>.</cmd></step><step><cmd>Close the Settings app.</cmd></step></steps></taskbody></task></dita>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open a built-in app## Windows: Character Map<!-- test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} -->1. Open Character Map, and wait for its Select button.<!-- step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} -->2. Click **Select**.3. Check that the window shows the **Copy** button.4. Check the Copy button again, picking the window by its title, by name, and as the newest window.<!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} -->5. Close Character Map.<!-- step {"closeSurface":{"app":"charmap"}} --><!-- test end -->## macOS: Calculator<!-- test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]} -->1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.<!-- step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} -->2. In the first window, press the `1` button.<!-- step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} -->3. Close Calculator.<!-- step {"closeSurface":"calculator"} --><!-- test end -->## Android: Settings<!-- test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]} -->1. Open the Settings app, and wait for the Network & internet entry.<!-- step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} -->2. Tap the Network & internet entry.<!-- step {"click":"Network & internet"} -->3. Check that the screen shows **Internet**.4. Close the Settings app.<!-- step {"closeSurface":{"app":"settings"}} --><!-- test end -->## Android: your own app<!-- test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} -->1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.<!-- step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} -->2. Close the app.<!-- step {"closeSurface":{"app":"demo"}} --><!-- test end -->## iOS: Settings<!-- test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} -->1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.<!-- step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} -->2. Tap the General entry.<!-- step {"click":"General"} -->3. Check that the screen shows **About**.4. Close the Settings app.<!-- step {"closeSurface":{"app":"preferences"}} --><!-- test end -->
# Open a built-in app## Windows: Character Map{/* test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} */}1. Open Character Map, and wait for its Select button.{/* step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} */}2. Click **Select**.3. Check that the window shows the **Copy** button.4. Check the Copy button again, picking the window by its title, by name, and as the newest window.{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} */}5. Close Character Map.{/* step {"closeSurface":{"app":"charmap"}} */}{/* test end */}## macOS: Calculator{/* test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]} */}1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.{/* step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} */}2. In the first window, press the `1` button.{/* step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} */}3. Close Calculator.{/* step {"closeSurface":"calculator"} */}{/* test end */}## Android: Settings{/* test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]} */}1. Open the Settings app, and wait for the Network & internet entry.{/* step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} */}2. Tap the Network & internet entry.{/* step {"click":"Network & internet"} */}3. Check that the screen shows **Internet**.4. Close the Settings app.{/* step {"closeSurface":{"app":"settings"}} */}{/* test end */}## Android: your own app{/* test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} */}1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.{/* step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} */}2. Close the app.{/* step {"closeSurface":{"app":"demo"}} */}{/* test end */}## iOS: Settings{/* test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} */}1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.{/* step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} */}2. Tap the General entry.{/* step {"click":"General"} */}3. Check that the screen shows **About**.4. Close the Settings app.{/* step {"closeSurface":{"app":"preferences"}} */}{/* test end */}
= Open a built-in app== Windows: Character Map// (test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}). Open Character Map, and wait for its Select button.+// (step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}). Click *Select*.. Check that the window shows the *Copy* button.. Check the Copy button again, picking the window by its title, by name, and as the newest window.+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}). Close Character Map.+// (step {"closeSurface":{"app":"charmap"}})// (test end)== macOS: Calculator// (test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]}). Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.+// (step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}). In the first window, press the `1` button.+// (step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}). Close Calculator.+// (step {"closeSurface":"calculator"})// (test end)== Android: Settings// (test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]}). Open the Settings app, and wait for the Network & internet entry.+// (step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}). Tap the Network & internet entry.+// (step {"click":"Network & internet"}). Check that the screen shows *Internet*.. Close the Settings app.+// (step {"closeSurface":{"app":"settings"}})// (test end)== Android: your own app// (test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}). Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.+// (step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}). Close the app.+// (step {"closeSurface":{"app":"demo"}})// (test end)== iOS: Settings// (test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}). On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.+// (step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}). Tap the General entry.+// (step {"click":"General"}). Check that the screen shows *About*.. Close the Settings app.+// (step {"closeSurface":{"app":"preferences"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a built-in app</title></head><body><h1>Open a built-in app</h1><h2>Windows: Character Map</h2><!-- test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} --><ol><li>Open Character Map, and wait for its Select button.<!-- step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} --></li><li>Click <strong>Select</strong>.</li><li>Check that the window shows the <strong>Copy</strong> button.</li><li>Check the Copy button again, picking the window by its title, by name, and as the newest window.<!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} --></li><li>Close Character Map.<!-- step {"closeSurface":{"app":"charmap"}} --></li></ol><!-- test end --><h2>macOS: Calculator</h2><!-- test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]} --><ol><li>Open Calculator with <code>SESSIONS_DOCS=1</code> in its environment, and wait for its <code>1</code> button.<!-- step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} --></li><li>In the first window, press the <code>1</code> button.<!-- step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} --></li><li>Close Calculator.<!-- step {"closeSurface":"calculator"} --></li></ol><!-- test end --><h2>Android: Settings</h2><!-- test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]} --><ol><li>Open the Settings app, and wait for the Network & internet entry.<!-- step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} --></li><li>Tap the Network & internet entry.<!-- step {"click":"Network & internet"} --></li><li>Check that the screen shows <strong>Internet</strong>.</li><li>Close the Settings app.<!-- step {"closeSurface":{"app":"settings"}} --></li></ol><!-- test end --><h2>Android: your own app</h2><!-- test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} --><ol><li>Install <code>build/sessions-demo.apk</code> on a headless Android 14 phone emulator named <code>sessions-pixel</code>, open its main activity, and wait for the Welcome screen.<!-- step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} --></li><li>Close the app.<!-- step {"closeSurface":{"app":"demo"}} --></li></ol><!-- test end --><h2>iOS: Settings</h2><!-- test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} --><ol><li>On the iPhone simulator named <code>sessions-iphone</code>, open the Settings app, and wait for the General entry.<!-- step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} --></li><li>Tap the General entry.<!-- step {"click":"General"} --></li><li>Check that the screen shows <strong>About</strong>.</li><li>Close the Settings app.<!-- step {"closeSurface":{"app":"preferences"}} --></li></ol><!-- test end --></body></html>
Open a built-in app===================Windows: Character Map----------------------.. test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}#. Open Character Map, and wait for its Select button... step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}#. Click **Select**.#. Check that the window shows the **Copy** button.#. Check the Copy button again, picking the window by its title, by name, and as the newest window... step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}#. Close Character Map... step {"closeSurface":{"app":"charmap"}}.. test endmacOS: Calculator-----------------.. test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]}#. Open Calculator with ``SESSIONS_DOCS=1`` in its environment, and wait for its ``1`` button... step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}#. In the first window, press the ``1`` button... step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}#. Close Calculator... step {"closeSurface":"calculator"}.. test endAndroid: Settings-----------------.. test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]}#. Open the Settings app, and wait for the Network & internet entry... step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}#. Tap the Network & internet entry... step {"click":"Network & internet"}#. Check that the screen shows **Internet**.#. Close the Settings app... step {"closeSurface":{"app":"settings"}}.. test endAndroid: your own app---------------------.. test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}#. Install ``build/sessions-demo.apk`` on a headless Android 14 phone emulator named ``sessions-pixel``, open its main activity, and wait for the Welcome screen... step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}#. Close the app... step {"closeSurface":{"app":"demo"}}.. test endiOS: Settings-------------.. test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}#. On the iPhone simulator named ``sessions-iphone``, open the Settings app, and wait for the General entry... step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}#. Tap the General entry... step {"click":"General"}#. Check that the screen shows **About**.#. Close the Settings app... step {"closeSurface":{"app":"preferences"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-apps"><title>Open a built-in app</title></topic><task id="sessions-apps-windows"><title>Windows: Character Map</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}'/><steps><step><cmd>Open Character Map, and wait for its Select button.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}'/></info></step><step><cmd>Click <uicontrol>Select</uicontrol>.</cmd></step><step><cmd>Check that the window shows the <b>Copy</b> button.</cmd></step><step><cmd>Check the Copy button again, picking the window by its title, by name, and as the newest window.</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}'/></info></step><step><cmd>Close Character Map.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"charmap"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-mac"><title>macOS: Calculator</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-mac","detectSteps":true,"runOn":[{"platforms":"mac"}]}'/><steps><step><cmd>Open Calculator with <codeph>SESSIONS_DOCS=1</codeph> in its environment, and wait for its <codeph>1</codeph> button.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}'/></info></step><step><cmd>In the first window, press the <codeph>1</codeph> button.</cmd><info><data name="doc-detective" value='step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}'/></info></step><step><cmd>Close Calculator.</cmd><info><data name="doc-detective" value='step {"closeSurface":"calculator"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-android"><title>Android: Settings</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-android","detectSteps":true,"runOn":[{"platforms":"android"}]}'/><steps><step><cmd>Open the Settings app, and wait for the Network & internet entry.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}'/></info></step><step><cmd>Tap the Network & internet entry.</cmd><info><data name="doc-detective" value='step {"click":"Network & internet"}'/></info></step><step><cmd>Check that the screen shows <b>Internet</b>.</cmd></step><step><cmd>Close the Settings app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"settings"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-android-install"><title>Android: your own app</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-android-install","detectSteps":true,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}'/><steps><step><cmd>Install <codeph>build/sessions-demo.apk</codeph> on a headless Android 14 phone emulator named <codeph>sessions-pixel</codeph>, open its main activity, and wait for the Welcome screen.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}'/></info></step><step><cmd>Close the app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"demo"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-ios"><title>iOS: Settings</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-ios","detectSteps":true,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}'/><steps><step><cmd>On the iPhone simulator named <codeph>sessions-iphone</codeph>, open the Settings app, and wait for the General entry.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}'/></info></step><step><cmd>Tap the General entry.</cmd><info><data name="doc-detective" value='step {"click":"General"}'/></info></step><step><cmd>Check that the screen shows <b>About</b>.</cmd></step><step><cmd>Close the Settings app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"preferences"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></dita>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open a built-in app## Windows: Character Map<!-- test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} -->1. Open Character Map, and wait for its Select button.<!-- step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} -->2. Click **Select**.<!-- step {"click":"Select"} -->3. Check that the window shows the **Copy** button.<!-- step {"find":"Copy"} -->4. Check the Copy button again, picking the window by its title, by name, and as the newest window.<!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} -->5. Close Character Map.<!-- step {"closeSurface":{"app":"charmap"}} --><!-- test end -->## macOS: Calculator<!-- test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]} -->1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.<!-- step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} -->2. In the first window, press the `1` button.<!-- step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} -->3. Close Calculator.<!-- step {"closeSurface":"calculator"} --><!-- test end -->## Android: Settings<!-- test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]} -->1. Open the Settings app, and wait for the Network & internet entry.<!-- step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} -->2. Tap the Network & internet entry.<!-- step {"click":"Network & internet"} -->3. Check that the screen shows **Internet**.<!-- step {"find":"Internet"} -->4. Close the Settings app.<!-- step {"closeSurface":{"app":"settings"}} --><!-- test end -->## Android: your own app<!-- test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} -->1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.<!-- step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} -->2. Close the app.<!-- step {"closeSurface":{"app":"demo"}} --><!-- test end -->## iOS: Settings<!-- test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} -->1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.<!-- step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} -->2. Tap the General entry.<!-- step {"click":"General"} -->3. Check that the screen shows **About**.<!-- step {"find":"About"} -->4. Close the Settings app.<!-- step {"closeSurface":{"app":"preferences"}} --><!-- test end -->
# Open a built-in app## Windows: Character Map{/* test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} */}1. Open Character Map, and wait for its Select button.{/* step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} */}2. Click **Select**.{/* step {"click":"Select"} */}3. Check that the window shows the **Copy** button.{/* step {"find":"Copy"} */}4. Check the Copy button again, picking the window by its title, by name, and as the newest window.{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} */}{/* step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} */}5. Close Character Map.{/* step {"closeSurface":{"app":"charmap"}} */}{/* test end */}## macOS: Calculator{/* test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]} */}1. Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.{/* step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} */}2. In the first window, press the `1` button.{/* step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} */}3. Close Calculator.{/* step {"closeSurface":"calculator"} */}{/* test end */}## Android: Settings{/* test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]} */}1. Open the Settings app, and wait for the Network & internet entry.{/* step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} */}2. Tap the Network & internet entry.{/* step {"click":"Network & internet"} */}3. Check that the screen shows **Internet**.{/* step {"find":"Internet"} */}4. Close the Settings app.{/* step {"closeSurface":{"app":"settings"}} */}{/* test end */}## Android: your own app{/* test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} */}1. Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.{/* step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} */}2. Close the app.{/* step {"closeSurface":{"app":"demo"}} */}{/* test end */}## iOS: Settings{/* test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} */}1. On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.{/* step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} */}2. Tap the General entry.{/* step {"click":"General"} */}3. Check that the screen shows **About**.{/* step {"find":"About"} */}4. Close the Settings app.{/* step {"closeSurface":{"app":"preferences"}} */}{/* test end */}
= Open a built-in app== Windows: Character Map// (test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}). Open Character Map, and wait for its Select button.+// (step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}). Click *Select*.+// (step {"click":"Select"}). Check that the window shows the *Copy* button.+// (step {"find":"Copy"}). Check the Copy button again, picking the window by its title, by name, and as the newest window.+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}})+// (step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}). Close Character Map.+// (step {"closeSurface":{"app":"charmap"}})// (test end)== macOS: Calculator// (test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]}). Open Calculator with `SESSIONS_DOCS=1` in its environment, and wait for its `1` button.+// (step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}). In the first window, press the `1` button.+// (step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}). Close Calculator.+// (step {"closeSurface":"calculator"})// (test end)== Android: Settings// (test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]}). Open the Settings app, and wait for the Network & internet entry.+// (step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}). Tap the Network & internet entry.+// (step {"click":"Network & internet"}). Check that the screen shows *Internet*.+// (step {"find":"Internet"}). Close the Settings app.+// (step {"closeSurface":{"app":"settings"}})// (test end)== Android: your own app// (test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}). Install `build/sessions-demo.apk` on a headless Android 14 phone emulator named `sessions-pixel`, open its main activity, and wait for the Welcome screen.+// (step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}). Close the app.+// (step {"closeSurface":{"app":"demo"}})// (test end)== iOS: Settings// (test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}). On the iPhone simulator named `sessions-iphone`, open the Settings app, and wait for the General entry.+// (step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}). Tap the General entry.+// (step {"click":"General"}). Check that the screen shows *About*.+// (step {"find":"About"}). Close the Settings app.+// (step {"closeSurface":{"app":"preferences"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a built-in app</title></head><body><h1>Open a built-in app</h1><h2>Windows: Character Map</h2><!-- test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} --><ol><li>Open Character Map, and wait for its Select button.<!-- step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}} --></li><li>Click <strong>Select</strong>.<!-- step {"click":"Select"} --></li><li>Check that the window shows the <strong>Copy</strong> button.<!-- step {"find":"Copy"} --></li><li>Check the Copy button again, picking the window by its title, by name, and as the newest window.<!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}} --><!-- step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}} --></li><li>Close Character Map.<!-- step {"closeSurface":{"app":"charmap"}} --></li></ol><!-- test end --><h2>macOS: Calculator</h2><!-- test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]} --><ol><li>Open Calculator with <code>SESSIONS_DOCS=1</code> in its environment, and wait for its <code>1</code> button.<!-- step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}} --></li><li>In the first window, press the <code>1</code> button.<!-- step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}} --></li><li>Close Calculator.<!-- step {"closeSurface":"calculator"} --></li></ol><!-- test end --><h2>Android: Settings</h2><!-- test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]} --><ol><li>Open the Settings app, and wait for the Network & internet entry.<!-- step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}} --></li><li>Tap the Network & internet entry.<!-- step {"click":"Network & internet"} --></li><li>Check that the screen shows <strong>Internet</strong>.<!-- step {"find":"Internet"} --></li><li>Close the Settings app.<!-- step {"closeSurface":{"app":"settings"}} --></li></ol><!-- test end --><h2>Android: your own app</h2><!-- test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]} --><ol><li>Install <code>build/sessions-demo.apk</code> on a headless Android 14 phone emulator named <code>sessions-pixel</code>, open its main activity, and wait for the Welcome screen.<!-- step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}} --></li><li>Close the app.<!-- step {"closeSurface":{"app":"demo"}} --></li></ol><!-- test end --><h2>iOS: Settings</h2><!-- test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]} --><ol><li>On the iPhone simulator named <code>sessions-iphone</code>, open the Settings app, and wait for the General entry.<!-- step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}} --></li><li>Tap the General entry.<!-- step {"click":"General"} --></li><li>Check that the screen shows <strong>About</strong>.<!-- step {"find":"About"} --></li><li>Close the Settings app.<!-- step {"closeSurface":{"app":"preferences"}} --></li></ol><!-- test end --></body></html>
Open a built-in app===================Windows: Character Map----------------------.. test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}#. Open Character Map, and wait for its Select button... step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}#. Click **Select**... step {"click":"Select"}#. Check that the window shows the **Copy** button... step {"find":"Copy"}#. Check the Copy button again, picking the window by its title, by name, and as the newest window... step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}}.. step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}#. Close Character Map... step {"closeSurface":{"app":"charmap"}}.. test endmacOS: Calculator-----------------.. test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]}#. Open Calculator with ``SESSIONS_DOCS=1`` in its environment, and wait for its ``1`` button... step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}#. In the first window, press the ``1`` button... step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}#. Close Calculator... step {"closeSurface":"calculator"}.. test endAndroid: Settings-----------------.. test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]}#. Open the Settings app, and wait for the Network & internet entry... step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}#. Tap the Network & internet entry... step {"click":"Network & internet"}#. Check that the screen shows **Internet**... step {"find":"Internet"}#. Close the Settings app... step {"closeSurface":{"app":"settings"}}.. test endAndroid: your own app---------------------.. test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}#. Install ``build/sessions-demo.apk`` on a headless Android 14 phone emulator named ``sessions-pixel``, open its main activity, and wait for the Welcome screen... step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}#. Close the app... step {"closeSurface":{"app":"demo"}}.. test endiOS: Settings-------------.. test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}#. On the iPhone simulator named ``sessions-iphone``, open the Settings app, and wait for the General entry... step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}#. Tap the General entry... step {"click":"General"}#. Check that the screen shows **About**... step {"find":"About"}#. Close the Settings app... step {"closeSurface":{"app":"preferences"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd"><dita><topic id="sessions-apps"><title>Open a built-in app</title></topic><task id="sessions-apps-windows"><title>Windows: Character Map</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}'/><steps><step><cmd>Open Character Map, and wait for its Select button.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"C:\\Windows\\System32\\charmap.exe","name":"charmap","timeout":120000,"waitUntil":{"find":{"elementText":"Select"}}}}'/></info></step><step><cmd>Click <uicontrol>Select</uicontrol>.</cmd><info><data name="doc-detective" value='step {"click":"Select"}'/></info></step><step><cmd>Check that the window shows the <b>Copy</b> button.</cmd><info><data name="doc-detective" value='step {"find":"Copy"}'/></info></step><step><cmd>Check the Copy button again, picking the window by its title, by name, and as the newest window.</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"title":"Character Map"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":"Character Map"}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"name":"Character Map"}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":-1}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap","window":{"index":-1}}}}'/><data name="doc-detective" value='step {"find":{"elementText":"Copy","surface":{"app":"charmap"}}}'/></info></step><step><cmd>Close Character Map.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"charmap"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-mac"><title>macOS: Calculator</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-mac","detectSteps":false,"runOn":[{"platforms":"mac"}]}'/><steps><step><cmd>Open Calculator with <codeph>SESSIONS_DOCS=1</codeph> in its environment, and wait for its <codeph>1</codeph> button.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"/System/Applications/Calculator.app","name":"calculator","env":{"SESSIONS_DOCS":"1"},"timeout":180000,"waitUntil":{"find":{"elementAria":"1"}}}}'/></info></step><step><cmd>In the first window, press the <codeph>1</codeph> button.</cmd><info><data name="doc-detective" value='step {"click":{"elementAria":"1","surface":{"app":"calculator","window":{"index":0}}}}'/></info></step><step><cmd>Close Calculator.</cmd><info><data name="doc-detective" value='step {"closeSurface":"calculator"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-android"><title>Android: Settings</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-android","detectSteps":false,"runOn":[{"platforms":"android"}]}'/><steps><step><cmd>Open the Settings app, and wait for the Network & internet entry.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.android.settings","name":"settings","timeout":180000,"waitUntil":{"find":{"elementText":"Network & internet"}}}}'/></info></step><step><cmd>Tap the Network & internet entry.</cmd><info><data name="doc-detective" value='step {"click":"Network & internet"}'/></info></step><step><cmd>Check that the screen shows <b>Internet</b>.</cmd><info><data name="doc-detective" value='step {"find":"Internet"}'/></info></step><step><cmd>Close the Settings app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"settings"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-android-install"><title>Android: your own app</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-android-install","detectSteps":false,"runOn":[{"platforms":"android","device":"sessions-pixel","requires":{"files":["build/sessions-demo.apk"]}}]}'/><steps><step><cmd>Install <codeph>build/sessions-demo.apk</codeph> on a headless Android 14 phone emulator named <codeph>sessions-pixel</codeph>, open its main activity, and wait for the Welcome screen.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.example.sessionsdemo","name":"demo","install":"build/sessions-demo.apk","activity":".MainActivity","device":{"platform":"android","name":"sessions-pixel","deviceType":"phone","osVersion":"14","headless":true},"driverOptions":{"appium:newCommandTimeout":300},"timeout":300000,"waitUntil":{"find":{"elementText":"Welcome"}}}}'/></info></step><step><cmd>Close the app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"demo"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task><task id="sessions-apps-ios"><title>iOS: Settings</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-apps-ios","detectSteps":false,"runOn":[{"platforms":"ios","device":{"platform":"ios","name":"sessions-iphone","deviceType":"phone","osVersion":"18.0","headless":true}}]}'/><steps><step><cmd>On the iPhone simulator named <codeph>sessions-iphone</codeph>, open the Settings app, and wait for the General entry.</cmd><info><data name="doc-detective" value='step {"startSurface":{"app":"com.apple.Preferences","name":"preferences","device":"sessions-iphone","timeout":180000,"waitUntil":{"find":{"elementText":"General"}}}}'/></info></step><step><cmd>Tap the General entry.</cmd><info><data name="doc-detective" value='step {"click":"General"}'/></info></step><step><cmd>Check that the screen shows <b>About</b>.</cmd><info><data name="doc-detective" value='step {"find":"About"}'/></info></step><step><cmd>Close the Settings app.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"app":"preferences"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task></dita>
JSON
YAML
{"$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json","tests": [{"testId": "sessions-apps-windows","runOn": [{"platforms": "windows"}],"steps": [{"startSurface": {"app": "C:\\Windows\\System32\\charmap.exe","name": "charmap","timeout": 120000,"waitUntil": {"find": {"elementText": "Select"}}}},{"click": "Select"},{"find": "Copy"},{"find": {"elementText": "Copy","surface": {"app": "charmap","window": {"title": "Character Map"}}}},{"find": {"elementText": "Copy","surface": {"app": "charmap","window": "Character Map"}}},{"find": {"elementText": "Copy","surface": {"app": "charmap","window": {"name": "Character Map"}}}},{"find": {"elementText": "Copy","surface": {"app": "charmap","window": -1}}},{"find": {"elementText": "Copy","surface": {"app": "charmap","window": {"index": -1}}}},{"find": {"elementText": "Copy","surface": {"app": "charmap"}}},{"closeSurface": {"app": "charmap"}}]},{"testId": "sessions-apps-mac","runOn": [{"platforms": "mac"}],"steps": [{"startSurface": {"app": "/System/Applications/Calculator.app","name": "calculator","env": {"SESSIONS_DOCS": "1"},"timeout": 180000,"waitUntil": {"find": {"elementAria": "1"}}}},{"click": {"elementAria": "1","surface": {"app": "calculator","window": {"index": 0}}}},{"closeSurface": "calculator"}]},{"testId": "sessions-apps-android","runOn": [{"platforms": "android"}],"steps": [{"startSurface": {"app": "com.android.settings","name": "settings","timeout": 180000,"waitUntil": {"find": {"elementText": "Network & internet"}}}},{"click": "Network & internet"},{"find": "Internet"},{"closeSurface": {"app": "settings"}}]},{"testId": "sessions-apps-android-install","runOn": [{"platforms": "android","device": "sessions-pixel","requires": {"files": ["build/sessions-demo.apk"]}}],"steps": [{"startSurface": {"app": "com.example.sessionsdemo","name": "demo","install": "build/sessions-demo.apk","activity": ".MainActivity","device": {"platform": "android","name": "sessions-pixel","deviceType": "phone","osVersion": "14","headless": true},"driverOptions": {"appium:newCommandTimeout": 300},"timeout": 300000,"waitUntil": {"find": {"elementText": "Welcome"}}}},{"closeSurface": {"app": "demo"}}]},{"testId": "sessions-apps-ios","runOn": [{"platforms": "ios","device": {"platform": "ios","name": "sessions-iphone","deviceType": "phone","osVersion": "18.0","headless": true}}],"steps": [{"startSurface": {"app": "com.apple.Preferences","name": "preferences","device": "sessions-iphone","timeout": 180000,"waitUntil": {"find": {"elementText": "General"}}}},{"click": "General"},{"find": "About"},{"closeSurface": {"app": "preferences"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-apps-windowsrunOn:- platforms: windowssteps:- startSurface:app: C:\Windows\System32\charmap.exename: charmaptimeout: 120000waitUntil:find:elementText: Select- click: Select- find: Copy- find:elementText: Copysurface:app: charmapwindow:title: Character Map- find:elementText: Copysurface:app: charmapwindow: Character Map- find:elementText: Copysurface:app: charmapwindow:name: Character Map- find:elementText: Copysurface:app: charmapwindow: -1- find:elementText: Copysurface:app: charmapwindow:index: -1- find:elementText: Copysurface:app: charmap- closeSurface:app: charmap- testId: sessions-apps-macrunOn:- platforms: macsteps:- startSurface:app: /System/Applications/Calculator.appname: calculatorenv:SESSIONS_DOCS: "1"timeout: 180000waitUntil:find:elementAria: "1"- click:elementAria: "1"surface:app: calculatorwindow:index: 0- closeSurface: calculator- testId: sessions-apps-androidrunOn:- platforms: androidsteps:- startSurface:app: com.android.settingsname: settingstimeout: 180000waitUntil:find:elementText: Network & internet- click: Network & internet- find: Internet- closeSurface:app: settings- testId: sessions-apps-android-installrunOn:- platforms: androiddevice: sessions-pixelrequires:files:- build/sessions-demo.apksteps:- startSurface:app: com.example.sessionsdemoname: demoinstall: build/sessions-demo.apkactivity: .MainActivitydevice:platform: androidname: sessions-pixeldeviceType: phoneosVersion: "14"headless: truedriverOptions:appium:newCommandTimeout: 300timeout: 300000waitUntil:find:elementText: Welcome- closeSurface:app: demo- testId: sessions-apps-iosrunOn:- platforms: iosdevice:platform: iosname: sessions-iphonedeviceType: phoneosVersion: "18.0"headless: truesteps:- startSurface:app: com.apple.Preferencesname: preferencesdevice: sessions-iphonetimeout: 180000waitUntil:find:elementText: General- click: General- find: About- closeSurface:app: preferences
Where each test runs
| Test | Runs on | Elsewhere |
|---|---|---|
| Character Map | Windows | SKIPPED |
| Calculator | macOS, with Accessibility permission for the process that runs Doc Detective | SKIPPED |
| Android Settings | A host with the Android toolchain (doc-detective install android) | SKIPPED |
| Your own Android app | A host with the Android toolchain and the app’s build/sessions-demo.apk | SKIPPED |
| iOS Settings | macOS with Xcode and Simulator tooling | SKIPPED |
The Android app test needs your own app, so its context requires the APK file and skips without it.
For setup on each platform, see the native app guides, starting with Native Windows apps.
Forms in this example
- An app
windowselector takes a title as a string,{ "title" }or{ "name" }criteria,-1or{ "index": -1 }for the newest window, or a position such as{ "index": 0 }. Positions from the start work on macOS only. envsets environment variables for a macOS app.install,activity, anddriverOptionsinstall an Android app, open one of its activities, and pass options to the automation driver.deviceonstartSurfacenames the device as a string, or describes it as a device descriptor withplatform,name,deviceType,osVersion, andheadless. The context’s owndevicetakes the same two forms and sets the default for the context.
What detection finds
On Windows, Click **Select** becomes a click step and a find step for Select, and the bold Copy, Internet, and About become find steps. The mobile procedures say Tap, and a statement holds that click, because after the tap the screen no longer shows the entry’s label. A detected find for the label would fail.
In DITA, <uicontrol> marks the control to click, as in Navigation and interaction.
saveCookie and loadCookie permutations
"saveCookie": "<name>"
Varies: saveCookie and loadCookie · Value: "sessions_pname" · Effect: a bare cookie name saves the cookie to, and loads it from, the environment variable of the same name.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.4. Load the cookie from the `sessions_pname` environment variable.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.
# Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.4. Load the cookie from the `sessions_pname` environment variable.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.
= Keep a cookie in an environment variable. Sign in at http://localhost:8092/cookies/set/sessions_pname/signed-in[the sign-in page]. The server sets the `sessions_pname` cookie.. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.. Sign out at http://localhost:8092/cookies/set/sessions_pname/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from the `sessions_pname` environment variable.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pname=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in an environment variable</title></head><body><h1>Keep a cookie in an environment variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-in">the sign-in page</a>. The server sets the <code>sessions_pname</code> cookie.</li><li>Save the <code>sessions_pname</code> cookie to the <code>sessions_pname</code> environment variable.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from the <code>sessions_pname</code> environment variable.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pname=signed-in</strong>.</li></ol></body></html>
Keep a cookie in an environment variable========================================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pname/signed-in>`__. The server sets the ``sessions_pname`` cookie.#. Save the ``sessions_pname`` cookie to the ``sessions_pname`` environment variable.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pname/signed-out>`__, which replaces the cookie.#. Load the cookie from the ``sessions_pname`` environment variable.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pname=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-name"><title>Keep a cookie in an environment variable</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pname</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>sessions_pname</codeph> cookie to the <codeph>sessions_pname</codeph> environment variable.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from the <codeph>sessions_pname</codeph> environment variable.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pname=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-form-name","detectSteps":true} --># Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} -->2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.<!-- step {"saveCookie":"sessions_pname"} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} -->4. Load the cookie from the `sessions_pname` environment variable.<!-- step {"loadCookie":"sessions_pname"} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-cookie-form-name","detectSteps":true} */}# Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} */}2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.{/* step {"saveCookie":"sessions_pname"} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} */}4. Load the cookie from the `sessions_pname` environment variable.{/* step {"loadCookie":"sessions_pname"} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.{/* test end */}
= Keep a cookie in an environment variable// (test {"testId":"sessions-cookie-form-name","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_pname/signed-in[the sign-in page]. The server sets the `sessions_pname` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}). Save the `sessions_pname` cookie to the `sessions_pname` environment variable.+// (step {"saveCookie":"sessions_pname"}). Sign out at http://localhost:8092/cookies/set/sessions_pname/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}). Load the cookie from the `sessions_pname` environment variable.+// (step {"loadCookie":"sessions_pname"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pname=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in an environment variable</title></head><body><!-- test {"testId":"sessions-cookie-form-name","detectSteps":true} --><h1>Keep a cookie in an environment variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-in">the sign-in page</a>. The server sets the <code>sessions_pname</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} --></li><li>Save the <code>sessions_pname</code> cookie to the <code>sessions_pname</code> environment variable.<!-- step {"saveCookie":"sessions_pname"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} --></li><li>Load the cookie from the <code>sessions_pname</code> environment variable.<!-- step {"loadCookie":"sessions_pname"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pname=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep a cookie in an environment variable========================================.. test {"testId":"sessions-cookie-form-name","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pname/signed-in>`__. The server sets the ``sessions_pname`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}#. Save the ``sessions_pname`` cookie to the ``sessions_pname`` environment variable... step {"saveCookie":"sessions_pname"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pname/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}#. Load the cookie from the ``sessions_pname`` environment variable... step {"loadCookie":"sessions_pname"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pname=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-name"><title>Keep a cookie in an environment variable</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-form-name","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pname</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_pname</codeph> cookie to the <codeph>sessions_pname</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_pname"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}'/></info></step><step><cmd>Load the cookie from the <codeph>sessions_pname</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_pname"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pname=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-form-name","detectSteps":false} --># Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} -->2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.<!-- step {"saveCookie":"sessions_pname"} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} -->4. Load the cookie from the `sessions_pname` environment variable.<!-- step {"loadCookie":"sessions_pname"} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pname=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-cookie-form-name","detectSteps":false} */}# Keep a cookie in an environment variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pname/signed-in). The server sets the `sessions_pname` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} */}2. Save the `sessions_pname` cookie to the `sessions_pname` environment variable.{/* step {"saveCookie":"sessions_pname"} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pname/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} */}4. Load the cookie from the `sessions_pname` environment variable.{/* step {"loadCookie":"sessions_pname"} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pname=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pname=signed-in"} */}{/* test end */}
= Keep a cookie in an environment variable// (test {"testId":"sessions-cookie-form-name","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_pname/signed-in[the sign-in page]. The server sets the `sessions_pname` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}). Save the `sessions_pname` cookie to the `sessions_pname` environment variable.+// (step {"saveCookie":"sessions_pname"}). Sign out at http://localhost:8092/cookies/set/sessions_pname/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}). Load the cookie from the `sessions_pname` environment variable.+// (step {"loadCookie":"sessions_pname"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pname=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pname=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in an environment variable</title></head><body><!-- test {"testId":"sessions-cookie-form-name","detectSteps":false} --><h1>Keep a cookie in an environment variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-in">the sign-in page</a>. The server sets the <code>sessions_pname</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"} --></li><li>Save the <code>sessions_pname</code> cookie to the <code>sessions_pname</code> environment variable.<!-- step {"saveCookie":"sessions_pname"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pname/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"} --></li><li>Load the cookie from the <code>sessions_pname</code> environment variable.<!-- step {"loadCookie":"sessions_pname"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pname=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pname=signed-in"} --></li></ol><!-- test end --></body></html>
Keep a cookie in an environment variable========================================.. test {"testId":"sessions-cookie-form-name","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pname/signed-in>`__. The server sets the ``sessions_pname`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}#. Save the ``sessions_pname`` cookie to the ``sessions_pname`` environment variable... step {"saveCookie":"sessions_pname"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pname/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}#. Load the cookie from the ``sessions_pname`` environment variable... step {"loadCookie":"sessions_pname"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pname=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pname=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-name"><title>Keep a cookie in an environment variable</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-form-name","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pname</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_pname</codeph> cookie to the <codeph>sessions_pname</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_pname"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pname/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pname/signed-out"}'/></info></step><step><cmd>Load the cookie from the <codeph>sessions_pname</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_pname"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pname=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pname=signed-in"}'/></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": "sessions-cookie-form-name","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_pname/signed-in"},{"saveCookie": "sessions_pname"},{"goTo": "http://localhost:8092/cookies/set/sessions_pname/signed-out"},{"loadCookie": "sessions_pname"},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pname=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookie-form-namesteps:- goTo: http://localhost:8092/cookies/set/sessions_pname/signed-in- saveCookie: sessions_pname- goTo: http://localhost:8092/cookies/set/sessions_pname/signed-out- loadCookie: sessions_pname- goTo: http://localhost:8092/cookies- find: sessions_pname=signed-in
"saveCookie": "<name>.txt"
Varies: saveCookie and loadCookie · Value: "sessions_ptxt.txt" · Effect: a path ending in .txt saves the cookie named for the file to that file in outputDir, and never overwrites one that exists.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.5. Load the cookie from `sessions_ptxt.txt`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.
# Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.5. Load the cookie from `sessions_ptxt.txt`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.
= Keep a cookie in a file. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.. Sign in at http://localhost:8092/cookies/set/sessions_ptxt/signed-in[the sign-in page]. The server sets the `sessions_ptxt` cookie.. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.. Sign out at http://localhost:8092/cookies/set/sessions_ptxt/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from `sessions_ptxt.txt`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_ptxt=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a file</title></head><body><h1>Keep a cookie in a file</h1><ol><li>Delete any <code>sessions_ptxt.txt</code> that an earlier run left in the output folder.</li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in">the sign-in page</a>. The server sets the <code>sessions_ptxt</code> cookie.</li><li>Save the <code>sessions_ptxt</code> cookie to <code>sessions_ptxt.txt</code>.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from <code>sessions_ptxt.txt</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_ptxt=signed-in</strong>.</li></ol></body></html>
Keep a cookie in a file=======================#. Delete any ``sessions_ptxt.txt`` that an earlier run left in the output folder.#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_ptxt/signed-in>`__. The server sets the ``sessions_ptxt`` cookie.#. Save the ``sessions_ptxt`` cookie to ``sessions_ptxt.txt``.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_ptxt/signed-out>`__, which replaces the cookie.#. Load the cookie from ``sessions_ptxt.txt``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_ptxt=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-txt"><title>Keep a cookie in a file</title><taskbody><steps><step><cmd>Delete any <codeph>sessions_ptxt.txt</codeph> that an earlier run left in the output folder.</cmd></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_ptxt</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>sessions_ptxt</codeph> cookie to <codeph>sessions_ptxt.txt</codeph>.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from <codeph>sessions_ptxt.txt</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_ptxt=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-form-txt","detectSteps":true} --># Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} -->2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} -->3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.<!-- step {"saveCookie":"sessions_ptxt.txt"} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} -->5. Load the cookie from `sessions_ptxt.txt`.<!-- step {"loadCookie":"sessions_ptxt.txt"} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-cookie-form-txt","detectSteps":true} */}# Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.{/* step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} */}2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} */}3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.{/* step {"saveCookie":"sessions_ptxt.txt"} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} */}5. Load the cookie from `sessions_ptxt.txt`.{/* step {"loadCookie":"sessions_ptxt.txt"} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.{/* test end */}
= Keep a cookie in a file// (test {"testId":"sessions-cookie-form-txt","detectSteps":true}). Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.+// (step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}). Sign in at http://localhost:8092/cookies/set/sessions_ptxt/signed-in[the sign-in page]. The server sets the `sessions_ptxt` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}). Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.+// (step {"saveCookie":"sessions_ptxt.txt"}). Sign out at http://localhost:8092/cookies/set/sessions_ptxt/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}). Load the cookie from `sessions_ptxt.txt`.+// (step {"loadCookie":"sessions_ptxt.txt"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_ptxt=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a file</title></head><body><!-- test {"testId":"sessions-cookie-form-txt","detectSteps":true} --><h1>Keep a cookie in a file</h1><ol><li>Delete any <code>sessions_ptxt.txt</code> that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} --></li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in">the sign-in page</a>. The server sets the <code>sessions_ptxt</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} --></li><li>Save the <code>sessions_ptxt</code> cookie to <code>sessions_ptxt.txt</code>.<!-- step {"saveCookie":"sessions_ptxt.txt"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} --></li><li>Load the cookie from <code>sessions_ptxt.txt</code>.<!-- step {"loadCookie":"sessions_ptxt.txt"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_ptxt=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep a cookie in a file=======================.. test {"testId":"sessions-cookie-form-txt","detectSteps":true}#. Delete any ``sessions_ptxt.txt`` that an earlier run left in the output folder... step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_ptxt/signed-in>`__. The server sets the ``sessions_ptxt`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}#. Save the ``sessions_ptxt`` cookie to ``sessions_ptxt.txt``... step {"saveCookie":"sessions_ptxt.txt"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_ptxt/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}#. Load the cookie from ``sessions_ptxt.txt``... step {"loadCookie":"sessions_ptxt.txt"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_ptxt=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-txt"><title>Keep a cookie in a file</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-form-txt","detectSteps":true}'/><steps><step><cmd>Delete any <codeph>sessions_ptxt.txt</codeph> that an earlier run left in the output folder.</cmd><info><data name="doc-detective" value='step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}'/></info></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_ptxt</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_ptxt</codeph> cookie to <codeph>sessions_ptxt.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_ptxt.txt"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>sessions_ptxt.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_ptxt.txt"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_ptxt=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-form-txt","detectSteps":false} --># Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} -->2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} -->3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.<!-- step {"saveCookie":"sessions_ptxt.txt"} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} -->5. Load the cookie from `sessions_ptxt.txt`.<!-- step {"loadCookie":"sessions_ptxt.txt"} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_ptxt=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-cookie-form-txt","detectSteps":false} */}# Keep a cookie in a file1. Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.{/* step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} */}2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_ptxt/signed-in). The server sets the `sessions_ptxt` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} */}3. Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.{/* step {"saveCookie":"sessions_ptxt.txt"} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_ptxt/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} */}5. Load the cookie from `sessions_ptxt.txt`.{/* step {"loadCookie":"sessions_ptxt.txt"} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_ptxt=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_ptxt=signed-in"} */}{/* test end */}
= Keep a cookie in a file// (test {"testId":"sessions-cookie-form-txt","detectSteps":false}). Delete any `sessions_ptxt.txt` that an earlier run left in the output folder.+// (step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}). Sign in at http://localhost:8092/cookies/set/sessions_ptxt/signed-in[the sign-in page]. The server sets the `sessions_ptxt` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}). Save the `sessions_ptxt` cookie to `sessions_ptxt.txt`.+// (step {"saveCookie":"sessions_ptxt.txt"}). Sign out at http://localhost:8092/cookies/set/sessions_ptxt/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}). Load the cookie from `sessions_ptxt.txt`.+// (step {"loadCookie":"sessions_ptxt.txt"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_ptxt=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_ptxt=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a file</title></head><body><!-- test {"testId":"sessions-cookie-form-txt","detectSteps":false} --><h1>Keep a cookie in a file</h1><ol><li>Delete any <code>sessions_ptxt.txt</code> that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""} --></li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in">the sign-in page</a>. The server sets the <code>sessions_ptxt</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"} --></li><li>Save the <code>sessions_ptxt</code> cookie to <code>sessions_ptxt.txt</code>.<!-- step {"saveCookie":"sessions_ptxt.txt"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"} --></li><li>Load the cookie from <code>sessions_ptxt.txt</code>.<!-- step {"loadCookie":"sessions_ptxt.txt"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_ptxt=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_ptxt=signed-in"} --></li></ol><!-- test end --></body></html>
Keep a cookie in a file=======================.. test {"testId":"sessions-cookie-form-txt","detectSteps":false}#. Delete any ``sessions_ptxt.txt`` that an earlier run left in the output folder... step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_ptxt/signed-in>`__. The server sets the ``sessions_ptxt`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}#. Save the ``sessions_ptxt`` cookie to ``sessions_ptxt.txt``... step {"saveCookie":"sessions_ptxt.txt"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_ptxt/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}#. Load the cookie from ``sessions_ptxt.txt``... step {"loadCookie":"sessions_ptxt.txt"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_ptxt=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_ptxt=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-form-txt"><title>Keep a cookie in a file</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-form-txt","detectSteps":false}'/><steps><step><cmd>Delete any <codeph>sessions_ptxt.txt</codeph> that an earlier run left in the output folder.</cmd><info><data name="doc-detective" value='step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""}'/></info></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_ptxt</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_ptxt</codeph> cookie to <codeph>sessions_ptxt.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"saveCookie":"sessions_ptxt.txt"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_ptxt/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_ptxt/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>sessions_ptxt.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":"sessions_ptxt.txt"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_ptxt=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_ptxt=signed-in"}'/></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": "sessions-cookie-form-txt","steps": [{"runShell": "node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""},{"goTo": "http://localhost:8092/cookies/set/sessions_ptxt/signed-in"},{"saveCookie": "sessions_ptxt.txt"},{"goTo": "http://localhost:8092/cookies/set/sessions_ptxt/signed-out"},{"loadCookie": "sessions_ptxt.txt"},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_ptxt=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookie-form-txtsteps:- runShell: "node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions_ptxt.txt', { force: true })\""- goTo: http://localhost:8092/cookies/set/sessions_ptxt/signed-in- saveCookie: sessions_ptxt.txt- goTo: http://localhost:8092/cookies/set/sessions_ptxt/signed-out- loadCookie: sessions_ptxt.txt- goTo: http://localhost:8092/cookies- find: sessions_ptxt=signed-in
"overwrite": true
Varies: saveCookie.overwrite · Value: true · Effect: a second save to the same file replaces it, so the later value wins.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.5. Load the cookie from `sessions_pover.txt`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.
# Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.5. Load the cookie from `sessions_pover.txt`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.
= Replace a saved cookie. Sign in at http://localhost:8092/cookies/set/sessions_pover/first[the sign-in page]. The server sets the `sessions_pover` cookie.. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.. Sign in again at http://localhost:8092/cookies/set/sessions_pover/second[the second sign-in page], and save the cookie to the same file.. Sign out at http://localhost:8092/cookies/set/sessions_pover/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from `sessions_pover.txt`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pover=second*.
<!DOCTYPE html><html lang="en"><head><title>Replace a saved cookie</title></head><body><h1>Replace a saved cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pover/first">the sign-in page</a>. The server sets the <code>sessions_pover</code> cookie.</li><li>Save the <code>sessions_pover</code> cookie to <code>sessions_pover.txt</code>, replacing any earlier file.</li><li>Sign in again at <a href="http://localhost:8092/cookies/set/sessions_pover/second">the second sign-in page</a>, and save the cookie to the same file.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pover/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from <code>sessions_pover.txt</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pover=second</strong>.</li></ol></body></html>
Replace a saved cookie======================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pover/first>`__. The server sets the ``sessions_pover`` cookie.#. Save the ``sessions_pover`` cookie to ``sessions_pover.txt``, replacing any earlier file.#. Sign in again at `the second sign-in page <http://localhost:8092/cookies/set/sessions_pover/second>`__, and save the cookie to the same file.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pover/signed-out>`__, which replaces the cookie.#. Load the cookie from ``sessions_pover.txt``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pover=second**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-overwrite-true"><title>Replace a saved cookie</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pover/first" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pover</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>sessions_pover</codeph> cookie to <codeph>sessions_pover.txt</codeph>, replacing any earlier file.</cmd></step><step><cmd>Sign in again at <xref href="http://localhost:8092/cookies/set/sessions_pover/second" scope="external" format="html">the second sign-in page</xref>, and save the cookie to the same file.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pover/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from <codeph>sessions_pover.txt</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pover=second</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-overwrite-true","detectSteps":true} --># Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} -->2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.<!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} -->3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} --><!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} -->5. Load the cookie from `sessions_pover.txt`.<!-- step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.<!-- test end -->
{/* test {"testId":"sessions-cookie-overwrite-true","detectSteps":true} */}# Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} */}2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.{/* step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} */}3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} */}{/* step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} */}5. Load the cookie from `sessions_pover.txt`.{/* step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.{/* test end */}
= Replace a saved cookie// (test {"testId":"sessions-cookie-overwrite-true","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_pover/first[the sign-in page]. The server sets the `sessions_pover` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}). Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.+// (step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}). Sign in again at http://localhost:8092/cookies/set/sessions_pover/second[the second sign-in page], and save the cookie to the same file.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"})+// (step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pover/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}). Load the cookie from `sessions_pover.txt`.+// (step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pover=second*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Replace a saved cookie</title></head><body><!-- test {"testId":"sessions-cookie-overwrite-true","detectSteps":true} --><h1>Replace a saved cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pover/first">the sign-in page</a>. The server sets the <code>sessions_pover</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} --></li><li>Save the <code>sessions_pover</code> cookie to <code>sessions_pover.txt</code>, replacing any earlier file.<!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} --></li><li>Sign in again at <a href="http://localhost:8092/cookies/set/sessions_pover/second">the second sign-in page</a>, and save the cookie to the same file.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} --><!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pover/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} --></li><li>Load the cookie from <code>sessions_pover.txt</code>.<!-- step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pover=second</strong>.</li></ol><!-- test end --></body></html>
Replace a saved cookie======================.. test {"testId":"sessions-cookie-overwrite-true","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pover/first>`__. The server sets the ``sessions_pover`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}#. Save the ``sessions_pover`` cookie to ``sessions_pover.txt``, replacing any earlier file... step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}#. Sign in again at `the second sign-in page <http://localhost:8092/cookies/set/sessions_pover/second>`__, and save the cookie to the same file... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"}.. step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pover/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}#. Load the cookie from ``sessions_pover.txt``... step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pover=second**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-overwrite-true"><title>Replace a saved cookie</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-overwrite-true","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pover/first" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pover</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}'/></info></step><step><cmd>Save the <codeph>sessions_pover</codeph> cookie to <codeph>sessions_pover.txt</codeph>, replacing any earlier file.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}'/></info></step><step><cmd>Sign in again at <xref href="http://localhost:8092/cookies/set/sessions_pover/second" scope="external" format="html">the second sign-in page</xref>, and save the cookie to the same file.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pover/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>sessions_pover.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pover=second</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-overwrite-true","detectSteps":false} --># Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} -->2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.<!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} -->3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} --><!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} -->5. Load the cookie from `sessions_pover.txt`.<!-- step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pover=second"} --><!-- test end -->
{/* test {"testId":"sessions-cookie-overwrite-true","detectSteps":false} */}# Replace a saved cookie1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pover/first). The server sets the `sessions_pover` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} */}2. Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.{/* step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} */}3. Sign in again at [the second sign-in page](http://localhost:8092/cookies/set/sessions_pover/second), and save the cookie to the same file.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} */}{/* step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pover/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} */}5. Load the cookie from `sessions_pover.txt`.{/* step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pover=second**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pover=second"} */}{/* test end */}
= Replace a saved cookie// (test {"testId":"sessions-cookie-overwrite-true","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_pover/first[the sign-in page]. The server sets the `sessions_pover` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}). Save the `sessions_pover` cookie to `sessions_pover.txt`, replacing any earlier file.+// (step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}). Sign in again at http://localhost:8092/cookies/set/sessions_pover/second[the second sign-in page], and save the cookie to the same file.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"})+// (step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pover/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}). Load the cookie from `sessions_pover.txt`.+// (step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pover=second*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pover=second"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Replace a saved cookie</title></head><body><!-- test {"testId":"sessions-cookie-overwrite-true","detectSteps":false} --><h1>Replace a saved cookie</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pover/first">the sign-in page</a>. The server sets the <code>sessions_pover</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"} --></li><li>Save the <code>sessions_pover</code> cookie to <code>sessions_pover.txt</code>, replacing any earlier file.<!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} --></li><li>Sign in again at <a href="http://localhost:8092/cookies/set/sessions_pover/second">the second sign-in page</a>, and save the cookie to the same file.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"} --><!-- step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pover/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"} --></li><li>Load the cookie from <code>sessions_pover.txt</code>.<!-- step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pover=second</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pover=second"} --></li></ol><!-- test end --></body></html>
Replace a saved cookie======================.. test {"testId":"sessions-cookie-overwrite-true","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pover/first>`__. The server sets the ``sessions_pover`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}#. Save the ``sessions_pover`` cookie to ``sessions_pover.txt``, replacing any earlier file... step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}#. Sign in again at `the second sign-in page <http://localhost:8092/cookies/set/sessions_pover/second>`__, and save the cookie to the same file... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"}.. step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pover/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}#. Load the cookie from ``sessions_pover.txt``... step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pover=second**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pover=second"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-overwrite-true"><title>Replace a saved cookie</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-overwrite-true","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pover/first" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pover</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/first"}'/></info></step><step><cmd>Save the <codeph>sessions_pover</codeph> cookie to <codeph>sessions_pover.txt</codeph>, replacing any earlier file.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}'/></info></step><step><cmd>Sign in again at <xref href="http://localhost:8092/cookies/set/sessions_pover/second" scope="external" format="html">the second sign-in page</xref>, and save the cookie to the same file.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/second"}'/><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pover","path":"sessions_pover.txt","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pover/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pover/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>sessions_pover.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pover","path":"sessions_pover.txt"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pover=second</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pover=second"}'/></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": "sessions-cookie-overwrite-true","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_pover/first"},{"saveCookie": {"name": "sessions_pover","path": "sessions_pover.txt","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_pover/second"},{"saveCookie": {"name": "sessions_pover","path": "sessions_pover.txt","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_pover/signed-out"},{"loadCookie": {"name": "sessions_pover","path": "sessions_pover.txt"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pover=second"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookie-overwrite-truesteps:- goTo: http://localhost:8092/cookies/set/sessions_pover/first- saveCookie:name: sessions_poverpath: sessions_pover.txtoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_pover/second- saveCookie:name: sessions_poverpath: sessions_pover.txtoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_pover/signed-out- loadCookie:name: sessions_poverpath: sessions_pover.txt- goTo: http://localhost:8092/cookies- find: sessions_pover=second
"domain": "localhost"
Varies: saveCookie.domain and loadCookie.domain · Value: "localhost" · Effect: saves and loads only the cookie set for that domain.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.4. Load the `localhost` cookie from `sessions_pdomain.txt`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.
# Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.4. Load the `localhost` cookie from `sessions_pdomain.txt`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.
= Keep the cookie for one domain. Sign in at http://localhost:8092/cookies/set/sessions_pdomain/signed-in[the sign-in page]. The server sets the `sessions_pdomain` cookie.. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.. Sign out at http://localhost:8092/cookies/set/sessions_pdomain/signed-out[the sign-out page], which replaces the cookie.. Load the `localhost` cookie from `sessions_pdomain.txt`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pdomain=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep the cookie for one domain</title></head><body><h1>Keep the cookie for one domain</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in">the sign-in page</a>. The server sets the <code>sessions_pdomain</code> cookie.</li><li>Save the <code>localhost</code> cookie named <code>sessions_pdomain</code> to <code>sessions_pdomain.txt</code>.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the <code>localhost</code> cookie from <code>sessions_pdomain.txt</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pdomain=signed-in</strong>.</li></ol></body></html>
Keep the cookie for one domain==============================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pdomain/signed-in>`__. The server sets the ``sessions_pdomain`` cookie.#. Save the ``localhost`` cookie named ``sessions_pdomain`` to ``sessions_pdomain.txt``.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pdomain/signed-out>`__, which replaces the cookie.#. Load the ``localhost`` cookie from ``sessions_pdomain.txt``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pdomain=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-domain"><title>Keep the cookie for one domain</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pdomain</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>localhost</codeph> cookie named <codeph>sessions_pdomain</codeph> to <codeph>sessions_pdomain.txt</codeph>.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the <codeph>localhost</codeph> cookie from <codeph>sessions_pdomain.txt</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pdomain=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-domain","detectSteps":true} --># Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} -->2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.<!-- step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} -->4. Load the `localhost` cookie from `sessions_pdomain.txt`.<!-- step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-cookie-domain","detectSteps":true} */}# Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} */}2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.{/* step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} */}4. Load the `localhost` cookie from `sessions_pdomain.txt`.{/* step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.{/* test end */}
= Keep the cookie for one domain// (test {"testId":"sessions-cookie-domain","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_pdomain/signed-in[the sign-in page]. The server sets the `sessions_pdomain` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}). Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.+// (step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pdomain/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}). Load the `localhost` cookie from `sessions_pdomain.txt`.+// (step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pdomain=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep the cookie for one domain</title></head><body><!-- test {"testId":"sessions-cookie-domain","detectSteps":true} --><h1>Keep the cookie for one domain</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in">the sign-in page</a>. The server sets the <code>sessions_pdomain</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} --></li><li>Save the <code>localhost</code> cookie named <code>sessions_pdomain</code> to <code>sessions_pdomain.txt</code>.<!-- step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} --></li><li>Load the <code>localhost</code> cookie from <code>sessions_pdomain.txt</code>.<!-- step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pdomain=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep the cookie for one domain==============================.. test {"testId":"sessions-cookie-domain","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pdomain/signed-in>`__. The server sets the ``sessions_pdomain`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}#. Save the ``localhost`` cookie named ``sessions_pdomain`` to ``sessions_pdomain.txt``... step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pdomain/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}#. Load the ``localhost`` cookie from ``sessions_pdomain.txt``... step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pdomain=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-domain"><title>Keep the cookie for one domain</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-domain","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pdomain</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}'/></info></step><step><cmd>Save the <codeph>localhost</codeph> cookie named <codeph>sessions_pdomain</codeph> to <codeph>sessions_pdomain.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}'/></info></step><step><cmd>Load the <codeph>localhost</codeph> cookie from <codeph>sessions_pdomain.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pdomain=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-domain","detectSteps":false} --># Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} -->2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.<!-- step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} -->4. Load the `localhost` cookie from `sessions_pdomain.txt`.<!-- step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pdomain=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-cookie-domain","detectSteps":false} */}# Keep the cookie for one domain1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pdomain/signed-in). The server sets the `sessions_pdomain` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} */}2. Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.{/* step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pdomain/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} */}4. Load the `localhost` cookie from `sessions_pdomain.txt`.{/* step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pdomain=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pdomain=signed-in"} */}{/* test end */}
= Keep the cookie for one domain// (test {"testId":"sessions-cookie-domain","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_pdomain/signed-in[the sign-in page]. The server sets the `sessions_pdomain` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}). Save the `localhost` cookie named `sessions_pdomain` to `sessions_pdomain.txt`.+// (step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pdomain/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}). Load the `localhost` cookie from `sessions_pdomain.txt`.+// (step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pdomain=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pdomain=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep the cookie for one domain</title></head><body><!-- test {"testId":"sessions-cookie-domain","detectSteps":false} --><h1>Keep the cookie for one domain</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in">the sign-in page</a>. The server sets the <code>sessions_pdomain</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"} --></li><li>Save the <code>localhost</code> cookie named <code>sessions_pdomain</code> to <code>sessions_pdomain.txt</code>.<!-- step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"} --></li><li>Load the <code>localhost</code> cookie from <code>sessions_pdomain.txt</code>.<!-- step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pdomain=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pdomain=signed-in"} --></li></ol><!-- test end --></body></html>
Keep the cookie for one domain==============================.. test {"testId":"sessions-cookie-domain","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pdomain/signed-in>`__. The server sets the ``sessions_pdomain`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}#. Save the ``localhost`` cookie named ``sessions_pdomain`` to ``sessions_pdomain.txt``... step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pdomain/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}#. Load the ``localhost`` cookie from ``sessions_pdomain.txt``... step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pdomain=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pdomain=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-domain"><title>Keep the cookie for one domain</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-domain","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pdomain</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-in"}'/></info></step><step><cmd>Save the <codeph>localhost</codeph> cookie named <codeph>sessions_pdomain</codeph> to <codeph>sessions_pdomain.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pdomain/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pdomain/signed-out"}'/></info></step><step><cmd>Load the <codeph>localhost</codeph> cookie from <codeph>sessions_pdomain.txt</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pdomain","path":"sessions_pdomain.txt","domain":"localhost"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pdomain=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pdomain=signed-in"}'/></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": "sessions-cookie-domain","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_pdomain/signed-in"},{"saveCookie": {"name": "sessions_pdomain","path": "sessions_pdomain.txt","domain": "localhost","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_pdomain/signed-out"},{"loadCookie": {"name": "sessions_pdomain","path": "sessions_pdomain.txt","domain": "localhost"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pdomain=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookie-domainsteps:- goTo: http://localhost:8092/cookies/set/sessions_pdomain/signed-in- saveCookie:name: sessions_pdomainpath: sessions_pdomain.txtdomain: localhostoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_pdomain/signed-out- loadCookie:name: sessions_pdomainpath: sessions_pdomain.txtdomain: localhost- goTo: http://localhost:8092/cookies- find: sessions_pdomain=signed-in
"variable": "SESSIONS_PVAR"
Varies: saveCookie.variable and loadCookie.variable · Value: "SESSIONS_PVAR" · Effect: the cookie goes to an environment variable whose name differs from the cookie’s.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.4. Load the cookie from `SESSIONS_PVAR`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.
# Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.4. Load the cookie from `SESSIONS_PVAR`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.
= Keep a cookie in a named variable. Sign in at http://localhost:8092/cookies/set/sessions_pvar/signed-in[the sign-in page]. The server sets the `sessions_pvar` cookie.. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.. Sign out at http://localhost:8092/cookies/set/sessions_pvar/signed-out[the sign-out page], which replaces the cookie.. Load the cookie from `SESSIONS_PVAR`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pvar=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a named variable</title></head><body><h1>Keep a cookie in a named variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-in">the sign-in page</a>. The server sets the <code>sessions_pvar</code> cookie.</li><li>Save the <code>sessions_pvar</code> cookie to the <code>SESSIONS_PVAR</code> environment variable.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the cookie from <code>SESSIONS_PVAR</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pvar=signed-in</strong>.</li></ol></body></html>
Keep a cookie in a named variable=================================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pvar/signed-in>`__. The server sets the ``sessions_pvar`` cookie.#. Save the ``sessions_pvar`` cookie to the ``SESSIONS_PVAR`` environment variable.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pvar/signed-out>`__, which replaces the cookie.#. Load the cookie from ``SESSIONS_PVAR``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pvar=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-variable"><title>Keep a cookie in a named variable</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pvar</codeph> cookie.</cmd></step><step><cmd>Save the <codeph>sessions_pvar</codeph> cookie to the <codeph>SESSIONS_PVAR</codeph> environment variable.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the cookie from <codeph>SESSIONS_PVAR</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pvar=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-variable","detectSteps":true} --># Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} -->2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.<!-- step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} -->4. Load the cookie from `SESSIONS_PVAR`.<!-- step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-cookie-variable","detectSteps":true} */}# Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} */}2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.{/* step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} */}4. Load the cookie from `SESSIONS_PVAR`.{/* step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.{/* test end */}
= Keep a cookie in a named variable// (test {"testId":"sessions-cookie-variable","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_pvar/signed-in[the sign-in page]. The server sets the `sessions_pvar` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}). Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.+// (step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}). Sign out at http://localhost:8092/cookies/set/sessions_pvar/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}). Load the cookie from `SESSIONS_PVAR`.+// (step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pvar=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a named variable</title></head><body><!-- test {"testId":"sessions-cookie-variable","detectSteps":true} --><h1>Keep a cookie in a named variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-in">the sign-in page</a>. The server sets the <code>sessions_pvar</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} --></li><li>Save the <code>sessions_pvar</code> cookie to the <code>SESSIONS_PVAR</code> environment variable.<!-- step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} --></li><li>Load the cookie from <code>SESSIONS_PVAR</code>.<!-- step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pvar=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep a cookie in a named variable=================================.. test {"testId":"sessions-cookie-variable","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pvar/signed-in>`__. The server sets the ``sessions_pvar`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}#. Save the ``sessions_pvar`` cookie to the ``SESSIONS_PVAR`` environment variable... step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pvar/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}#. Load the cookie from ``SESSIONS_PVAR``... step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pvar=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-variable"><title>Keep a cookie in a named variable</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-variable","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pvar</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_pvar</codeph> cookie to the <codeph>SESSIONS_PVAR</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>SESSIONS_PVAR</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pvar=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-cookie-variable","detectSteps":false} --># Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} -->2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.<!-- step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} -->4. Load the cookie from `SESSIONS_PVAR`.<!-- step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pvar=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-cookie-variable","detectSteps":false} */}# Keep a cookie in a named variable1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pvar/signed-in). The server sets the `sessions_pvar` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} */}2. Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.{/* step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pvar/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} */}4. Load the cookie from `SESSIONS_PVAR`.{/* step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pvar=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pvar=signed-in"} */}{/* test end */}
= Keep a cookie in a named variable// (test {"testId":"sessions-cookie-variable","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_pvar/signed-in[the sign-in page]. The server sets the `sessions_pvar` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}). Save the `sessions_pvar` cookie to the `SESSIONS_PVAR` environment variable.+// (step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}). Sign out at http://localhost:8092/cookies/set/sessions_pvar/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}). Load the cookie from `SESSIONS_PVAR`.+// (step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pvar=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pvar=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep a cookie in a named variable</title></head><body><!-- test {"testId":"sessions-cookie-variable","detectSteps":false} --><h1>Keep a cookie in a named variable</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-in">the sign-in page</a>. The server sets the <code>sessions_pvar</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"} --></li><li>Save the <code>sessions_pvar</code> cookie to the <code>SESSIONS_PVAR</code> environment variable.<!-- step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pvar/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"} --></li><li>Load the cookie from <code>SESSIONS_PVAR</code>.<!-- step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pvar=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pvar=signed-in"} --></li></ol><!-- test end --></body></html>
Keep a cookie in a named variable=================================.. test {"testId":"sessions-cookie-variable","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pvar/signed-in>`__. The server sets the ``sessions_pvar`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}#. Save the ``sessions_pvar`` cookie to the ``SESSIONS_PVAR`` environment variable... step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pvar/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}#. Load the cookie from ``SESSIONS_PVAR``... step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pvar=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pvar=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-cookie-variable"><title>Keep a cookie in a named variable</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-cookie-variable","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pvar</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-in"}'/></info></step><step><cmd>Save the <codeph>sessions_pvar</codeph> cookie to the <codeph>SESSIONS_PVAR</codeph> environment variable.</cmd><info><data name="doc-detective" value='step {"saveCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pvar/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pvar/signed-out"}'/></info></step><step><cmd>Load the cookie from <codeph>SESSIONS_PVAR</codeph>.</cmd><info><data name="doc-detective" value='step {"loadCookie":{"name":"sessions_pvar","variable":"SESSIONS_PVAR"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pvar=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pvar=signed-in"}'/></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": "sessions-cookie-variable","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_pvar/signed-in"},{"saveCookie": {"name": "sessions_pvar","variable": "SESSIONS_PVAR"}},{"goTo": "http://localhost:8092/cookies/set/sessions_pvar/signed-out"},{"loadCookie": {"name": "sessions_pvar","variable": "SESSIONS_PVAR"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pvar=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-cookie-variablesteps:- goTo: http://localhost:8092/cookies/set/sessions_pvar/signed-in- saveCookie:name: sessions_pvarvariable: SESSIONS_PVAR- goTo: http://localhost:8092/cookies/set/sessions_pvar/signed-out- loadCookie:name: sessions_pvarvariable: SESSIONS_PVAR- goTo: http://localhost:8092/cookies- find: sessions_pvar=signed-in
saveState and loadState permutations
"saveState": "<file>.json"
Varies: saveState and loadState · Value: "sessions-pstate.json" · Effect: the string form saves to and loads from outputDir, and the save never overwrites a file that exists.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.3. Save the browser state to `sessions-pstate.json`.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.5. Load the browser state from `sessions-pstate.json`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.
# Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.3. Save the browser state to `sessions-pstate.json`.4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.5. Load the browser state from `sessions-pstate.json`.6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.
= Keep the browser state in a file. Delete any `sessions-pstate.json` that an earlier run left in the output folder.. Sign in at http://localhost:8092/cookies/set/sessions_pstate/signed-in[the sign-in page]. The server sets the `sessions_pstate` cookie.. Save the browser state to `sessions-pstate.json`.. Sign out at http://localhost:8092/cookies/set/sessions_pstate/signed-out[the sign-out page], which replaces the cookie.. Load the browser state from `sessions-pstate.json`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstate=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Keep the browser state in a file</title></head><body><h1>Keep the browser state in a file</h1><ol><li>Delete any <code>sessions-pstate.json</code> that an earlier run left in the output folder.</li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstate</code> cookie.</li><li>Save the browser state to <code>sessions-pstate.json</code>.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the browser state from <code>sessions-pstate.json</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstate=signed-in</strong>.</li></ol></body></html>
Keep the browser state in a file================================#. Delete any ``sessions-pstate.json`` that an earlier run left in the output folder.#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstate/signed-in>`__. The server sets the ``sessions_pstate`` cookie.#. Save the browser state to ``sessions-pstate.json``.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstate/signed-out>`__, which replaces the cookie.#. Load the browser state from ``sessions-pstate.json``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstate=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-form-string"><title>Keep the browser state in a file</title><taskbody><steps><step><cmd>Delete any <codeph>sessions-pstate.json</codeph> that an earlier run left in the output folder.</cmd></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstate</codeph> cookie.</cmd></step><step><cmd>Save the browser state to <codeph>sessions-pstate.json</codeph>.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the browser state from <codeph>sessions-pstate.json</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstate=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state-form-string","detectSteps":true} --># Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} -->2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} -->3. Save the browser state to `sessions-pstate.json`.<!-- step {"saveState":"sessions-pstate.json"} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} -->5. Load the browser state from `sessions-pstate.json`.<!-- step {"loadState":"sessions-pstate.json"} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-state-form-string","detectSteps":true} */}# Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.{/* step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} */}2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} */}3. Save the browser state to `sessions-pstate.json`.{/* step {"saveState":"sessions-pstate.json"} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} */}5. Load the browser state from `sessions-pstate.json`.{/* step {"loadState":"sessions-pstate.json"} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.{/* test end */}
= Keep the browser state in a file// (test {"testId":"sessions-state-form-string","detectSteps":true}). Delete any `sessions-pstate.json` that an earlier run left in the output folder.+// (step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}). Sign in at http://localhost:8092/cookies/set/sessions_pstate/signed-in[the sign-in page]. The server sets the `sessions_pstate` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}). Save the browser state to `sessions-pstate.json`.+// (step {"saveState":"sessions-pstate.json"}). Sign out at http://localhost:8092/cookies/set/sessions_pstate/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}). Load the browser state from `sessions-pstate.json`.+// (step {"loadState":"sessions-pstate.json"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstate=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep the browser state in a file</title></head><body><!-- test {"testId":"sessions-state-form-string","detectSteps":true} --><h1>Keep the browser state in a file</h1><ol><li>Delete any <code>sessions-pstate.json</code> that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} --></li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstate</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} --></li><li>Save the browser state to <code>sessions-pstate.json</code>.<!-- step {"saveState":"sessions-pstate.json"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} --></li><li>Load the browser state from <code>sessions-pstate.json</code>.<!-- step {"loadState":"sessions-pstate.json"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstate=signed-in</strong>.</li></ol><!-- test end --></body></html>
Keep the browser state in a file================================.. test {"testId":"sessions-state-form-string","detectSteps":true}#. Delete any ``sessions-pstate.json`` that an earlier run left in the output folder... step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstate/signed-in>`__. The server sets the ``sessions_pstate`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}#. Save the browser state to ``sessions-pstate.json``... step {"saveState":"sessions-pstate.json"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstate/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}#. Load the browser state from ``sessions-pstate.json``... step {"loadState":"sessions-pstate.json"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstate=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-form-string"><title>Keep the browser state in a file</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-state-form-string","detectSteps":true}'/><steps><step><cmd>Delete any <codeph>sessions-pstate.json</codeph> that an earlier run left in the output folder.</cmd><info><data name="doc-detective" value='step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}'/></info></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstate</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-pstate.json</codeph>.</cmd><info><data name="doc-detective" value='step {"saveState":"sessions-pstate.json"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}'/></info></step><step><cmd>Load the browser state from <codeph>sessions-pstate.json</codeph>.</cmd><info><data name="doc-detective" value='step {"loadState":"sessions-pstate.json"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstate=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state-form-string","detectSteps":false} --># Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} -->2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} -->3. Save the browser state to `sessions-pstate.json`.<!-- step {"saveState":"sessions-pstate.json"} -->4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} -->5. Load the browser state from `sessions-pstate.json`.<!-- step {"loadState":"sessions-pstate.json"} -->6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pstate=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-state-form-string","detectSteps":false} */}# Keep the browser state in a file1. Delete any `sessions-pstate.json` that an earlier run left in the output folder.{/* step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} */}2. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstate/signed-in). The server sets the `sessions_pstate` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} */}3. Save the browser state to `sessions-pstate.json`.{/* step {"saveState":"sessions-pstate.json"} */}4. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstate/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} */}5. Load the browser state from `sessions-pstate.json`.{/* step {"loadState":"sessions-pstate.json"} */}6. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstate=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pstate=signed-in"} */}{/* test end */}
= Keep the browser state in a file// (test {"testId":"sessions-state-form-string","detectSteps":false}). Delete any `sessions-pstate.json` that an earlier run left in the output folder.+// (step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}). Sign in at http://localhost:8092/cookies/set/sessions_pstate/signed-in[the sign-in page]. The server sets the `sessions_pstate` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}). Save the browser state to `sessions-pstate.json`.+// (step {"saveState":"sessions-pstate.json"}). Sign out at http://localhost:8092/cookies/set/sessions_pstate/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}). Load the browser state from `sessions-pstate.json`.+// (step {"loadState":"sessions-pstate.json"}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstate=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pstate=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Keep the browser state in a file</title></head><body><!-- test {"testId":"sessions-state-form-string","detectSteps":false} --><h1>Keep the browser state in a file</h1><ol><li>Delete any <code>sessions-pstate.json</code> that an earlier run left in the output folder.<!-- step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""} --></li><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstate</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"} --></li><li>Save the browser state to <code>sessions-pstate.json</code>.<!-- step {"saveState":"sessions-pstate.json"} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstate/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"} --></li><li>Load the browser state from <code>sessions-pstate.json</code>.<!-- step {"loadState":"sessions-pstate.json"} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstate=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pstate=signed-in"} --></li></ol><!-- test end --></body></html>
Keep the browser state in a file================================.. test {"testId":"sessions-state-form-string","detectSteps":false}#. Delete any ``sessions-pstate.json`` that an earlier run left in the output folder... step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstate/signed-in>`__. The server sets the ``sessions_pstate`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}#. Save the browser state to ``sessions-pstate.json``... step {"saveState":"sessions-pstate.json"}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstate/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}#. Load the browser state from ``sessions-pstate.json``... step {"loadState":"sessions-pstate.json"}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstate=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pstate=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-form-string"><title>Keep the browser state in a file</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-state-form-string","detectSteps":false}'/><steps><step><cmd>Delete any <codeph>sessions-pstate.json</codeph> that an earlier run left in the output folder.</cmd><info><data name="doc-detective" value='step {"runShell":"node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""}'/></info></step><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstate</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-pstate.json</codeph>.</cmd><info><data name="doc-detective" value='step {"saveState":"sessions-pstate.json"}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstate/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstate/signed-out"}'/></info></step><step><cmd>Load the browser state from <codeph>sessions-pstate.json</codeph>.</cmd><info><data name="doc-detective" value='step {"loadState":"sessions-pstate.json"}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstate=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pstate=signed-in"}'/></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": "sessions-state-form-string","steps": [{"runShell": "node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""},{"goTo": "http://localhost:8092/cookies/set/sessions_pstate/signed-in"},{"saveState": "sessions-pstate.json"},{"goTo": "http://localhost:8092/cookies/set/sessions_pstate/signed-out"},{"loadState": "sessions-pstate.json"},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pstate=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-state-form-stringsteps:- runShell: "node -e \"require('fs').rmSync('docs/docs-as-tests/examples/.dd-output/sessions-pstate.json', { force: true })\""- goTo: http://localhost:8092/cookies/set/sessions_pstate/signed-in- saveState: sessions-pstate.json- goTo: http://localhost:8092/cookies/set/sessions_pstate/signed-out- loadState: sessions-pstate.json- goTo: http://localhost:8092/cookies- find: sessions_pstate=signed-in
"overwrite": true
Varies: saveState.overwrite · Value: true · Effect: the object form with overwrite replaces an earlier file, so the test can run again into the same outputDir.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.4. Load the browser state from `sessions-pstateo.json`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.
# Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.4. Load the browser state from `sessions-pstateo.json`.5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.
= Replace a saved browser state. Sign in at http://localhost:8092/cookies/set/sessions_pstateo/signed-in[the sign-in page]. The server sets the `sessions_pstateo` cookie.. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.. Sign out at http://localhost:8092/cookies/set/sessions_pstateo/signed-out[the sign-out page], which replaces the cookie.. Load the browser state from `sessions-pstateo.json`.. Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstateo=signed-in*.
<!DOCTYPE html><html lang="en"><head><title>Replace a saved browser state</title></head><body><h1>Replace a saved browser state</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstateo</code> cookie.</li><li>Save the browser state to <code>sessions-pstateo.json</code>, replacing any earlier file.</li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out">the sign-out page</a>, which replaces the cookie.</li><li>Load the browser state from <code>sessions-pstateo.json</code>.</li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstateo=signed-in</strong>.</li></ol></body></html>
Replace a saved browser state=============================#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstateo/signed-in>`__. The server sets the ``sessions_pstateo`` cookie.#. Save the browser state to ``sessions-pstateo.json``, replacing any earlier file.#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstateo/signed-out>`__, which replaces the cookie.#. Load the browser state from ``sessions-pstateo.json``.#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstateo=signed-in**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-overwrite-true"><title>Replace a saved browser state</title><taskbody><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstateo</codeph> cookie.</cmd></step><step><cmd>Save the browser state to <codeph>sessions-pstateo.json</codeph>, replacing any earlier file.</cmd></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd></step><step><cmd>Load the browser state from <codeph>sessions-pstateo.json</codeph>.</cmd></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstateo=signed-in</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state-overwrite-true","detectSteps":true} --># Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} -->2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.<!-- step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} -->4. Load the browser state from `sessions-pstateo.json`.<!-- step {"loadState":{"path":"sessions-pstateo.json"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.<!-- test end -->
{/* test {"testId":"sessions-state-overwrite-true","detectSteps":true} */}# Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} */}2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.{/* step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} */}4. Load the browser state from `sessions-pstateo.json`.{/* step {"loadState":{"path":"sessions-pstateo.json"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.{/* test end */}
= Replace a saved browser state// (test {"testId":"sessions-state-overwrite-true","detectSteps":true}). Sign in at http://localhost:8092/cookies/set/sessions_pstateo/signed-in[the sign-in page]. The server sets the `sessions_pstateo` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}). Save the browser state to `sessions-pstateo.json`, replacing any earlier file.+// (step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pstateo/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}). Load the browser state from `sessions-pstateo.json`.+// (step {"loadState":{"path":"sessions-pstateo.json"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstateo=signed-in*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Replace a saved browser state</title></head><body><!-- test {"testId":"sessions-state-overwrite-true","detectSteps":true} --><h1>Replace a saved browser state</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstateo</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} --></li><li>Save the browser state to <code>sessions-pstateo.json</code>, replacing any earlier file.<!-- step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} --></li><li>Load the browser state from <code>sessions-pstateo.json</code>.<!-- step {"loadState":{"path":"sessions-pstateo.json"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstateo=signed-in</strong>.</li></ol><!-- test end --></body></html>
Replace a saved browser state=============================.. test {"testId":"sessions-state-overwrite-true","detectSteps":true}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstateo/signed-in>`__. The server sets the ``sessions_pstateo`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}#. Save the browser state to ``sessions-pstateo.json``, replacing any earlier file... step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstateo/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}#. Load the browser state from ``sessions-pstateo.json``... step {"loadState":{"path":"sessions-pstateo.json"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstateo=signed-in**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-overwrite-true"><title>Replace a saved browser state</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-state-overwrite-true","detectSteps":true}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstateo</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-pstateo.json</codeph>, replacing any earlier file.</cmd><info><data name="doc-detective" value='step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}'/></info></step><step><cmd>Load the browser state from <codeph>sessions-pstateo.json</codeph>.</cmd><info><data name="doc-detective" value='step {"loadState":{"path":"sessions-pstateo.json"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstateo=signed-in</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-state-overwrite-true","detectSteps":false} --># Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} -->2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.<!-- step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} -->3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} -->4. Load the browser state from `sessions-pstateo.json`.<!-- step {"loadState":{"path":"sessions-pstateo.json"}} -->5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pstateo=signed-in"} --><!-- test end -->
{/* test {"testId":"sessions-state-overwrite-true","detectSteps":false} */}# Replace a saved browser state1. Sign in at [the sign-in page](http://localhost:8092/cookies/set/sessions_pstateo/signed-in). The server sets the `sessions_pstateo` cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} */}2. Save the browser state to `sessions-pstateo.json`, replacing any earlier file.{/* step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} */}3. Sign out at [the sign-out page](http://localhost:8092/cookies/set/sessions_pstateo/signed-out), which replaces the cookie.{/* step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} */}4. Load the browser state from `sessions-pstateo.json`.{/* step {"loadState":{"path":"sessions-pstateo.json"}} */}5. Open [the cookie report](http://localhost:8092/cookies), and check that it shows **sessions_pstateo=signed-in**.{/* step {"goTo":"http://localhost:8092/cookies"} */}{/* step {"find":"sessions_pstateo=signed-in"} */}{/* test end */}
= Replace a saved browser state// (test {"testId":"sessions-state-overwrite-true","detectSteps":false}). Sign in at http://localhost:8092/cookies/set/sessions_pstateo/signed-in[the sign-in page]. The server sets the `sessions_pstateo` cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}). Save the browser state to `sessions-pstateo.json`, replacing any earlier file.+// (step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}). Sign out at http://localhost:8092/cookies/set/sessions_pstateo/signed-out[the sign-out page], which replaces the cookie.+// (step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}). Load the browser state from `sessions-pstateo.json`.+// (step {"loadState":{"path":"sessions-pstateo.json"}}). Open http://localhost:8092/cookies[the cookie report], and check that it shows *sessions_pstateo=signed-in*.+// (step {"goTo":"http://localhost:8092/cookies"})+// (step {"find":"sessions_pstateo=signed-in"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Replace a saved browser state</title></head><body><!-- test {"testId":"sessions-state-overwrite-true","detectSteps":false} --><h1>Replace a saved browser state</h1><ol><li>Sign in at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in">the sign-in page</a>. The server sets the <code>sessions_pstateo</code> cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"} --></li><li>Save the browser state to <code>sessions-pstateo.json</code>, replacing any earlier file.<!-- step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}} --></li><li>Sign out at <a href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out">the sign-out page</a>, which replaces the cookie.<!-- step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"} --></li><li>Load the browser state from <code>sessions-pstateo.json</code>.<!-- step {"loadState":{"path":"sessions-pstateo.json"}} --></li><li>Open <a href="http://localhost:8092/cookies">the cookie report</a>, and check that it shows <strong>sessions_pstateo=signed-in</strong>.<!-- step {"goTo":"http://localhost:8092/cookies"} --><!-- step {"find":"sessions_pstateo=signed-in"} --></li></ol><!-- test end --></body></html>
Replace a saved browser state=============================.. test {"testId":"sessions-state-overwrite-true","detectSteps":false}#. Sign in at `the sign-in page <http://localhost:8092/cookies/set/sessions_pstateo/signed-in>`__. The server sets the ``sessions_pstateo`` cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}#. Save the browser state to ``sessions-pstateo.json``, replacing any earlier file... step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}#. Sign out at `the sign-out page <http://localhost:8092/cookies/set/sessions_pstateo/signed-out>`__, which replaces the cookie... step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}#. Load the browser state from ``sessions-pstateo.json``... step {"loadState":{"path":"sessions-pstateo.json"}}#. Open `the cookie report <http://localhost:8092/cookies>`__, and check that it shows **sessions_pstateo=signed-in**... step {"goTo":"http://localhost:8092/cookies"}.. step {"find":"sessions_pstateo=signed-in"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-state-overwrite-true"><title>Replace a saved browser state</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-state-overwrite-true","detectSteps":false}'/><steps><step><cmd>Sign in at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-in" scope="external" format="html">the sign-in page</xref>. The server sets the <codeph>sessions_pstateo</codeph> cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-in"}'/></info></step><step><cmd>Save the browser state to <codeph>sessions-pstateo.json</codeph>, replacing any earlier file.</cmd><info><data name="doc-detective" value='step {"saveState":{"path":"sessions-pstateo.json","overwrite":true}}'/></info></step><step><cmd>Sign out at <xref href="http://localhost:8092/cookies/set/sessions_pstateo/signed-out" scope="external" format="html">the sign-out page</xref>, which replaces the cookie.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies/set/sessions_pstateo/signed-out"}'/></info></step><step><cmd>Load the browser state from <codeph>sessions-pstateo.json</codeph>.</cmd><info><data name="doc-detective" value='step {"loadState":{"path":"sessions-pstateo.json"}}'/></info></step><step><cmd>Open <xref href="http://localhost:8092/cookies" scope="external" format="html">the cookie report</xref>, and check that it shows <b>sessions_pstateo=signed-in</b>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/cookies"}'/><data name="doc-detective" value='step {"find":"sessions_pstateo=signed-in"}'/></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": "sessions-state-overwrite-true","steps": [{"goTo": "http://localhost:8092/cookies/set/sessions_pstateo/signed-in"},{"saveState": {"path": "sessions-pstateo.json","overwrite": true}},{"goTo": "http://localhost:8092/cookies/set/sessions_pstateo/signed-out"},{"loadState": {"path": "sessions-pstateo.json"}},{"goTo": "http://localhost:8092/cookies"},{"find": "sessions_pstateo=signed-in"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-state-overwrite-truesteps:- goTo: http://localhost:8092/cookies/set/sessions_pstateo/signed-in- saveState:path: sessions-pstateo.jsonoverwrite: true- goTo: http://localhost:8092/cookies/set/sessions_pstateo/signed-out- loadState:path: sessions-pstateo.json- goTo: http://localhost:8092/cookies- find: sessions_pstateo=signed-in
runOn platforms permutations
"platforms": "windows"
Varies: runOn[].platforms · Value: "windows" · Effect: the test runs on Windows and reports SKIPPED on every other platform.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page on Windows. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page on Windows</title></head><body><h1>Check the page on Windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page on Windows=========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-windows"><title>Check the page on Windows</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} --># Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} */}# Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page on Windows// (test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Windows</title></head><body><!-- test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]} --><h1>Check the page on Windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page on Windows=========================.. test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-windows"><title>Check the page on Windows</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-platforms-windows","detectSteps":true,"runOn":[{"platforms":"windows"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} --># Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} */}# Check the page on Windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page on Windows// (test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Windows</title></head><body><!-- test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]} --><h1>Check the page on Windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page on Windows=========================.. test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-windows"><title>Check the page on Windows</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-platforms-windows","detectSteps":false,"runOn":[{"platforms":"windows"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-platforms-windows","runOn": [{"platforms": "windows"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-platforms-windowsrunOn:- platforms: windowssteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
"platforms": ["linux", "mac"]
Varies: runOn[].platforms · Value: ["linux", "mac"] · Effect: an array runs the test on each listed platform the host matches, and skips the rest.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page on Linux and macOS. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page on Linux and macOS</title></head><body><h1>Check the page on Linux and macOS</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page on Linux and macOS=================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-array"><title>Check the page on Linux and macOS</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]} --># Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]} */}# Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page on Linux and macOS// (test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Linux and macOS</title></head><body><!-- test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]} --><h1>Check the page on Linux and macOS</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page on Linux and macOS=================================.. test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-array"><title>Check the page on Linux and macOS</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-platforms-array","detectSteps":true,"runOn":[{"platforms":["linux","mac"]}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]} --># Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]} */}# Check the page on Linux and macOS1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page on Linux and macOS// (test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Linux and macOS</title></head><body><!-- test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]} --><h1>Check the page on Linux and macOS</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page on Linux and macOS=================================.. test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-platforms-array"><title>Check the page on Linux and macOS</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-platforms-array","detectSteps":false,"runOn":[{"platforms":["linux","mac"]}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-platforms-array","runOn": [{"platforms": ["linux","mac"]}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-platforms-arrayrunOn:- platforms:- linux- macsteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
runOn browsers permutations
"browsers": "firefox"
Varies: runOn[].browsers · Value: "firefox" · Effect: a browser name runs the test in that browser, headless by default.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page in Firefox. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page in Firefox=========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-string"><title>Check the page in Firefox</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-string"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-string","detectSteps":true,"runOn":[{"browsers":"firefox"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-string"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-string","detectSteps":false,"runOn":[{"browsers":"firefox"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-browsers-string","runOn": [{"browsers": "firefox"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-browsers-stringrunOn:- browsers: firefoxsteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
"browsers": ["firefox", "chrome"]
Varies: runOn[].browsers · Value: ["firefox", "chrome"] · Effect: an array runs the whole test once per browser.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page in Firefox and Chrome. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox and Chrome</title></head><body><h1>Check the page in Firefox and Chrome</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page in Firefox and Chrome====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-array"><title>Check the page in Firefox and Chrome</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]} --># Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]} */}# Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page in Firefox and Chrome// (test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox and Chrome</title></head><body><!-- test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]} --><h1>Check the page in Firefox and Chrome</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page in Firefox and Chrome====================================.. test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-array"><title>Check the page in Firefox and Chrome</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-array","detectSteps":true,"runOn":[{"browsers":["firefox","chrome"]}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]} --># Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]} */}# Check the page in Firefox and Chrome1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page in Firefox and Chrome// (test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox and Chrome</title></head><body><!-- test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]} --><h1>Check the page in Firefox and Chrome</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page in Firefox and Chrome====================================.. test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-array"><title>Check the page in Firefox and Chrome</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-array","detectSteps":false,"runOn":[{"browsers":["firefox","chrome"]}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-browsers-array","runOn": [{"browsers": ["firefox","chrome"]}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-browsers-arrayrunOn:- browsers:- firefox- chromesteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
"headless": false
Varies: runOn[].browsers.headless · Value: false · Effect: the browser opens a visible window, so the context runs only where there’s a display, here Windows and macOS.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Watch the check in a visible Chrome window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Watch the check in a visible Chrome window</title></head><body><h1>Watch the check in a visible Chrome window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Watch the check in a visible Chrome window==========================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-headed"><title>Watch the check in a visible Chrome window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --># Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} */}# Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Watch the check in a visible Chrome window// (test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Watch the check in a visible Chrome window</title></head><body><!-- test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --><h1>Watch the check in a visible Chrome window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Watch the check in a visible Chrome window==========================================.. test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-headed"><title>Watch the check in a visible Chrome window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-headed","detectSteps":true,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --># Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} */}# Watch the check in a visible Chrome window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Watch the check in a visible Chrome window// (test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Watch the check in a visible Chrome window</title></head><body><!-- test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]} --><h1>Watch the check in a visible Chrome window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Watch the check in a visible Chrome window==========================================.. test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-browsers-headed"><title>Watch the check in a visible Chrome window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-browsers-headed","detectSteps":false,"runOn":[{"platforms":["windows","mac"],"browsers":{"name":"chrome","headless":false}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-browsers-headed","runOn": [{"platforms": ["windows","mac"],"browsers": {"name": "chrome","headless": false}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-browsers-headedrunOn:- platforms:- windows- macbrowsers:name: chromeheadless: falsesteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
runOn browser option permutations
"colorScheme": "dark"
Varies: runOn[].browsers.colorScheme · Value: "dark" · Effect: the page’s prefers-color-scheme media query matches dark.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page prefers the dark color scheme.
# Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page prefers the dark color scheme.
= Check the page in dark mode. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page prefers the dark color scheme.
<!DOCTYPE html><html lang="en"><head><title>Check the page in dark mode</title></head><body><h1>Check the page in dark mode</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page prefers the dark color scheme.</li></ol></body></html>
Check the page in dark mode===========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page prefers the dark color scheme.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-colorscheme"><title>Check the page in dark mode</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page prefers the dark color scheme.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} --># Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page prefers the dark color scheme.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} */}# Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page prefers the dark color scheme.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} */}{/* test end */}
= Check the page in dark mode// (test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page prefers the dark color scheme.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in dark mode</title></head><body><!-- test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} --><h1>Check the page in dark mode</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page prefers the dark color scheme.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --></li></ol><!-- test end --></body></html>
Check the page in dark mode===========================.. test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page prefers the dark color scheme... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-colorscheme"><title>Check the page in dark mode</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-colorscheme","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page prefers the dark color scheme.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} --># Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page prefers the dark color scheme.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} */}# Check the page in dark mode1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page prefers the dark color scheme.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} */}{/* test end */}
= Check the page in dark mode// (test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page prefers the dark color scheme.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in dark mode</title></head><body><!-- test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]} --><h1>Check the page in dark mode</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page prefers the dark color scheme.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}} --></li></ol><!-- test end --></body></html>
Check the page in dark mode===========================.. test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page prefers the dark color scheme... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-colorscheme"><title>Check the page in dark mode</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-colorscheme","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"colorScheme":"dark"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page prefers the dark color scheme.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output":"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": "sessions-runon-colorscheme","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"colorScheme": "dark"}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return String(matchMedia(\"(prefers-color-scheme: dark)\").matches);","output": "true"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-colorschemerunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truecolorScheme: darksteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: 'return String(matchMedia("(prefers-color-scheme: dark)").matches);'output: "true"
"locale": "de-DE"
Varies: runOn[].browsers.locale · Value: "de-DE" · Effect: navigator.language and Intl formatting use German.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's language is `de-DE`.
# Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's language is `de-DE`.
= Check the page in German. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page's language is `de-DE`.
<!DOCTYPE html><html lang="en"><head><title>Check the page in German</title></head><body><h1>Check the page in German</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page's language is <code>de-DE</code>.</li></ol></body></html>
Check the page in German========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page's language is ``de-DE``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-locale"><title>Check the page in German</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} --># Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's language is `de-DE`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} */}# Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's language is `de-DE`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} */}{/* test end */}
= Check the page in German// (test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's language is `de-DE`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in German</title></head><body><!-- test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} --><h1>Check the page in German</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's language is <code>de-DE</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --></li></ol><!-- test end --></body></html>
Check the page in German========================.. test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's language is ``de-DE``... step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-locale"><title>Check the page in German</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-locale","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} --># Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's language is `de-DE`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} */}# Check the page in German1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's language is `de-DE`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} */}{/* test end */}
= Check the page in German// (test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's language is `de-DE`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in German</title></head><body><!-- test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]} --><h1>Check the page in German</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's language is <code>de-DE</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}} --></li></ol><!-- test end --></body></html>
Check the page in German========================.. test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's language is ``de-DE``... step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-locale"><title>Check the page in German</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-locale","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"de-DE"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's language is <codeph>de-DE</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"de-DE"}}'/></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": "sessions-runon-locale","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"locale": "de-DE"}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return navigator.language;","output": "de-DE"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-localerunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truelocale: de-DEsteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return navigator.language;output: de-DE
"timezone": "Europe/Berlin"
Varies: runOn[].browsers.timezone · Value: "Europe/Berlin" · Effect: Date and Intl use Berlin time.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's time zone is `Europe/Berlin`.
# Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's time zone is `Europe/Berlin`.
= Check the page on Berlin time. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page's time zone is `Europe/Berlin`.
<!DOCTYPE html><html lang="en"><head><title>Check the page on Berlin time</title></head><body><h1>Check the page on Berlin time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page's time zone is <code>Europe/Berlin</code>.</li></ol></body></html>
Check the page on Berlin time=============================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page's time zone is ``Europe/Berlin``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-timezone"><title>Check the page on Berlin time</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page's time zone is <codeph>Europe/Berlin</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} --># Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's time zone is `Europe/Berlin`.<!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} */}# Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's time zone is `Europe/Berlin`.{/* step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} */}{/* test end */}
= Check the page on Berlin time// (test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's time zone is `Europe/Berlin`.+// (step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Berlin time</title></head><body><!-- test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} --><h1>Check the page on Berlin time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's time zone is <code>Europe/Berlin</code>.<!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --></li></ol><!-- test end --></body></html>
Check the page on Berlin time=============================.. test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's time zone is ``Europe/Berlin``... step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-timezone"><title>Check the page on Berlin time</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-timezone","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's time zone is <codeph>Europe/Berlin</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} --># Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's time zone is `Europe/Berlin`.<!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} */}# Check the page on Berlin time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's time zone is `Europe/Berlin`.{/* step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} */}{/* test end */}
= Check the page on Berlin time// (test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's time zone is `Europe/Berlin`.+// (step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on Berlin time</title></head><body><!-- test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]} --><h1>Check the page on Berlin time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's time zone is <code>Europe/Berlin</code>.<!-- step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}} --></li></ol><!-- test end --></body></html>
Check the page on Berlin time=============================.. test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's time zone is ``Europe/Berlin``... step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-timezone"><title>Check the page on Berlin time</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-timezone","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"timezone":"Europe/Berlin"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's time zone is <codeph>Europe/Berlin</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return Intl.DateTimeFormat().resolvedOptions().timeZone;","output":"Europe/Berlin"}}'/></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": "sessions-runon-timezone","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"timezone": "Europe/Berlin"}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return Intl.DateTimeFormat().resolvedOptions().timeZone;","output": "Europe/Berlin"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-timezonerunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truetimezone: Europe/Berlinsteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return Intl.DateTimeFormat().resolvedOptions().timeZone;output: Europe/Berlin
"deviceScaleFactor": 2
Varies: runOn[].browsers.deviceScaleFactor · Value: 2 · Effect: devicePixelRatio is 2, as on a high-density display.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the device pixel ratio is `2`.
# Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the device pixel ratio is `2`.
= Check the page on a 2x display. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the device pixel ratio is `2`.
<!DOCTYPE html><html lang="en"><head><title>Check the page on a 2x display</title></head><body><h1>Check the page on a 2x display</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the device pixel ratio is <code>2</code>.</li></ol></body></html>
Check the page on a 2x display==============================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the device pixel ratio is ``2``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor"><title>Check the page on a 2x display</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} --># Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the device pixel ratio is `2`.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} */}# Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the device pixel ratio is `2`.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} */}{/* test end */}
= Check the page on a 2x display// (test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the device pixel ratio is `2`.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on a 2x display</title></head><body><!-- test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} --><h1>Check the page on a 2x display</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the device pixel ratio is <code>2</code>.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --></li></ol><!-- test end --></body></html>
Check the page on a 2x display==============================.. test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the device pixel ratio is ``2``... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor"><title>Check the page on a 2x display</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-devicescalefactor","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} --># Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the device pixel ratio is `2`.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} */}# Check the page on a 2x display1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the device pixel ratio is `2`.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} */}{/* test end */}
= Check the page on a 2x display// (test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the device pixel ratio is `2`.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page on a 2x display</title></head><body><!-- test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]} --><h1>Check the page on a 2x display</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the device pixel ratio is <code>2</code>.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}} --></li></ol><!-- test end --></body></html>
Check the page on a 2x display==============================.. test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the device pixel ratio is ``2``... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"2"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor"><title>Check the page on a 2x display</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-devicescalefactor","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":2}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the device pixel ratio is <codeph>2</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"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": "sessions-runon-devicescalefactor","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"deviceScaleFactor": 2}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return String(devicePixelRatio);","output": "2"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-devicescalefactorrunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truedeviceScaleFactor: 2steps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return String(devicePixelRatio);output: "2"
"reducedMotion": "reduce"
Varies: runOn[].browsers.reducedMotion · Value: "reduce" · Effect: the page’s prefers-reduced-motion media query matches reduce.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page prefers reduced motion.
# Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page prefers reduced motion.
= Check the page with reduced motion. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page prefers reduced motion.
<!DOCTYPE html><html lang="en"><head><title>Check the page with reduced motion</title></head><body><h1>Check the page with reduced motion</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page prefers reduced motion.</li></ol></body></html>
Check the page with reduced motion==================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page prefers reduced motion.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-reducedmotion"><title>Check the page with reduced motion</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page prefers reduced motion.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} --># Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page prefers reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} */}# Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page prefers reduced motion.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} */}{/* test end */}
= Check the page with reduced motion// (test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page prefers reduced motion.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page with reduced motion</title></head><body><!-- test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} --><h1>Check the page with reduced motion</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page prefers reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --></li></ol><!-- test end --></body></html>
Check the page with reduced motion==================================.. test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page prefers reduced motion... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-reducedmotion"><title>Check the page with reduced motion</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-reducedmotion","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page prefers reduced motion.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} --># Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page prefers reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} */}# Check the page with reduced motion1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page prefers reduced motion.{/* step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} */}{/* test end */}
= Check the page with reduced motion// (test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page prefers reduced motion.+// (step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page with reduced motion</title></head><body><!-- test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]} --><h1>Check the page with reduced motion</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page prefers reduced motion.<!-- step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}} --></li></ol><!-- test end --></body></html>
Check the page with reduced motion==================================.. test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page prefers reduced motion... step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"true"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-reducedmotion"><title>Check the page with reduced motion</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-reducedmotion","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"reducedMotion":"reduce"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page prefers reduced motion.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output":"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": "sessions-runon-reducedmotion","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"reducedMotion": "reduce"}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return String(matchMedia(\"(prefers-reduced-motion: reduce)\").matches);","output": "true"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-reducedmotionrunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truereducedMotion: reducesteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: 'return String(matchMedia("(prefers-reduced-motion: reduce)").matches);'output: "true"
"clock": "2026-12-03T09:00:00Z"
Varies: runOn[].browsers.clock · Value: "2026-12-03T09:00:00Z" · Effect: Date.now() and new Date() stay at that instant.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's clock reads 3 December 2026, 09:00 UTC.
# Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's clock reads 3 December 2026, 09:00 UTC.
= Check the page at a fixed time. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page's clock reads 3 December 2026, 09:00 UTC.
<!DOCTYPE html><html lang="en"><head><title>Check the page at a fixed time</title></head><body><h1>Check the page at a fixed time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page's clock reads 3 December 2026, 09:00 UTC.</li></ol></body></html>
Check the page at a fixed time==============================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page's clock reads 3 December 2026, 09:00 UTC.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-clock"><title>Check the page at a fixed time</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page's clock reads 3 December 2026, 09:00 UTC.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} --># Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's clock reads 3 December 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} */}# Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's clock reads 3 December 2026, 09:00 UTC.{/* step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} */}{/* test end */}
= Check the page at a fixed time// (test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's clock reads 3 December 2026, 09:00 UTC.+// (step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page at a fixed time</title></head><body><!-- test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} --><h1>Check the page at a fixed time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's clock reads 3 December 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --></li></ol><!-- test end --></body></html>
Check the page at a fixed time==============================.. test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's clock reads 3 December 2026, 09:00 UTC... step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-clock"><title>Check the page at a fixed time</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-clock","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's clock reads 3 December 2026, 09:00 UTC.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} --># Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's clock reads 3 December 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} */}# Check the page at a fixed time1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's clock reads 3 December 2026, 09:00 UTC.{/* step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} */}{/* test end */}
= Check the page at a fixed time// (test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's clock reads 3 December 2026, 09:00 UTC.+// (step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page at a fixed time</title></head><body><!-- test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]} --><h1>Check the page at a fixed time</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's clock reads 3 December 2026, 09:00 UTC.<!-- step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}} --></li></ol><!-- test end --></body></html>
Check the page at a fixed time==============================.. test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's clock reads 3 December 2026, 09:00 UTC... step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-clock"><title>Check the page at a fixed time</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-clock","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"clock":"2026-12-03T09:00:00Z"}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's clock reads 3 December 2026, 09:00 UTC.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return new Date().toISOString();","output":"/^2026-12-03T09:00/"}}'/></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": "sessions-runon-clock","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"clock": "2026-12-03T09:00:00Z"}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return new Date().toISOString();","output": "/^2026-12-03T09:00/"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-clockrunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: trueclock: 2026-12-03T09:00:00Zsteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return new Date().toISOString();output: /^2026-12-03T09:00/
runOn matrix permutations
"matrix": { "locale": ["en-US", "de-DE"] }
Varies: runOn[].matrix · Value: { "locale": ["en-US", "de-DE"] } · Effect: runs the test once per locale. $$matrix.locale in the browser’s locale and in the step’s output becomes the value under test.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's language is the locale under test, `en-US` or `de-DE`.
# Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page's language is the locale under test, `en-US` or `de-DE`.
= Check the page in two languages. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page's language is the locale under test, `en-US` or `de-DE`.
<!DOCTYPE html><html lang="en"><head><title>Check the page in two languages</title></head><body><h1>Check the page in two languages</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page's language is the locale under test, <code>en-US</code> or <code>de-DE</code>.</li></ol></body></html>
Check the page in two languages===============================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page's language is the locale under test, ``en-US`` or ``de-DE``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-matrix"><title>Check the page in two languages</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page's language is the locale under test, <codeph>en-US</codeph> or <codeph>de-DE</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} --># Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's language is the locale under test, `en-US` or `de-DE`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} */}# Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's language is the locale under test, `en-US` or `de-DE`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} */}{/* test end */}
= Check the page in two languages// (test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's language is the locale under test, `en-US` or `de-DE`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in two languages</title></head><body><!-- test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} --><h1>Check the page in two languages</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's language is the locale under test, <code>en-US</code> or <code>de-DE</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} --></li></ol><!-- test end --></body></html>
Check the page in two languages===============================.. test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's language is the locale under test, ``en-US`` or ``de-DE``... step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-matrix"><title>Check the page in two languages</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's language is the locale under test, <codeph>en-US</codeph> or <codeph>de-DE</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} --># Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page's language is the locale under test, `en-US` or `de-DE`.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} */}# Check the page in two languages1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page's language is the locale under test, `en-US` or `de-DE`.{/* step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} */}{/* test end */}
= Check the page in two languages// (test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page's language is the locale under test, `en-US` or `de-DE`.+// (step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in two languages</title></head><body><!-- test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]} --><h1>Check the page in two languages</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page's language is the locale under test, <code>en-US</code> or <code>de-DE</code>.<!-- step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}} --></li></ol><!-- test end --></body></html>
Check the page in two languages===============================.. test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page's language is the locale under test, ``en-US`` or ``de-DE``... step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-matrix"><title>Check the page in two languages</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"locale":"$$matrix.locale"},"matrix":{"locale":["en-US","de-DE"]}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page's language is the locale under test, <codeph>en-US</codeph> or <codeph>de-DE</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return navigator.language;","output":"$$matrix.locale"}}'/></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": "sessions-runon-matrix","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"locale": "$$matrix.locale"},"matrix": {"locale": ["en-US","de-DE"]}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return navigator.language;","output": "$$matrix.locale"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-matrixrunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truelocale: $$matrix.localematrix:locale:- en-US- de-DEsteps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return navigator.language;output: $$matrix.locale
"deviceScaleFactor": "$$matrix.dpr"
Varies: runOn[].browsers.deviceScaleFactor · Value: "$$matrix.dpr", with "matrix": { "dpr": [1, 2] } · Effect: runs the test once per value, and devicePixelRatio is 1, then 2.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the device pixel ratio is the density under test, `1` or `2`.
# Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the device pixel ratio is the density under test, `1` or `2`.
= Check the page at two pixel densities. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the device pixel ratio is the density under test, `1` or `2`.
<!DOCTYPE html><html lang="en"><head><title>Check the page at two pixel densities</title></head><body><h1>Check the page at two pixel densities</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the device pixel ratio is the density under test, <code>1</code> or <code>2</code>.</li></ol></body></html>
Check the page at two pixel densities=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the device pixel ratio is the density under test, ``1`` or ``2``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor-matrix"><title>Check the page at two pixel densities</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the device pixel ratio is the density under test, <codeph>1</codeph> or <codeph>2</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} --># Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the device pixel ratio is the density under test, `1` or `2`.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} */}# Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the device pixel ratio is the density under test, `1` or `2`.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} */}{/* test end */}
= Check the page at two pixel densities// (test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the device pixel ratio is the density under test, `1` or `2`.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page at two pixel densities</title></head><body><!-- test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} --><h1>Check the page at two pixel densities</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the device pixel ratio is the density under test, <code>1</code> or <code>2</code>.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} --></li></ol><!-- test end --></body></html>
Check the page at two pixel densities=====================================.. test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the device pixel ratio is the density under test, ``1`` or ``2``... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor-matrix"><title>Check the page at two pixel densities</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the device pixel ratio is the density under test, <codeph>1</codeph> or <codeph>2</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} --># Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the device pixel ratio is the density under test, `1` or `2`.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} --><!-- test end -->
{/* test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} */}# Check the page at two pixel densities1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the device pixel ratio is the density under test, `1` or `2`.{/* step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} */}{/* test end */}
= Check the page at two pixel densities// (test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the device pixel ratio is the density under test, `1` or `2`.+// (step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page at two pixel densities</title></head><body><!-- test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]} --><h1>Check the page at two pixel densities</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the device pixel ratio is the density under test, <code>1</code> or <code>2</code>.<!-- step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}} --></li></ol><!-- test end --></body></html>
Check the page at two pixel densities=====================================.. test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the device pixel ratio is the density under test, ``1`` or ``2``... step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-devicescalefactor-matrix"><title>Check the page at two pixel densities</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-devicescalefactor-matrix","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"browsers":{"name":"chrome","headless":true,"deviceScaleFactor":"$$matrix.dpr"},"matrix":{"dpr":[1,2]}}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the device pixel ratio is the density under test, <codeph>1</codeph> or <codeph>2</codeph>.</cmd><info><data name="doc-detective" value='step {"runBrowserScript":{"script":"return String(devicePixelRatio);","output":"/^$$matrix.dpr$/"}}'/></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": "sessions-runon-devicescalefactor-matrix","runOn": [{"platforms": ["linux","mac","windows"],"browsers": {"name": "chrome","headless": true,"deviceScaleFactor": "$$matrix.dpr"},"matrix": {"dpr": [1,2]}}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"runBrowserScript": {"script": "return String(devicePixelRatio);","output": "/^$$matrix.dpr$/"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-devicescalefactor-matrixrunOn:- platforms:- linux- mac- windowsbrowsers:name: chromeheadless: truedeviceScaleFactor: $$matrix.dprmatrix:dpr:- 1- 2steps:- goTo: http://localhost:8092/multi-tab.html- runBrowserScript:script: return String(devicePixelRatio);output: /^$$matrix.dpr$/
runOn requires permutations
"requires": "node"
Varies: runOn[].requires · Value: "node" · Effect: a command name must be on PATH, or the context is SKIPPED.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check Node.js, if it's installed1. Run `node --version`.
# Check Node.js, if it's installed1. Run `node --version`.
= Check Node.js, if it's installed. Run `node --version`.
<!DOCTYPE html><html lang="en"><head><title>Check Node.js, if it's installed</title></head><body><h1>Check Node.js, if it's installed</h1><ol><li>Run <code>node --version</code>.</li></ol></body></html>
Check Node.js, if it's installed================================#. Run ``node --version``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-string"><title>Check Node.js, if it's installed</title><taskbody><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Check Node.js, if it's installed1. Run `node --version`.<!-- step {"runShell":"node --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Check Node.js, if it's installed1. Run `node --version`.{/* step {"runShell":"node --version"} */}{/* test end */}
= Check Node.js, if it's installed// (test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Run `node --version`.+// (step {"runShell":"node --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check Node.js, if it's installed</title></head><body><!-- test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Check Node.js, if it's installed</h1><ol><li>Run <code>node --version</code>.<!-- step {"runShell":"node --version"} --></li></ol><!-- test end --></body></html>
Check Node.js, if it's installed================================.. test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Run ``node --version``... step {"runShell":"node --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-string"><title>Check Node.js, if it's installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-string","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"node --version"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Check Node.js, if it's installed1. Run `node --version`.<!-- step {"runShell":"node --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Check Node.js, if it's installed1. Run `node --version`.{/* step {"runShell":"node --version"} */}{/* test end */}
= Check Node.js, if it's installed// (test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Run `node --version`.+// (step {"runShell":"node --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check Node.js, if it's installed</title></head><body><!-- test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Check Node.js, if it's installed</h1><ol><li>Run <code>node --version</code>.<!-- step {"runShell":"node --version"} --></li></ol><!-- test end --></body></html>
Check Node.js, if it's installed================================.. test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Run ``node --version``... step {"runShell":"node --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-string"><title>Check Node.js, if it's installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-string","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"node --version"}'/></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": "sessions-runon-requires-string","runOn": [{"platforms": ["linux","mac","windows"],"requires": "node"}],"steps": [{"runShell": "node --version"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-requires-stringrunOn:- platforms:- linux- mac- windowsrequires: nodesteps:- runShell: node --version
"requires": ["node", "npm"]
Varies: runOn[].requires · Value: ["node", "npm"] · Effect: every command in the array must be on PATH.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check Node.js and npm, if both are installed1. Run `node --version`.2. Run `npm --version`.
# Check Node.js and npm, if both are installed1. Run `node --version`.2. Run `npm --version`.
= Check Node.js and npm, if both are installed. Run `node --version`.. Run `npm --version`.
<!DOCTYPE html><html lang="en"><head><title>Check Node.js and npm, if both are installed</title></head><body><h1>Check Node.js and npm, if both are installed</h1><ol><li>Run <code>node --version</code>.</li><li>Run <code>npm --version</code>.</li></ol></body></html>
Check Node.js and npm, if both are installed============================================#. Run ``node --version``.#. Run ``npm --version``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-array"><title>Check Node.js and npm, if both are installed</title><taskbody><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd></step><step><cmd>Run <codeph>npm --version</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --># Check Node.js and npm, if both are installed1. Run `node --version`.<!-- step {"runShell":"node --version"} -->2. Run `npm --version`.<!-- step {"runShell":"npm --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} */}# Check Node.js and npm, if both are installed1. Run `node --version`.{/* step {"runShell":"node --version"} */}2. Run `npm --version`.{/* step {"runShell":"npm --version"} */}{/* test end */}
= Check Node.js and npm, if both are installed// (test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}). Run `node --version`.+// (step {"runShell":"node --version"}). Run `npm --version`.+// (step {"runShell":"npm --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check Node.js and npm, if both are installed</title></head><body><!-- test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --><h1>Check Node.js and npm, if both are installed</h1><ol><li>Run <code>node --version</code>.<!-- step {"runShell":"node --version"} --></li><li>Run <code>npm --version</code>.<!-- step {"runShell":"npm --version"} --></li></ol><!-- test end --></body></html>
Check Node.js and npm, if both are installed============================================.. test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}#. Run ``node --version``... step {"runShell":"node --version"}#. Run ``npm --version``... step {"runShell":"npm --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-array"><title>Check Node.js and npm, if both are installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}'/><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"node --version"}'/></info></step><step><cmd>Run <codeph>npm --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"npm --version"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --># Check Node.js and npm, if both are installed1. Run `node --version`.<!-- step {"runShell":"node --version"} -->2. Run `npm --version`.<!-- step {"runShell":"npm --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} */}# Check Node.js and npm, if both are installed1. Run `node --version`.{/* step {"runShell":"node --version"} */}2. Run `npm --version`.{/* step {"runShell":"npm --version"} */}{/* test end */}
= Check Node.js and npm, if both are installed// (test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}). Run `node --version`.+// (step {"runShell":"node --version"}). Run `npm --version`.+// (step {"runShell":"npm --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check Node.js and npm, if both are installed</title></head><body><!-- test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]} --><h1>Check Node.js and npm, if both are installed</h1><ol><li>Run <code>node --version</code>.<!-- step {"runShell":"node --version"} --></li><li>Run <code>npm --version</code>.<!-- step {"runShell":"npm --version"} --></li></ol><!-- test end --></body></html>
Check Node.js and npm, if both are installed============================================.. test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}#. Run ``node --version``... step {"runShell":"node --version"}#. Run ``npm --version``... step {"runShell":"npm --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-array"><title>Check Node.js and npm, if both are installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":["node","npm"]}]}'/><steps><step><cmd>Run <codeph>node --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"node --version"}'/></info></step><step><cmd>Run <codeph>npm --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"npm --version"}'/></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": "sessions-runon-requires-array","runOn": [{"platforms": ["linux","mac","windows"],"requires": ["node","npm"]}],"steps": [{"runShell": "node --version"},{"runShell": "npm --version"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-requires-arrayrunOn:- platforms:- linux- mac- windowsrequires:- node- npmsteps:- runShell: node --version- runShell: npm --version
"requires": { "commands": [...], "env": [...] }, unmet
Varies: runOn[].requires · Value: { "commands": ["sessions-missing-tool"], "env": ["PATH"] } · Effect: an object checks commands, files, and environment variables together, and one unmet entry skips the context instead of failing it.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Run a tool only where it's installed1. Run `sessions-missing-tool --version`.
# Run a tool only where it's installed1. Run `sessions-missing-tool --version`.
= Run a tool only where it's installed. Run `sessions-missing-tool --version`.
<!DOCTYPE html><html lang="en"><head><title>Run a tool only where it's installed</title></head><body><h1>Run a tool only where it's installed</h1><ol><li>Run <code>sessions-missing-tool --version</code>.</li></ol></body></html>
Run a tool only where it's installed====================================#. Run ``sessions-missing-tool --version``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-unmet"><title>Run a tool only where it's installed</title><taskbody><steps><step><cmd>Run <codeph>sessions-missing-tool --version</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} --># Run a tool only where it's installed1. Run `sessions-missing-tool --version`.<!-- step {"runShell":"sessions-missing-tool --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} */}# Run a tool only where it's installed1. Run `sessions-missing-tool --version`.{/* step {"runShell":"sessions-missing-tool --version"} */}{/* test end */}
= Run a tool only where it's installed// (test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}). Run `sessions-missing-tool --version`.+// (step {"runShell":"sessions-missing-tool --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Run a tool only where it's installed</title></head><body><!-- test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} --><h1>Run a tool only where it's installed</h1><ol><li>Run <code>sessions-missing-tool --version</code>.<!-- step {"runShell":"sessions-missing-tool --version"} --></li></ol><!-- test end --></body></html>
Run a tool only where it's installed====================================.. test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}#. Run ``sessions-missing-tool --version``... step {"runShell":"sessions-missing-tool --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-unmet"><title>Run a tool only where it's installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-unmet","detectSteps":true,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}'/><steps><step><cmd>Run <codeph>sessions-missing-tool --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"sessions-missing-tool --version"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} --># Run a tool only where it's installed1. Run `sessions-missing-tool --version`.<!-- step {"runShell":"sessions-missing-tool --version"} --><!-- test end -->
{/* test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} */}# Run a tool only where it's installed1. Run `sessions-missing-tool --version`.{/* step {"runShell":"sessions-missing-tool --version"} */}{/* test end */}
= Run a tool only where it's installed// (test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}). Run `sessions-missing-tool --version`.+// (step {"runShell":"sessions-missing-tool --version"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Run a tool only where it's installed</title></head><body><!-- test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]} --><h1>Run a tool only where it's installed</h1><ol><li>Run <code>sessions-missing-tool --version</code>.<!-- step {"runShell":"sessions-missing-tool --version"} --></li></ol><!-- test end --></body></html>
Run a tool only where it's installed====================================.. test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}#. Run ``sessions-missing-tool --version``... step {"runShell":"sessions-missing-tool --version"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-requires-unmet"><title>Run a tool only where it's installed</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-requires-unmet","detectSteps":false,"runOn":[{"platforms":["linux","mac"],"requires":{"commands":["sessions-missing-tool"],"env":["PATH"]}}]}'/><steps><step><cmd>Run <codeph>sessions-missing-tool --version</codeph>.</cmd><info><data name="doc-detective" value='step {"runShell":"sessions-missing-tool --version"}'/></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": "sessions-runon-requires-unmet","runOn": [{"platforms": ["linux","mac"],"requires": {"commands": ["sessions-missing-tool"],"env": ["PATH"]}}],"steps": [{"runShell": "sessions-missing-tool --version"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-requires-unmetrunOn:- platforms:- linux- macrequires:commands:- sessions-missing-toolenv:- PATHsteps:- runShell: sessions-missing-tool --version
runOn browserFallback and retries permutations
"browserFallback": "auto"
Varies: runOn[].browserFallback · Value: "auto" · Effect: without a working Firefox, the context runs in another available browser and reports WARNING instead of PASS.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page in Firefox. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page in Firefox=========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-auto"><title>Check the page in Firefox</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-auto"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-auto","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-auto"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-auto","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"auto"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-fallback-auto","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "auto"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-fallback-autorunOn:- browsers:name: firefoxheadless: truebrowserFallback: autosteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
"browserFallback": "explicit" with "retries": 0
Varies: runOn[].browserFallback and runOn[].retries · Value: "explicit", 0 · Effect: without a working Firefox, the context is SKIPPED, because the test names Firefox. retries: 0 also turns off re-runs after a broken session.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page in Firefox. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page in Firefox=========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-explicit"><title>Check the page in Firefox</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-explicit"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-explicit","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-explicit"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-explicit","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"explicit","retries":0}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-fallback-explicit","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "explicit","retries": 0}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-fallback-explicitrunOn:- browsers:name: firefoxheadless: truebrowserFallback: explicitretries: 0steps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
"browserFallback": "off"
Varies: runOn[].browserFallback · Value: "off" · Effect: the context never falls back to another browser, and is SKIPPED without a working Firefox.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Check that the page reads **MULTI-TAB HOME**.
= Check the page in Firefox. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Check that the page reads *MULTI-TAB HOME*.
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol></body></html>
Check the page in Firefox=========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Check that the page reads **MULTI-TAB HOME**.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-off"><title>Check the page in Firefox</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- test end -->
{/* test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.</li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-off"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-off","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Check that the page reads **MULTI-TAB HOME**.<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check the page in Firefox1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Check that the page reads **MULTI-TAB HOME**.{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Check the page in Firefox// (test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Check that the page reads *MULTI-TAB HOME*.+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check the page in Firefox</title></head><body><!-- test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check the page in Firefox</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Check that the page reads <strong>MULTI-TAB HOME</strong>.<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Check the page in Firefox=========================.. test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Check that the page reads **MULTI-TAB HOME**... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-runon-fallback-off"><title>Check the page in Firefox</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-runon-fallback-off","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads <b>MULTI-TAB HOME</b>.</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-runon-fallback-off","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-runon-fallback-offrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- find: MULTI-TAB HOME
goTo newTab and newWindow permutations
"newTab": true, "newWindow": true
Varies: goTo.newTab and goTo.newWindow · Value: true · Effect: each opens an unnamed tab or window and makes it active.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.3. Check that the page reads "PAGE tab".4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.5. Check that the page reads "PAGE window".
# Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.3. Check that the page reads "PAGE tab".4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.5. Check that the page reads "PAGE window".
= Open pages in a new tab and a new window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=tab[the tab page] in a new tab.. Check that the page reads "PAGE tab".. Load http://localhost:8092/multi-tab-child.html?page=window[the window page] in a new window.. Check that the page reads "PAGE window".
<!DOCTYPE html><html lang="en"><head><title>Open pages in a new tab and a new window</title></head><body><h1>Open pages in a new tab and a new window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=tab">the tab page</a> in a new tab.</li><li>Check that the page reads "PAGE tab".</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=window">the window page</a> in a new window.</li><li>Check that the page reads "PAGE window".</li></ol></body></html>
Open pages in a new tab and a new window========================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the tab page <http://localhost:8092/multi-tab-child.html?page=tab>`__ in a new tab.#. Check that the page reads "PAGE tab".#. Load `the window page <http://localhost:8092/multi-tab-child.html?page=window>`__ in a new window.#. Check that the page reads "PAGE window".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-boolean"><title>Open pages in a new tab and a new window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=tab" scope="external" format="html">the tab page</xref> in a new tab.</cmd></step><step><cmd>Check that the page reads "PAGE tab".</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=window" scope="external" format="html">the window page</xref> in a new window.</cmd></step><step><cmd>Check that the page reads "PAGE window".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-boolean","detectSteps":true} --># Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} -->3. Check that the page reads "PAGE tab".<!-- step {"find":"PAGE tab"} -->4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} -->5. Check that the page reads "PAGE window".<!-- step {"find":"PAGE window"} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-boolean","detectSteps":true} */}# Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} */}3. Check that the page reads "PAGE tab".{/* step {"find":"PAGE tab"} */}4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} */}5. Check that the page reads "PAGE window".{/* step {"find":"PAGE window"} */}{/* test end */}
= Open pages in a new tab and a new window// (test {"testId":"sessions-goto-new-boolean","detectSteps":true}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=tab[the tab page] in a new tab.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}). Check that the page reads "PAGE tab".+// (step {"find":"PAGE tab"}). Load http://localhost:8092/multi-tab-child.html?page=window[the window page] in a new window.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}). Check that the page reads "PAGE window".+// (step {"find":"PAGE window"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open pages in a new tab and a new window</title></head><body><!-- test {"testId":"sessions-goto-new-boolean","detectSteps":true} --><h1>Open pages in a new tab and a new window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=tab">the tab page</a> in a new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} --></li><li>Check that the page reads "PAGE tab".<!-- step {"find":"PAGE tab"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=window">the window page</a> in a new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} --></li><li>Check that the page reads "PAGE window".<!-- step {"find":"PAGE window"} --></li></ol><!-- test end --></body></html>
Open pages in a new tab and a new window========================================.. test {"testId":"sessions-goto-new-boolean","detectSteps":true}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the tab page <http://localhost:8092/multi-tab-child.html?page=tab>`__ in a new tab... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}#. Check that the page reads "PAGE tab"... step {"find":"PAGE tab"}#. Load `the window page <http://localhost:8092/multi-tab-child.html?page=window>`__ in a new window... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}#. Check that the page reads "PAGE window"... step {"find":"PAGE window"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-boolean"><title>Open pages in a new tab and a new window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-boolean","detectSteps":true}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=tab" scope="external" format="html">the tab page</xref> in a new tab.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}'/></info></step><step><cmd>Check that the page reads "PAGE tab".</cmd><info><data name="doc-detective" value='step {"find":"PAGE tab"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=window" scope="external" format="html">the window page</xref> in a new window.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}'/></info></step><step><cmd>Check that the page reads "PAGE window".</cmd><info><data name="doc-detective" value='step {"find":"PAGE window"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-boolean","detectSteps":false} --># Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} -->3. Check that the page reads "PAGE tab".<!-- step {"find":"PAGE tab"} -->4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} -->5. Check that the page reads "PAGE window".<!-- step {"find":"PAGE window"} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-boolean","detectSteps":false} */}# Open pages in a new tab and a new window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the tab page](http://localhost:8092/multi-tab-child.html?page=tab) in a new tab.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} */}3. Check that the page reads "PAGE tab".{/* step {"find":"PAGE tab"} */}4. Load [the window page](http://localhost:8092/multi-tab-child.html?page=window) in a new window.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} */}5. Check that the page reads "PAGE window".{/* step {"find":"PAGE window"} */}{/* test end */}
= Open pages in a new tab and a new window// (test {"testId":"sessions-goto-new-boolean","detectSteps":false}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=tab[the tab page] in a new tab.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}). Check that the page reads "PAGE tab".+// (step {"find":"PAGE tab"}). Load http://localhost:8092/multi-tab-child.html?page=window[the window page] in a new window.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}). Check that the page reads "PAGE window".+// (step {"find":"PAGE window"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open pages in a new tab and a new window</title></head><body><!-- test {"testId":"sessions-goto-new-boolean","detectSteps":false} --><h1>Open pages in a new tab and a new window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=tab">the tab page</a> in a new tab.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}} --></li><li>Check that the page reads "PAGE tab".<!-- step {"find":"PAGE tab"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=window">the window page</a> in a new window.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}} --></li><li>Check that the page reads "PAGE window".<!-- step {"find":"PAGE window"} --></li></ol><!-- test end --></body></html>
Open pages in a new tab and a new window========================================.. test {"testId":"sessions-goto-new-boolean","detectSteps":false}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the tab page <http://localhost:8092/multi-tab-child.html?page=tab>`__ in a new tab... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}#. Check that the page reads "PAGE tab"... step {"find":"PAGE tab"}#. Load `the window page <http://localhost:8092/multi-tab-child.html?page=window>`__ in a new window... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}#. Check that the page reads "PAGE window"... step {"find":"PAGE window"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-boolean"><title>Open pages in a new tab and a new window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-boolean","detectSteps":false}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=tab" scope="external" format="html">the tab page</xref> in a new tab.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=tab","newTab":true}}'/></info></step><step><cmd>Check that the page reads "PAGE tab".</cmd><info><data name="doc-detective" value='step {"find":"PAGE tab"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=window" scope="external" format="html">the window page</xref> in a new window.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=window","newWindow":true}}'/></info></step><step><cmd>Check that the page reads "PAGE window".</cmd><info><data name="doc-detective" value='step {"find":"PAGE window"}'/></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": "sessions-goto-new-boolean","steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=tab","newTab": true}},{"find": "PAGE tab"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=window","newWindow": true}},{"find": "PAGE window"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-goto-new-booleansteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=tabnewTab: true- find: PAGE tab- goTo:url: http://localhost:8092/multi-tab-child.html?page=windownewWindow: true- find: PAGE window
"newTab": "notes", "newWindow": "about"
Varies: goTo.newTab and goTo.newWindow · Value: "notes", "about" · Effect: a string names the new tab or window, so later steps can select it by that name.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.3. Check that the `notes` tab reads "PAGE notes".4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.5. Check that the new window reads "PAGE about".
# Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.3. Check that the `notes` tab reads "PAGE notes".4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.5. Check that the new window reads "PAGE about".
= Open named tabs and windows. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`.. Check that the `notes` tab reads "PAGE notes".. Load http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`.. Check that the new window reads "PAGE about".
<!DOCTYPE html><html lang="en"><head><title>Open named tabs and windows</title></head><body><h1>Open named tabs and windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>.</li><li>Check that the <code>notes</code> tab reads "PAGE notes".</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>.</li><li>Check that the new window reads "PAGE about".</li></ol></body></html>
Open named tabs and windows===========================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``.#. Check that the ``notes`` tab reads "PAGE notes".#. Load `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``.#. Check that the new window reads "PAGE about".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-string"><title>Open named tabs and windows</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>.</cmd></step><step><cmd>Check that the <codeph>notes</codeph> tab reads "PAGE notes".</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>.</cmd></step><step><cmd>Check that the new window reads "PAGE about".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} -->3. Check that the `notes` tab reads "PAGE notes".<!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} -->4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} -->5. Check that the new window reads "PAGE about".<!-- step {"find":"PAGE about"} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} */}3. Check that the `notes` tab reads "PAGE notes".{/* step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} */}4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} */}5. Check that the new window reads "PAGE about".{/* step {"find":"PAGE about"} */}{/* test end */}
= Open named tabs and windows// (test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}). Check that the `notes` tab reads "PAGE notes".+// (step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}). Load http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}). Check that the new window reads "PAGE about".+// (step {"find":"PAGE about"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open named tabs and windows</title></head><body><!-- test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Open named tabs and windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --></li><li>Check that the <code>notes</code> tab reads "PAGE notes".<!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --></li><li>Check that the new window reads "PAGE about".<!-- step {"find":"PAGE about"} --></li></ol><!-- test end --></body></html>
Open named tabs and windows===========================.. test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}#. Check that the ``notes`` tab reads "PAGE notes"... step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}#. Load `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}#. Check that the new window reads "PAGE about"... step {"find":"PAGE about"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-string"><title>Open named tabs and windows</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}'/></info></step><step><cmd>Check that the <codeph>notes</codeph> tab reads "PAGE notes".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}'/></info></step><step><cmd>Check that the new window reads "PAGE about".</cmd><info><data name="doc-detective" value='step {"find":"PAGE about"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} -->3. Check that the `notes` tab reads "PAGE notes".<!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} -->4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} -->5. Check that the new window reads "PAGE about".<!-- step {"find":"PAGE about"} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Open named tabs and windows1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the notes page](http://localhost:8092/multi-tab-child.html?page=notes) in a new tab named `notes`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} */}3. Check that the `notes` tab reads "PAGE notes".{/* step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} */}4. Load [the about page](http://localhost:8092/multi-tab-child.html?page=about) in a new window named `about`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} */}5. Check that the new window reads "PAGE about".{/* step {"find":"PAGE about"} */}{/* test end */}
= Open named tabs and windows// (test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=notes[the notes page] in a new tab named `notes`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}). Check that the `notes` tab reads "PAGE notes".+// (step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}). Load http://localhost:8092/multi-tab-child.html?page=about[the about page] in a new window named `about`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}). Check that the new window reads "PAGE about".+// (step {"find":"PAGE about"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open named tabs and windows</title></head><body><!-- test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Open named tabs and windows</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=notes">the notes page</a> in a new tab named <code>notes</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}} --></li><li>Check that the <code>notes</code> tab reads "PAGE notes".<!-- step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=about">the about page</a> in a new window named <code>about</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}} --></li><li>Check that the new window reads "PAGE about".<!-- step {"find":"PAGE about"} --></li></ol><!-- test end --></body></html>
Open named tabs and windows===========================.. test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the notes page <http://localhost:8092/multi-tab-child.html?page=notes>`__ in a new tab named ``notes``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}#. Check that the ``notes`` tab reads "PAGE notes"... step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}#. Load `the about page <http://localhost:8092/multi-tab-child.html?page=about>`__ in a new window named ``about``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}#. Check that the new window reads "PAGE about"... step {"find":"PAGE about"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-string"><title>Open named tabs and windows</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=notes" scope="external" format="html">the notes page</xref> in a new tab named <codeph>notes</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=notes","newTab":"notes"}}'/></info></step><step><cmd>Check that the <codeph>notes</codeph> tab reads "PAGE notes".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE notes","surface":{"browser":"firefox","tab":"notes"}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=about" scope="external" format="html">the about page</xref> in a new window named <codeph>about</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=about","newWindow":"about"}}'/></info></step><step><cmd>Check that the new window reads "PAGE about".</cmd><info><data name="doc-detective" value='step {"find":"PAGE about"}'/></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": "sessions-goto-new-string","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=notes","newTab": "notes"}},{"find": {"elementText": "PAGE notes","surface": {"browser": "firefox","tab": "notes"}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=about","newWindow": "about"}},{"find": "PAGE about"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-goto-new-stringrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=notesnewTab: notes- find:elementText: PAGE notessurface:browser: firefoxtab: notes- goTo:url: http://localhost:8092/multi-tab-child.html?page=aboutnewWindow: about- find: PAGE about
"newTab": { "name" }, "newWindow": { "name", "tab" }
Varies: goTo.newTab and goTo.newWindow · Value: { "name": "report" }, { "name": "settings", "tab": "general" } · Effect: the object form names the tab, or names the window and its first tab.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.4. Check that the `general` tab of the `settings` window reads "PAGE settings".
# Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.4. Check that the `general` tab of the `settings` window reads "PAGE settings".
= Open a named window with a named tab. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=report[the report page] in a new tab named `report`.. Load http://localhost:8092/multi-tab-child.html?page=settings[the settings page] in a new window named `settings`, with its first tab named `general`.. Check that the `general` tab of the `settings` window reads "PAGE settings".
<!DOCTYPE html><html lang="en"><head><title>Open a named window with a named tab</title></head><body><h1>Open a named window with a named tab</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a> in a new tab named <code>report</code>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a> in a new window named <code>settings</code>, with its first tab named <code>general</code>.</li><li>Check that the <code>general</code> tab of the <code>settings</code> window reads "PAGE settings".</li></ol></body></html>
Open a named window with a named tab====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__ in a new tab named ``report``.#. Load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__ in a new window named ``settings``, with its first tab named ``general``.#. Check that the ``general`` tab of the ``settings`` window reads "PAGE settings".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-object"><title>Open a named window with a named tab</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref> in a new tab named <codeph>report</codeph>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref> in a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>.</cmd></step><step><cmd>Check that the <codeph>general</codeph> tab of the <codeph>settings</codeph> window reads "PAGE settings".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} -->3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} -->4. Check that the `general` tab of the `settings` window reads "PAGE settings".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} */}3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} */}4. Check that the `general` tab of the `settings` window reads "PAGE settings".{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} */}{/* test end */}
= Open a named window with a named tab// (test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=report[the report page] in a new tab named `report`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}). Load http://localhost:8092/multi-tab-child.html?page=settings[the settings page] in a new window named `settings`, with its first tab named `general`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}). Check that the `general` tab of the `settings` window reads "PAGE settings".+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a named window with a named tab</title></head><body><!-- test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Open a named window with a named tab</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a> in a new tab named <code>report</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a> in a new window named <code>settings</code>, with its first tab named <code>general</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --></li><li>Check that the <code>general</code> tab of the <code>settings</code> window reads "PAGE settings".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --></li></ol><!-- test end --></body></html>
Open a named window with a named tab====================================.. test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__ in a new tab named ``report``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}#. Load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__ in a new window named ``settings``, with its first tab named ``general``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}#. Check that the ``general`` tab of the ``settings`` window reads "PAGE settings"... step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-object"><title>Open a named window with a named tab</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-object","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref> in a new tab named <codeph>report</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref> in a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}'/></info></step><step><cmd>Check that the <codeph>general</codeph> tab of the <codeph>settings</codeph> window reads "PAGE settings".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} -->3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} -->4. Check that the `general` tab of the `settings` window reads "PAGE settings".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --><!-- test end -->
{/* test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Open a named window with a named tab1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the report page](http://localhost:8092/multi-tab-child.html?page=report) in a new tab named `report`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} */}3. Load [the settings page](http://localhost:8092/multi-tab-child.html?page=settings) in a new window named `settings`, with its first tab named `general`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} */}4. Check that the `general` tab of the `settings` window reads "PAGE settings".{/* step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} */}{/* test end */}
= Open a named window with a named tab// (test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=report[the report page] in a new tab named `report`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}). Load http://localhost:8092/multi-tab-child.html?page=settings[the settings page] in a new window named `settings`, with its first tab named `general`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}). Check that the `general` tab of the `settings` window reads "PAGE settings".+// (step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a named window with a named tab</title></head><body><!-- test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Open a named window with a named tab</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=report">the report page</a> in a new tab named <code>report</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=settings">the settings page</a> in a new window named <code>settings</code>, with its first tab named <code>general</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}} --></li><li>Check that the <code>general</code> tab of the <code>settings</code> window reads "PAGE settings".<!-- step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}} --></li></ol><!-- test end --></body></html>
Open a named window with a named tab====================================.. test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the report page <http://localhost:8092/multi-tab-child.html?page=report>`__ in a new tab named ``report``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}#. Load `the settings page <http://localhost:8092/multi-tab-child.html?page=settings>`__ in a new window named ``settings``, with its first tab named ``general``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}#. Check that the ``general`` tab of the ``settings`` window reads "PAGE settings"... step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-goto-new-object"><title>Open a named window with a named tab</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-goto-new-object","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=report" scope="external" format="html">the report page</xref> in a new tab named <codeph>report</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=report","newTab":{"name":"report"}}}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=settings" scope="external" format="html">the settings page</xref> in a new window named <codeph>settings</codeph>, with its first tab named <codeph>general</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=settings","newWindow":{"name":"settings","tab":"general"}}}'/></info></step><step><cmd>Check that the <codeph>general</codeph> tab of the <codeph>settings</codeph> window reads "PAGE settings".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE settings","surface":{"browser":"firefox","window":{"name":"settings"},"tab":{"name":"general"}}}}'/></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": "sessions-goto-new-object","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=report","newTab": {"name": "report"}}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=settings","newWindow": {"name": "settings","tab": "general"}}},{"find": {"elementText": "PAGE settings","surface": {"browser": "firefox","window": {"name": "settings"},"tab": {"name": "general"}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-goto-new-objectrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=reportnewTab:name: report- goTo:url: http://localhost:8092/multi-tab-child.html?page=settingsnewWindow:name: settingstab: general- find:elementText: PAGE settingssurface:browser: firefoxwindow:name: settingstab:name: general
Surface selector permutations
"tab": 0
Varies: surface.tab · Value: 0 · Effect: a number selects the tab at that position in creation order, and -1 selects the newest.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "MULTI-TAB HOME".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "MULTI-TAB HOME".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.. Check that the selected page reads "MULTI-TAB HOME".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.</li><li>Check that the selected page reads "MULTI-TAB HOME".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``.#. Check that the selected page reads "MULTI-TAB HOME".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-number"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-number"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-number"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":0}}}'/></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": "sessions-select-tab-number","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newTab": "second"}},{"find": {"elementText": "MULTI-TAB HOME","surface": {"browser": "firefox","tab": 0}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-tab-numberrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewTab: second- find:elementText: MULTI-TAB HOMEsurface:browser: firefoxtab: 0
"tab": "second"
Varies: surface.tab · Value: "second" · Effect: a string selects the tab with that name.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-string"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-string"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-string","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-string"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-string","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":"second"}}}'/></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": "sessions-select-tab-string","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newTab": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","tab": "second"}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-tab-stringrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewTab: second- find:elementText: PAGE secondsurface:browser: firefoxtab: second
"tab": { "index": -1 }
Varies: surface.tab.index · Value: -1 · Effect: the index key works like a number, so -1 selects the newest tab.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-index"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-index"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-index","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-index"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-index","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"index":-1}}}}'/></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": "sessions-select-tab-index","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newTab": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","tab": {"index": -1}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-tab-indexrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewTab: second- find:elementText: PAGE secondsurface:browser: firefoxtab:index: -1
"tab": { "title": "Multi-tab home" }
Varies: surface.tab.title · Value: "Multi-tab home" · Effect: the title key selects the tab whose title matches.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "MULTI-TAB HOME".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "MULTI-TAB HOME".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.. Check that the selected page reads "MULTI-TAB HOME".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.</li><li>Check that the selected page reads "MULTI-TAB HOME".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``.#. Check that the selected page reads "MULTI-TAB HOME".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-title"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-title"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "MULTI-TAB HOME".{/* step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "MULTI-TAB HOME".+// (step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "MULTI-TAB HOME".<!-- step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "MULTI-TAB HOME"... step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-title"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"MULTI-TAB HOME","surface":{"browser":"firefox","tab":{"title":"Multi-tab home"}}}}'/></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": "sessions-select-tab-title","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newTab": "second"}},{"find": {"elementText": "MULTI-TAB HOME","surface": {"browser": "firefox","tab": {"title": "Multi-tab home"}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-tab-titlerunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewTab: second- find:elementText: MULTI-TAB HOMEsurface:browser: firefoxtab:title: Multi-tab home
"tab": { "url": "…" }
Varies: surface.tab.url · Value: "http://localhost:8092/multi-tab-child.html?page=second" · Effect: the url key selects the tab whose URL matches.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-url"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-url"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-url","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new tab named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new tab named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new tab named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new tab named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-tab-url"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-tab-url","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new tab named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newTab":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","tab":{"url":"http://localhost:8092/multi-tab-child.html?page=second"}}}}'/></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": "sessions-select-tab-url","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newTab": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","tab": {"url": "http://localhost:8092/multi-tab-child.html?page=second"}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-tab-urlrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewTab: second- find:elementText: PAGE secondsurface:browser: firefoxtab:url: http://localhost:8092/multi-tab-child.html?page=second
"window": -1
Varies: surface.window · Value: -1 · Effect: a number selects the window at that position in creation order, and -1 selects the newest.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-number"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-number"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-number","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-number"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-number","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":-1}}}'/></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": "sessions-select-window-number","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newWindow": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","window": -1}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-window-numberrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewWindow: second- find:elementText: PAGE secondsurface:browser: firefoxwindow: -1
"window": { "name": "second" }
Varies: surface.window.name · Value: "second" · Effect: the name key, like a bare string, selects the window with that name.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-name"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-name"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-name","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-name"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-name","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"name":"second"}}}}'/></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": "sessions-select-window-name","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newWindow": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","window": {"name": "second"}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-window-namerunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewWindow: second- find:elementText: PAGE secondsurface:browser: firefoxwindow:name: second
"window": { "title": "Child second" }
Varies: surface.window.title · Value: "Child second" · Effect: the title key selects the window whose active tab has that title.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.3. Check that the selected page reads "PAGE second".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.. Check that the selected page reads "PAGE second".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.</li><li>Check that the selected page reads "PAGE second".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``.#. Check that the selected page reads "PAGE second".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-title"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd></step><step><cmd>Check that the selected page reads "PAGE second".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-title"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-title","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} -->3. Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Load [the second page](http://localhost:8092/multi-tab-child.html?page=second) in a new window named `second`.{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} */}3. Check that the selected page reads "PAGE second".{/* step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Load http://localhost:8092/multi-tab-child.html?page=second[the second page] in a new window named `second`.+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}). Check that the selected page reads "PAGE second".+// (step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Load <a href="http://localhost:8092/multi-tab-child.html?page=second">the second page</a> in a new window named <code>second</code>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}} --></li><li>Check that the selected page reads "PAGE second".<!-- step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Load `the second page <http://localhost:8092/multi-tab-child.html?page=second>`__ in a new window named ``second``... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}#. Check that the selected page reads "PAGE second"... step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-title"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-title","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Load <xref href="http://localhost:8092/multi-tab-child.html?page=second" scope="external" format="html">the second page</xref> in a new window named <codeph>second</codeph>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=second","newWindow":"second"}}'/></info></step><step><cmd>Check that the selected page reads "PAGE second".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE second","surface":{"browser":"firefox","window":{"title":"Child second"}}}}'/></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": "sessions-select-window-title","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=second","newWindow": "second"}},{"find": {"elementText": "PAGE second","surface": {"browser": "firefox","window": {"title": "Child second"}}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-window-titlerunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- goTo:url: http://localhost:8092/multi-tab-child.html?page=secondnewWindow: second- find:elementText: PAGE secondsurface:browser: firefoxwindow:title: Child second
"window": 0, "tab": 1 on a tab the page opened
Varies: surface.window and surface.tab · Value: { "window": 0, "tab": 1 } · Effect: a tab that a link opens belongs to the window of the tab that opened it, so window and tab selectors together reach it.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Click the Open child in new tab link. The child page opens in a new tab.3. In the first window, check that the second tab reads "PAGE linked".
# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).2. Click the Open child in new tab link. The child page opens in a new tab.3. In the first window, check that the second tab reads "PAGE linked".
= Check a page in another tab or window. Start at http://localhost:8092/multi-tab.html[the multi-tab page].. Click the Open child in new tab link. The child page opens in a new tab.. In the first window, check that the second tab reads "PAGE linked".
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.</li><li>Click the Open child in new tab link. The child page opens in a new tab.</li><li>In the first window, check that the second tab reads "PAGE linked".</li></ol></body></html>
Check a page in another tab or window=====================================#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__.#. Click the Open child in new tab link. The child page opens in a new tab.#. In the first window, check that the second tab reads "PAGE linked".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-tab"><title>Check a page in another tab or window</title><taskbody><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd></step><step><cmd>In the first window, check that the second tab reads "PAGE linked".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} -->3. In the first window, check that the second tab reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Click the Open child in new tab link. The child page opens in a new tab.{/* step {"click":"Open child in new tab"} */}3. In the first window, check that the second tab reads "PAGE linked".{/* step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Click the Open child in new tab link. The child page opens in a new tab.+// (step {"click":"Open child in new tab"}). In the first window, check that the second tab reads "PAGE linked".+// (step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} --></li><li>In the first window, check that the second tab reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Click the Open child in new tab link. The child page opens in a new tab... step {"click":"Open child in new tab"}#. In the first window, check that the second tab reads "PAGE linked"... step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-tab"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-tab","detectSteps":true,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd><info><data name="doc-detective" value='step {"click":"Open child in new tab"}'/></info></step><step><cmd>In the first window, check that the second tab reads "PAGE linked".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --># Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} -->2. Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} -->3. In the first window, check that the second tab reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} --><!-- test end -->
{/* test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} */}# Check a page in another tab or window1. Start at [the multi-tab page](http://localhost:8092/multi-tab.html).{/* step {"goTo":"http://localhost:8092/multi-tab.html"} */}2. Click the Open child in new tab link. The child page opens in a new tab.{/* step {"click":"Open child in new tab"} */}3. In the first window, check that the second tab reads "PAGE linked".{/* step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} */}{/* test end */}
= Check a page in another tab or window// (test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}). Start at http://localhost:8092/multi-tab.html[the multi-tab page].+// (step {"goTo":"http://localhost:8092/multi-tab.html"}). Click the Open child in new tab link. The child page opens in a new tab.+// (step {"click":"Open child in new tab"}). In the first window, check that the second tab reads "PAGE linked".+// (step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Check a page in another tab or window</title></head><body><!-- test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]} --><h1>Check a page in another tab or window</h1><ol><li>Start at <a href="http://localhost:8092/multi-tab.html">the multi-tab page</a>.<!-- step {"goTo":"http://localhost:8092/multi-tab.html"} --></li><li>Click the Open child in new tab link. The child page opens in a new tab.<!-- step {"click":"Open child in new tab"} --></li><li>In the first window, check that the second tab reads "PAGE linked".<!-- step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}} --></li></ol><!-- test end --></body></html>
Check a page in another tab or window=====================================.. test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}#. Start at `the multi-tab page <http://localhost:8092/multi-tab.html>`__... step {"goTo":"http://localhost:8092/multi-tab.html"}#. Click the Open child in new tab link. The child page opens in a new tab... step {"click":"Open child in new tab"}#. In the first window, check that the second tab reads "PAGE linked"... step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-select-window-tab"><title>Check a page in another tab or window</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-select-window-tab","detectSteps":false,"runOn":[{"browsers":{"name":"firefox","headless":true},"browserFallback":"off"}]}'/><steps><step><cmd>Start at <xref href="http://localhost:8092/multi-tab.html" scope="external" format="html">the multi-tab page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":"http://localhost:8092/multi-tab.html"}'/></info></step><step><cmd>Click the Open child in new tab link. The child page opens in a new tab.</cmd><info><data name="doc-detective" value='step {"click":"Open child in new tab"}'/></info></step><step><cmd>In the first window, check that the second tab reads "PAGE linked".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE linked","surface":{"browser":"firefox","window":0,"tab":1}}}'/></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": "sessions-select-window-tab","runOn": [{"browsers": {"name": "firefox","headless": true},"browserFallback": "off"}],"steps": [{"goTo": "http://localhost:8092/multi-tab.html"},{"click": "Open child in new tab"},{"find": {"elementText": "PAGE linked","surface": {"browser": "firefox","window": 0,"tab": 1}}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-select-window-tabrunOn:- browsers:name: firefoxheadless: truebrowserFallback: offsteps:- goTo: http://localhost:8092/multi-tab.html- click: Open child in new tab- find:elementText: PAGE linkedsurface:browser: firefoxwindow: 0tab: 1
startSurface and closeSurface permutations
Browser descriptor, closed by object
Varies: startSurface (browser descriptor) and closeSurface (object) · Value: { "browser": "firefox", "name": "reviewer" } · Effect: startSurface opens a second, named browser session, and closeSurface ends it by naming the engine and session.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).3. Check that the page reads "PAGE review".4. Close the `reviewer` session.
# Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).3. Check that the page reads "PAGE review".4. Close the `reviewer` session.
= Review a page in a second browser session. Start a headless Firefox session named `reviewer`.. In that session, load http://localhost:8092/multi-tab-child.html?page=review[the review page].. Check that the page reads "PAGE review".. Close the `reviewer` session.
<!DOCTYPE html><html lang="en"><head><title>Review a page in a second browser session</title></head><body><h1>Review a page in a second browser session</h1><ol><li>Start a headless Firefox session named <code>reviewer</code>.</li><li>In that session, load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a>.</li><li>Check that the page reads "PAGE review".</li><li>Close the <code>reviewer</code> session.</li></ol></body></html>
Review a page in a second browser session=========================================#. Start a headless Firefox session named ``reviewer``.#. In that session, load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__.#. Check that the page reads "PAGE review".#. Close the ``reviewer`` session.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-browser"><title>Review a page in a second browser session</title><taskbody><steps><step><cmd>Start a headless Firefox session named <codeph>reviewer</codeph>.</cmd></step><step><cmd>In that session, load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref>.</cmd></step><step><cmd>Check that the page reads "PAGE review".</cmd></step><step><cmd>Close the <codeph>reviewer</codeph> session.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-browser","detectSteps":true} --># Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.<!-- step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} -->2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} -->3. Check that the page reads "PAGE review".<!-- step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} -->4. Close the `reviewer` session.<!-- step {"closeSurface":{"browser":"firefox","name":"reviewer"}} --><!-- test end -->
{/* test {"testId":"sessions-surface-browser","detectSteps":true} */}# Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.{/* step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} */}2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} */}3. Check that the page reads "PAGE review".{/* step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} */}4. Close the `reviewer` session.{/* step {"closeSurface":{"browser":"firefox","name":"reviewer"}} */}{/* test end */}
= Review a page in a second browser session// (test {"testId":"sessions-surface-browser","detectSteps":true}). Start a headless Firefox session named `reviewer`.+// (step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}). In that session, load http://localhost:8092/multi-tab-child.html?page=review[the review page].+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}). Check that the page reads "PAGE review".+// (step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}). Close the `reviewer` session.+// (step {"closeSurface":{"browser":"firefox","name":"reviewer"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Review a page in a second browser session</title></head><body><!-- test {"testId":"sessions-surface-browser","detectSteps":true} --><h1>Review a page in a second browser session</h1><ol><li>Start a headless Firefox session named <code>reviewer</code>.<!-- step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} --></li><li>In that session, load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>Check that the page reads "PAGE review".<!-- step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>Close the <code>reviewer</code> session.<!-- step {"closeSurface":{"browser":"firefox","name":"reviewer"}} --></li></ol><!-- test end --></body></html>
Review a page in a second browser session=========================================.. test {"testId":"sessions-surface-browser","detectSteps":true}#. Start a headless Firefox session named ``reviewer``... step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}#. In that session, load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}#. Check that the page reads "PAGE review"... step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}#. Close the ``reviewer`` session... step {"closeSurface":{"browser":"firefox","name":"reviewer"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-browser"><title>Review a page in a second browser session</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-browser","detectSteps":true}'/><steps><step><cmd>Start a headless Firefox session named <codeph>reviewer</codeph>.</cmd><info><data name="doc-detective" value='step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}'/></info></step><step><cmd>In that session, load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>Check that the page reads "PAGE review".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>Close the <codeph>reviewer</codeph> session.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"browser":"firefox","name":"reviewer"}}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-browser","detectSteps":false} --># Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.<!-- step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} -->2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} -->3. Check that the page reads "PAGE review".<!-- step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} -->4. Close the `reviewer` session.<!-- step {"closeSurface":{"browser":"firefox","name":"reviewer"}} --><!-- test end -->
{/* test {"testId":"sessions-surface-browser","detectSteps":false} */}# Review a page in a second browser session1. Start a headless Firefox session named `reviewer`.{/* step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} */}2. In that session, load [the review page](http://localhost:8092/multi-tab-child.html?page=review).{/* step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} */}3. Check that the page reads "PAGE review".{/* step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} */}4. Close the `reviewer` session.{/* step {"closeSurface":{"browser":"firefox","name":"reviewer"}} */}{/* test end */}
= Review a page in a second browser session// (test {"testId":"sessions-surface-browser","detectSteps":false}). Start a headless Firefox session named `reviewer`.+// (step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}). In that session, load http://localhost:8092/multi-tab-child.html?page=review[the review page].+// (step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}). Check that the page reads "PAGE review".+// (step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}). Close the `reviewer` session.+// (step {"closeSurface":{"browser":"firefox","name":"reviewer"}})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Review a page in a second browser session</title></head><body><!-- test {"testId":"sessions-surface-browser","detectSteps":false} --><h1>Review a page in a second browser session</h1><ol><li>Start a headless Firefox session named <code>reviewer</code>.<!-- step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}} --></li><li>In that session, load <a href="http://localhost:8092/multi-tab-child.html?page=review">the review page</a>.<!-- step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>Check that the page reads "PAGE review".<!-- step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}} --></li><li>Close the <code>reviewer</code> session.<!-- step {"closeSurface":{"browser":"firefox","name":"reviewer"}} --></li></ol><!-- test end --></body></html>
Review a page in a second browser session=========================================.. test {"testId":"sessions-surface-browser","detectSteps":false}#. Start a headless Firefox session named ``reviewer``... step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}#. In that session, load `the review page <http://localhost:8092/multi-tab-child.html?page=review>`__... step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}#. Check that the page reads "PAGE review"... step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}#. Close the ``reviewer`` session... step {"closeSurface":{"browser":"firefox","name":"reviewer"}}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-browser"><title>Review a page in a second browser session</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-browser","detectSteps":false}'/><steps><step><cmd>Start a headless Firefox session named <codeph>reviewer</codeph>.</cmd><info><data name="doc-detective" value='step {"startSurface":{"browser":"firefox","name":"reviewer","headless":true}}'/></info></step><step><cmd>In that session, load <xref href="http://localhost:8092/multi-tab-child.html?page=review" scope="external" format="html">the review page</xref>.</cmd><info><data name="doc-detective" value='step {"goTo":{"url":"http://localhost:8092/multi-tab-child.html?page=review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>Check that the page reads "PAGE review".</cmd><info><data name="doc-detective" value='step {"find":{"elementText":"PAGE review","surface":{"browser":"firefox","name":"reviewer"}}}'/></info></step><step><cmd>Close the <codeph>reviewer</codeph> session.</cmd><info><data name="doc-detective" value='step {"closeSurface":{"browser":"firefox","name":"reviewer"}}'/></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": "sessions-surface-browser","steps": [{"startSurface": {"browser": "firefox","name": "reviewer","headless": true}},{"goTo": {"url": "http://localhost:8092/multi-tab-child.html?page=review","surface": {"browser": "firefox","name": "reviewer"}}},{"find": {"elementText": "PAGE review","surface": {"browser": "firefox","name": "reviewer"}}},{"closeSurface": {"browser": "firefox","name": "reviewer"}}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-surface-browsersteps:- startSurface:browser: firefoxname: reviewerheadless: true- goTo:url: http://localhost:8092/multi-tab-child.html?page=reviewsurface:browser: firefoxname: reviewer- find:elementText: PAGE reviewsurface:browser: firefoxname: reviewer- closeSurface:browser: firefoxname: reviewer
Process descriptor, closed by name
Varies: startSurface (process descriptor) and closeSurface (string) · Value: { "process": "node", "args": ["-i"], "name": "sessions-prepl" } · Effect: startSurface starts a process you can type into, and a bare name closes it.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. Close `sessions-prepl`.
# Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. Close `sessions-prepl`.
= Evaluate an expression in the Node.js REPL. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.. Close `sessions-prepl`.
<!DOCTYPE html><html lang="en"><head><title>Evaluate an expression in the Node.js REPL</title></head><body><h1>Evaluate an expression in the Node.js REPL</h1><ol><li>Start <code>node -i</code> as a process named <code>sessions-prepl</code>, and wait for the <code>></code> prompt.</li><li>In <code>sessions-prepl</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.</li><li>Close <code>sessions-prepl</code>.</li></ol></body></html>
Evaluate an expression in the Node.js REPL==========================================#. Start ``node -i`` as a process named ``sessions-prepl``, and wait for the ``>`` prompt.#. In ``sessions-prepl``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``.#. Close ``sessions-prepl``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-process"><title>Evaluate an expression in the Node.js REPL</title><taskbody><steps><step><cmd>Start <codeph>node -i</codeph> as a process named <codeph>sessions-prepl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd></step><step><cmd>In <codeph>sessions-prepl</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd></step><step><cmd>Close <codeph>sessions-prepl</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} -->2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. Close `sessions-prepl`.<!-- step {"closeSurface":"sessions-prepl"} --><!-- test end -->
{/* test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.{/* step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} */}2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. Close `sessions-prepl`.{/* step {"closeSurface":"sessions-prepl"} */}{/* test end */}
= Evaluate an expression in the Node.js REPL// (test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.+// (step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}). In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close `sessions-prepl`.+// (step {"closeSurface":"sessions-prepl"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Evaluate an expression in the Node.js REPL</title></head><body><!-- test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Evaluate an expression in the Node.js REPL</h1><ol><li>Start <code>node -i</code> as a process named <code>sessions-prepl</code>, and wait for the <code>></code> prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} --></li><li>In <code>sessions-prepl</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close <code>sessions-prepl</code>.<!-- step {"closeSurface":"sessions-prepl"} --></li></ol><!-- test end --></body></html>
Evaluate an expression in the Node.js REPL==========================================.. test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start ``node -i`` as a process named ``sessions-prepl``, and wait for the ``>`` prompt... step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}#. In ``sessions-prepl``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close ``sessions-prepl``... step {"closeSurface":"sessions-prepl"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-process"><title>Evaluate an expression in the Node.js REPL</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-process","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start <codeph>node -i</codeph> as a process named <codeph>sessions-prepl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}'/></info></step><step><cmd>In <codeph>sessions-prepl</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close <codeph>sessions-prepl</codeph>.</cmd><info><data name="doc-detective" value='step {"closeSurface":"sessions-prepl"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} -->2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. Close `sessions-prepl`.<!-- step {"closeSurface":"sessions-prepl"} --><!-- test end -->
{/* test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Evaluate an expression in the Node.js REPL1. Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.{/* step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} */}2. In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. Close `sessions-prepl`.{/* step {"closeSurface":"sessions-prepl"} */}{/* test end */}
= Evaluate an expression in the Node.js REPL// (test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start `node -i` as a process named `sessions-prepl`, and wait for the `>` prompt.+// (step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}). In `sessions-prepl`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close `sessions-prepl`.+// (step {"closeSurface":"sessions-prepl"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Evaluate an expression in the Node.js REPL</title></head><body><!-- test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Evaluate an expression in the Node.js REPL</h1><ol><li>Start <code>node -i</code> as a process named <code>sessions-prepl</code>, and wait for the <code>></code> prompt.<!-- step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}} --></li><li>In <code>sessions-prepl</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close <code>sessions-prepl</code>.<!-- step {"closeSurface":"sessions-prepl"} --></li></ol><!-- test end --></body></html>
Evaluate an expression in the Node.js REPL==========================================.. test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start ``node -i`` as a process named ``sessions-prepl``, and wait for the ``>`` prompt... step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}#. In ``sessions-prepl``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close ``sessions-prepl``... step {"closeSurface":"sessions-prepl"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-process"><title>Evaluate an expression in the Node.js REPL</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-process","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start <codeph>node -i</codeph> as a process named <codeph>sessions-prepl</codeph>, and wait for the <codeph>></codeph> prompt.</cmd><info><data name="doc-detective" value='step {"startSurface":{"process":"node","args":["-i"],"name":"sessions-prepl","waitUntil":{"stdio":"/>/"},"timeout":30000}}'/></info></step><step><cmd>In <codeph>sessions-prepl</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-prepl","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close <codeph>sessions-prepl</codeph>.</cmd><info><data name="doc-detective" value='step {"closeSurface":"sessions-prepl"}'/></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": "sessions-surface-process","runOn": [{"platforms": ["linux","mac","windows"],"requires": "node"}],"steps": [{"startSurface": {"process": "node","args": ["-i"],"name": "sessions-prepl","waitUntil": {"stdio": "/>/"},"timeout": 30000}},{"type": {"keys": ["40 + 2","$ENTER$"],"surface": "sessions-prepl","waitUntil": {"stdio": "/42/"},"timeout": 10000}},{"closeSurface": "sessions-prepl"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-surface-processrunOn:- platforms:- linux- mac- windowsrequires: nodesteps:- startSurface:process: nodeargs:- -iname: sessions-preplwaitUntil:stdio: />/timeout: 30000- type:keys:- 40 + 2- $ENTER$surface: sessions-preplwaitUntil:stdio: /42/timeout: 10000- closeSurface: sessions-prepl
Array of descriptors, closed by array
Varies: startSurface (array) and closeSurface (array) · Value: [{ "process": … }, { "process": … }] · Effect: an array starts every surface in one step, and an array closes several at once, by name or by object.
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.4. Close both REPLs.
# Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.4. Close both REPLs.
= Compare two Node.js REPLs. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.. Close both REPLs.
<!DOCTYPE html><html lang="en"><head><title>Compare two Node.js REPLs</title></head><body><h1>Compare two Node.js REPLs</h1><ol><li>Start two <code>node -i</code> processes, <code>sessions-pleft</code> and <code>sessions-pright</code>, and wait for both prompts.</li><li>In <code>sessions-pleft</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.</li><li>In <code>sessions-pright</code>, enter <code>6 * 7</code> and press Enter. Wait for the REPL to print <code>42</code>.</li><li>Close both REPLs.</li></ol></body></html>
Compare two Node.js REPLs=========================#. Start two ``node -i`` processes, ``sessions-pleft`` and ``sessions-pright``, and wait for both prompts.#. In ``sessions-pleft``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``.#. In ``sessions-pright``, enter ``6 * 7`` and press Enter. Wait for the REPL to print ``42``.#. Close both REPLs.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-array"><title>Compare two Node.js REPLs</title><taskbody><steps><step><cmd>Start two <codeph>node -i</codeph> processes, <codeph>sessions-pleft</codeph> and <codeph>sessions-pright</codeph>, and wait for both prompts.</cmd></step><step><cmd>In <codeph>sessions-pleft</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd></step><step><cmd>In <codeph>sessions-pright</codeph>, enter <codeph>6 * 7</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd></step><step><cmd>Close both REPLs.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.<!-- step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} -->2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->4. Close both REPLs.<!-- step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} --><!-- test end -->
{/* test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.{/* step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} */}2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}4. Close both REPLs.{/* step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} */}{/* test end */}
= Compare two Node.js REPLs// (test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.+// (step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}). In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}). In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close both REPLs.+// (step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare two Node.js REPLs</title></head><body><!-- test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Compare two Node.js REPLs</h1><ol><li>Start two <code>node -i</code> processes, <code>sessions-pleft</code> and <code>sessions-pright</code>, and wait for both prompts.<!-- step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} --></li><li>In <code>sessions-pleft</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>In <code>sessions-pright</code>, enter <code>6 * 7</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close both REPLs.<!-- step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} --></li></ol><!-- test end --></body></html>
Compare two Node.js REPLs=========================.. test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start two ``node -i`` processes, ``sessions-pleft`` and ``sessions-pright``, and wait for both prompts... step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}#. In ``sessions-pleft``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. In ``sessions-pright``, enter ``6 * 7`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close both REPLs... step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-array"><title>Compare two Node.js REPLs</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-array","detectSteps":true,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start two <codeph>node -i</codeph> processes, <codeph>sessions-pleft</codeph> and <codeph>sessions-pright</codeph>, and wait for both prompts.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}'/></info></step><step><cmd>In <codeph>sessions-pleft</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>In <codeph>sessions-pright</codeph>, enter <codeph>6 * 7</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close both REPLs.</cmd><info><data name="doc-detective" value='step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --># Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.<!-- step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} -->2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.<!-- step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} -->4. Close both REPLs.<!-- step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} --><!-- test end -->
{/* test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} */}# Compare two Node.js REPLs1. Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.{/* step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} */}2. In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}3. In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.{/* step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} */}4. Close both REPLs.{/* step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} */}{/* test end */}
= Compare two Node.js REPLs// (test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}). Start two `node -i` processes, `sessions-pleft` and `sessions-pright`, and wait for both prompts.+// (step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}). In `sessions-pleft`, enter `40 + 2` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}). In `sessions-pright`, enter `6 * 7` and press Enter. Wait for the REPL to print `42`.+// (step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}). Close both REPLs.+// (step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Compare two Node.js REPLs</title></head><body><!-- test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]} --><h1>Compare two Node.js REPLs</h1><ol><li>Start two <code>node -i</code> processes, <code>sessions-pleft</code> and <code>sessions-pright</code>, and wait for both prompts.<!-- step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]} --></li><li>In <code>sessions-pleft</code>, enter <code>40 + 2</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>In <code>sessions-pright</code>, enter <code>6 * 7</code> and press Enter. Wait for the REPL to print <code>42</code>.<!-- step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}} --></li><li>Close both REPLs.<!-- step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]} --></li></ol><!-- test end --></body></html>
Compare two Node.js REPLs=========================.. test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}#. Start two ``node -i`` processes, ``sessions-pleft`` and ``sessions-pright``, and wait for both prompts... step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}#. In ``sessions-pleft``, enter ``40 + 2`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. In ``sessions-pright``, enter ``6 * 7`` and press Enter. Wait for the REPL to print ``42``... step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}#. Close both REPLs... step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-surface-array"><title>Compare two Node.js REPLs</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-surface-array","detectSteps":false,"runOn":[{"platforms":["linux","mac","windows"],"requires":"node"}]}'/><steps><step><cmd>Start two <codeph>node -i</codeph> processes, <codeph>sessions-pleft</codeph> and <codeph>sessions-pright</codeph>, and wait for both prompts.</cmd><info><data name="doc-detective" value='step {"startSurface":[{"process":"node","args":["-i"],"name":"sessions-pleft","waitUntil":{"stdio":"/>/"},"timeout":30000},{"process":"node","args":["-i"],"name":"sessions-pright","waitUntil":{"stdio":"/>/"},"timeout":30000}]}'/></info></step><step><cmd>In <codeph>sessions-pleft</codeph>, enter <codeph>40 + 2</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["40 + 2","$ENTER$"],"surface":"sessions-pleft","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>In <codeph>sessions-pright</codeph>, enter <codeph>6 * 7</codeph> and press Enter. Wait for the REPL to print <codeph>42</codeph>.</cmd><info><data name="doc-detective" value='step {"type":{"keys":["6 * 7","$ENTER$"],"surface":"sessions-pright","waitUntil":{"stdio":"/42/"},"timeout":10000}}'/></info></step><step><cmd>Close both REPLs.</cmd><info><data name="doc-detective" value='step {"closeSurface":["sessions-pleft",{"process":"sessions-pright"}]}'/></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": "sessions-surface-array","runOn": [{"platforms": ["linux","mac","windows"],"requires": "node"}],"steps": [{"startSurface": [{"process": "node","args": ["-i"],"name": "sessions-pleft","waitUntil": {"stdio": "/>/"},"timeout": 30000},{"process": "node","args": ["-i"],"name": "sessions-pright","waitUntil": {"stdio": "/>/"},"timeout": 30000}]},{"type": {"keys": ["40 + 2","$ENTER$"],"surface": "sessions-pleft","waitUntil": {"stdio": "/42/"},"timeout": 10000}},{"type": {"keys": ["6 * 7","$ENTER$"],"surface": "sessions-pright","waitUntil": {"stdio": "/42/"},"timeout": 10000}},{"closeSurface": ["sessions-pleft",{"process": "sessions-pright"}]}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-surface-arrayrunOn:- platforms:- linux- mac- windowsrequires: nodesteps:- startSurface:- process: nodeargs:- -iname: sessions-pleftwaitUntil:stdio: />/timeout: 30000- process: nodeargs:- -iname: sessions-prightwaitUntil:stdio: />/timeout: 30000- type:keys:- 40 + 2- $ENTER$surface: sessions-pleftwaitUntil:stdio: /42/timeout: 10000- type:keys:- 6 * 7- $ENTER$surface: sessions-prightwaitUntil:stdio: /42/timeout: 10000- closeSurface:- sessions-pleft- process: sessions-pright
Config origin and originParams permutations
"origin": "http://localhost:8092"
Varies: config.origin · Value: "http://localhost:8092" · Effect: steps can give a path, and the config supplies the scheme and host.
The example’s own doc-detective.json sets:
{"origin": "http://localhost:8092"}
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Open a page by its path1. Go to `/multi-tab.html` on the site.2. Check that the page reads "MULTI-TAB HOME".
# Open a page by its path1. Go to `/multi-tab.html` on the site.2. Check that the page reads "MULTI-TAB HOME".
= Open a page by its path. Go to `/multi-tab.html` on the site.. Check that the page reads "MULTI-TAB HOME".
<!DOCTYPE html><html lang="en"><head><title>Open a page by its path</title></head><body><h1>Open a page by its path</h1><ol><li>Go to <code>/multi-tab.html</code> on the site.</li><li>Check that the page reads "MULTI-TAB HOME".</li></ol></body></html>
Open a page by its path=======================#. Go to ``/multi-tab.html`` on the site.#. Check that the page reads "MULTI-TAB HOME".
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-origin"><title>Open a page by its path</title><taskbody><steps><step><cmd>Go to <codeph>/multi-tab.html</codeph> on the site.</cmd></step><step><cmd>Check that the page reads "MULTI-TAB HOME".</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-config-origin","detectSteps":true} --># Open a page by its path1. Go to `/multi-tab.html` on the site.<!-- step {"goTo":"/multi-tab.html"} -->2. Check that the page reads "MULTI-TAB HOME".<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-config-origin","detectSteps":true} */}# Open a page by its path1. Go to `/multi-tab.html` on the site.{/* step {"goTo":"/multi-tab.html"} */}2. Check that the page reads "MULTI-TAB HOME".{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Open a page by its path// (test {"testId":"sessions-config-origin","detectSteps":true}). Go to `/multi-tab.html` on the site.+// (step {"goTo":"/multi-tab.html"}). Check that the page reads "MULTI-TAB HOME".+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a page by its path</title></head><body><!-- test {"testId":"sessions-config-origin","detectSteps":true} --><h1>Open a page by its path</h1><ol><li>Go to <code>/multi-tab.html</code> on the site.<!-- step {"goTo":"/multi-tab.html"} --></li><li>Check that the page reads "MULTI-TAB HOME".<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Open a page by its path=======================.. test {"testId":"sessions-config-origin","detectSteps":true}#. Go to ``/multi-tab.html`` on the site... step {"goTo":"/multi-tab.html"}#. Check that the page reads "MULTI-TAB HOME"... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-origin"><title>Open a page by its path</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-config-origin","detectSteps":true}'/><steps><step><cmd>Go to <codeph>/multi-tab.html</codeph> on the site.</cmd><info><data name="doc-detective" value='step {"goTo":"/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-config-origin","detectSteps":false} --># Open a page by its path1. Go to `/multi-tab.html` on the site.<!-- step {"goTo":"/multi-tab.html"} -->2. Check that the page reads "MULTI-TAB HOME".<!-- step {"find":"MULTI-TAB HOME"} --><!-- test end -->
{/* test {"testId":"sessions-config-origin","detectSteps":false} */}# Open a page by its path1. Go to `/multi-tab.html` on the site.{/* step {"goTo":"/multi-tab.html"} */}2. Check that the page reads "MULTI-TAB HOME".{/* step {"find":"MULTI-TAB HOME"} */}{/* test end */}
= Open a page by its path// (test {"testId":"sessions-config-origin","detectSteps":false}). Go to `/multi-tab.html` on the site.+// (step {"goTo":"/multi-tab.html"}). Check that the page reads "MULTI-TAB HOME".+// (step {"find":"MULTI-TAB HOME"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Open a page by its path</title></head><body><!-- test {"testId":"sessions-config-origin","detectSteps":false} --><h1>Open a page by its path</h1><ol><li>Go to <code>/multi-tab.html</code> on the site.<!-- step {"goTo":"/multi-tab.html"} --></li><li>Check that the page reads "MULTI-TAB HOME".<!-- step {"find":"MULTI-TAB HOME"} --></li></ol><!-- test end --></body></html>
Open a page by its path=======================.. test {"testId":"sessions-config-origin","detectSteps":false}#. Go to ``/multi-tab.html`` on the site... step {"goTo":"/multi-tab.html"}#. Check that the page reads "MULTI-TAB HOME"... step {"find":"MULTI-TAB HOME"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-origin"><title>Open a page by its path</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-config-origin","detectSteps":false}'/><steps><step><cmd>Go to <codeph>/multi-tab.html</codeph> on the site.</cmd><info><data name="doc-detective" value='step {"goTo":"/multi-tab.html"}'/></info></step><step><cmd>Check that the page reads "MULTI-TAB HOME".</cmd><info><data name="doc-detective" value='step {"find":"MULTI-TAB HOME"}'/></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": "sessions-config-origin","steps": [{"goTo": "/multi-tab.html"},{"find": "MULTI-TAB HOME"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-config-originsteps:- goTo: /multi-tab.html- find: MULTI-TAB HOME
"originParams": { "from": "docs" }
Varies: config.originParams · Value: { "from": "docs" } · Effect: every URL built from origin gets the query parameters, so the echo endpoint returns from=docs.
The example’s own doc-detective.json sets:
{"origin": "http://localhost:8092","originParams": {"from": "docs"}}
Prose
Detected
Inline
Standalone
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
# Tag every request with a query parameter1. Go to `/api/echo` on the site.2. Check that the response echoes `"from":"docs"`.
# Tag every request with a query parameter1. Go to `/api/echo` on the site.2. Check that the response echoes `"from":"docs"`.
= Tag every request with a query parameter. Go to `/api/echo` on the site.. Check that the response echoes `"from":"docs"`.
<!DOCTYPE html><html lang="en"><head><title>Tag every request with a query parameter</title></head><body><h1>Tag every request with a query parameter</h1><ol><li>Go to <code>/api/echo</code> on the site.</li><li>Check that the response echoes <code>"from":"docs"</code>.</li></ol></body></html>
Tag every request with a query parameter========================================#. Go to ``/api/echo`` on the site.#. Check that the response echoes ``"from":"docs"``.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-originparams"><title>Tag every request with a query parameter</title><taskbody><steps><step><cmd>Go to <codeph>/api/echo</codeph> on the site.</cmd></step><step><cmd>Check that the response echoes <codeph>"from":"docs"</codeph>.</cmd></step></steps></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]} --># Tag every request with a query parameter1. Go to `/api/echo` on the site.<!-- step {"goTo":"/api/echo"} -->2. Check that the response echoes `"from":"docs"`.<!-- step {"find":"/\"from\":\"docs\"/"} --><!-- test end -->
{/* test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]} */}# Tag every request with a query parameter1. Go to `/api/echo` on the site.{/* step {"goTo":"/api/echo"} */}2. Check that the response echoes `"from":"docs"`.{/* step {"find":"/\"from\":\"docs\"/"} */}{/* test end */}
= Tag every request with a query parameter// (test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]}). Go to `/api/echo` on the site.+// (step {"goTo":"/api/echo"}). Check that the response echoes `"from":"docs"`.+// (step {"find":"/\"from\":\"docs\"/"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Tag every request with a query parameter</title></head><body><!-- test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]} --><h1>Tag every request with a query parameter</h1><ol><li>Go to <code>/api/echo</code> on the site.<!-- step {"goTo":"/api/echo"} --></li><li>Check that the response echoes <code>"from":"docs"</code>.<!-- step {"find":"/\"from\":\"docs\"/"} --></li></ol><!-- test end --></body></html>
Tag every request with a query parameter========================================.. test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]}#. Go to ``/api/echo`` on the site... step {"goTo":"/api/echo"}#. Check that the response echoes ``"from":"docs"``... step {"find":"/\"from\":\"docs\"/"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-originparams"><title>Tag every request with a query parameter</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-config-originparams","detectSteps":true,"runOn":[{"browsers":"chrome"}]}'/><steps><step><cmd>Go to <codeph>/api/echo</codeph> on the site.</cmd><info><data name="doc-detective" value='step {"goTo":"/api/echo"}'/></info></step><step><cmd>Check that the response echoes <codeph>"from":"docs"</codeph>.</cmd><info><data name="doc-detective" value='step {"find":"/\"from\":\"docs\"/"}'/></info></step></steps><data name="doc-detective" value="test end"/></taskbody></task>
Markdown
MDX
AsciiDoc
HTML
reStructuredText
DITA
<!-- test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]} --># Tag every request with a query parameter1. Go to `/api/echo` on the site.<!-- step {"goTo":"/api/echo"} -->2. Check that the response echoes `"from":"docs"`.<!-- step {"find":"/\"from\":\"docs\"/"} --><!-- test end -->
{/* test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]} */}# Tag every request with a query parameter1. Go to `/api/echo` on the site.{/* step {"goTo":"/api/echo"} */}2. Check that the response echoes `"from":"docs"`.{/* step {"find":"/\"from\":\"docs\"/"} */}{/* test end */}
= Tag every request with a query parameter// (test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]}). Go to `/api/echo` on the site.+// (step {"goTo":"/api/echo"}). Check that the response echoes `"from":"docs"`.+// (step {"find":"/\"from\":\"docs\"/"})// (test end)
<!DOCTYPE html><html lang="en"><head><title>Tag every request with a query parameter</title></head><body><!-- test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]} --><h1>Tag every request with a query parameter</h1><ol><li>Go to <code>/api/echo</code> on the site.<!-- step {"goTo":"/api/echo"} --></li><li>Check that the response echoes <code>"from":"docs"</code>.<!-- step {"find":"/\"from\":\"docs\"/"} --></li></ol><!-- test end --></body></html>
Tag every request with a query parameter========================================.. test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]}#. Go to ``/api/echo`` on the site... step {"goTo":"/api/echo"}#. Check that the response echoes ``"from":"docs"``... step {"find":"/\"from\":\"docs\"/"}.. test end
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"><task id="sessions-config-originparams"><title>Tag every request with a query parameter</title><taskbody><data name="doc-detective" value='test {"testId":"sessions-config-originparams","detectSteps":false,"runOn":[{"browsers":"chrome"}]}'/><steps><step><cmd>Go to <codeph>/api/echo</codeph> on the site.</cmd><info><data name="doc-detective" value='step {"goTo":"/api/echo"}'/></info></step><step><cmd>Check that the response echoes <codeph>"from":"docs"</codeph>.</cmd><info><data name="doc-detective" value='step {"find":"/\"from\":\"docs\"/"}'/></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": "sessions-config-originparams","runOn": [{"browsers": "chrome"}],"steps": [{"goTo": "/api/echo"},{"find": "/\"from\":\"docs\"/"}]}]}
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.jsontests:- testId: sessions-config-originparamsrunOn:- browsers: chromesteps:- goTo: /api/echo- find: /"from":"docs"/