You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update links in documentation to remove file extensions for consistency
- Add new tests documentation page with detailed structure and examples
- Refactor JsonYamlTabs component to use Docusaurus components for better integration
|[checkLink](/docs/get-started/actions/checkLink.md)| Check if a URL returns an acceptable status code from a GET request. |
28
-
|[find](/docs/get-started/actions/find.md)| Locate and interact with an element on the page. |
29
-
|[click](/docs/get-started/actions/click.md)| Click an element. |
30
-
|[goTo](/docs/get-started/actions/goTo.md)| Navigate to a specified URL. |
31
-
|[httpRequest](/docs/get-started/actions/httpRequest.md)| Perform a generic HTTP request, for example to an API. |
32
-
|[runShell](/docs/get-started/actions/runShell.md)| Perform a native shell command. |
33
-
|[screenshot](/docs/get-started/actions/screenshot.md)| Take a screenshot in PNG format. |
34
-
|[loadVariables](/docs/get-started/actions/loadVariables.md)| Load environment variables from a `.env` file. |
35
-
|[record](/docs/get-started/actions/record.md)| Capture a video of test run. |
36
-
|[stopRecord](/docs/get-started/actions/stopRecord.md)| Stop capturing a video of test run. |
37
-
|[type](/docs/get-started/actions/type.md)| Type keys. To type special keys, begin and end the string with `$` and use the special key’s enum. For example, to type the Escape key, enter `$ESCAPE$`. |
38
-
|[wait](/docs/get-started/actions/wait.md)| Pause before performing the next action. |
27
+
|[checkLink](/docs/get-started/actions/checkLink)| Check if a URL returns an acceptable status code from a GET request. |
28
+
|[find](/docs/get-started/actions/find)| Locate and interact with an element on the page. |
29
+
|[click](/docs/get-started/actions/click)| Click an element. |
30
+
|[goTo](/docs/get-started/actions/goTo)| Navigate to a specified URL. |
31
+
|[httpRequest](/docs/get-started/actions/httpRequest)| Perform a generic HTTP request, for example to an API. |
32
+
|[runShell](/docs/get-started/actions/runShell)| Perform a native shell command. |
33
+
|[screenshot](/docs/get-started/actions/screenshot)| Take a screenshot in PNG format. |
34
+
|[loadVariables](/docs/get-started/actions/loadVariables)| Load environment variables from a `.env` file. |
35
+
|[record](/docs/get-started/actions/record)| Capture a video of test run. |
36
+
|[stopRecord](/docs/get-started/actions/stopRecord)| Stop capturing a video of test run. |
37
+
|[type](/docs/get-started/actions/type)| Type keys. To type special keys, begin and end the string with `$` and use the special key’s enum. For example, to type the Escape key, enter `$ESCAPE$`. |
38
+
|[wait](/docs/get-started/actions/wait)| Pause before performing the next action. |
39
39
40
40
## Context
41
41
42
-
A [context](/docs/references/schemas/context.md) consists of an application and platforms that support the tests.
42
+
A [context](/docs/references/schemas/context) consists of an application and platforms that support the tests.
43
43
44
44
## Next steps
45
45
46
-
-[Create your first test](/docs/get-started/create-your-first-test.md)
46
+
-[Create your first test](/docs/get-started/create-your-first-test)
Copy file name to clipboardExpand all lines: docs/get-started/create-your-first-test.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ In this tutorial, you will create a basic test that navigates to a webpage, vali
8
8
9
9
## What is a test?
10
10
11
-
A [test](/docs/get-started/tests/index.md) in Doc Detective is a series of steps, where each step performs a single [action](/docs/category/actions). An action can be navigating to a URL, finding an element, or taking a screenshot, for example.
11
+
A [test](/docs/get-started/tests/index) in Doc Detective is a series of steps, where each step performs a single [action](/docs/category/actions). An action can be navigating to a URL, finding an element, or taking a screenshot, for example.
12
12
13
13
## What does this test do?
14
14
@@ -18,7 +18,7 @@ This test navigates to `https://example.com`, checks for the presence of the `<h
@@ -68,10 +68,10 @@ To create your first test, follow these steps:
68
68
69
69
This test uses the following actions:
70
70
71
-
-[`goTo`](/docs/get-started/actions/goTo.md): Navigates to the specified URL, https://example.com, to start the test flow.
72
-
-[`find`](/docs/get-started/actions/find.md): Locates elements on the page using CSS selectors such as HTML tags like `h1` or `a`, and validates their presence and text content.
73
-
-[`click`](/docs/get-started/actions/click.md): Clicks on the specified element, in this case, the `More information...` link.
74
-
-[`screenshot`](/docs/get-started/actions/screenshot.md): Captures a screenshot of the current page and saves it to the specified path.
71
+
-[`goTo`](/docs/get-started/actions/goTo): Navigates to the specified URL, https://example.com, to start the test flow.
72
+
-[`find`](/docs/get-started/actions/find): Locates elements on the page using CSS selectors such as HTML tags like `h1` or `a`, and validates their presence and text content.
73
+
-[`click`](/docs/get-started/actions/click): Clicks on the specified element, in this case, the `More information...` link.
74
+
-[`screenshot`](/docs/get-started/actions/screenshot): Captures a screenshot of the current page and saves it to the specified path.
- Action: Types the specified text into the active element
341
340
342
341
**httpRequestFormat**: Detects HTTP request code blocks and executes the request.
342
+
343
343
- Pattern: HTTP request in code blocks with method, URL, headers, and body
344
344
- Action: Executes the HTTP request with the specified parameters
345
345
346
346
**runCode**: Detects code blocks in supported languages and executes the code.
347
+
347
348
- Pattern: Code blocks with `bash`, `python`, `py`, `javascript`, or `js` language tags (excluding those marked with `testIgnore`)
348
349
- Action: Executes the code in the specified language (marked as unsafe)
349
350
350
351
The `regex` property defines the regular expression patterns to match, and the `actions` property defines the actions to perform when the pattern is detected. With the default configuration, Doc Detective would take the following Markdown and generate tests automatically:
351
352
352
353
Markdown:
353
354
354
-
<!-- test-start {"detectSteps":false} -->
355
-
356
355
```markdown
357
356
To get started,
358
357
@@ -365,8 +364,6 @@ Check out our [documentation](https://docs.example.com) for more information.
@@ -429,11 +426,13 @@ You can extend or override the default patterns by defining custom markup patter
429
426
Doc Detective also includes default configurations for HTML and AsciiDoc files, though these only include inline statement patterns for test definitions and don't include markup patterns for detected tests:
430
427
431
428
**HTML files** (`.html`, `.htm`):
429
+
432
430
- Uses HTML comment syntax for inline test statements
433
431
- Example: `<!-- test { "testId": "my-test" } -->`
- Uses AsciiDoc comment syntax for inline test statements
434
+
435
+
- Uses AsciiDoc comment syntax for inline test statements
437
436
- Example: `// (test { "testId": "my-test" })`
438
437
439
438
To add detected test functionality to HTML or AsciiDoc files, you would need to define custom markup patterns in your configuration similar to the Markdown examples above.
0 commit comments