explorbot 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +94 -0
- package/README.md +267 -0
- package/assets/sample-files/sample.docx +0 -0
- package/assets/sample-files/sample.mp3 +0 -0
- package/assets/sample-files/sample.mp4 +0 -0
- package/assets/sample-files/sample.pdf +21 -0
- package/assets/sample-files/sample.png +0 -0
- package/assets/sample-files/sample.xlsx +0 -0
- package/assets/sample-files/sample.zip +0 -0
- package/dist/assets/sample-files/sample.docx +0 -0
- package/dist/assets/sample-files/sample.mp3 +0 -0
- package/dist/assets/sample-files/sample.mp4 +0 -0
- package/dist/assets/sample-files/sample.pdf +21 -0
- package/dist/assets/sample-files/sample.png +0 -0
- package/dist/assets/sample-files/sample.xlsx +0 -0
- package/dist/assets/sample-files/sample.zip +0 -0
- package/dist/bin/explorbot-cli.js +683 -0
- package/dist/bin/explorbot-cli.js.map +1 -0
- package/dist/boat/api-tester/bin/apibot-cli.js +5 -0
- package/dist/boat/api-tester/bin/apibot-cli.js.map +1 -0
- package/dist/boat/api-tester/example/apibot.config.js +31 -0
- package/dist/boat/api-tester/example/apibot.config.js.map +1 -0
- package/dist/boat/api-tester/src/ai/chief/styles.js +13 -0
- package/dist/boat/api-tester/src/ai/chief/styles.js.map +1 -0
- package/dist/boat/api-tester/src/ai/chief.js +301 -0
- package/dist/boat/api-tester/src/ai/chief.js.map +1 -0
- package/dist/boat/api-tester/src/ai/curler-tools.js +263 -0
- package/dist/boat/api-tester/src/ai/curler-tools.js.map +1 -0
- package/dist/boat/api-tester/src/ai/curler.js +271 -0
- package/dist/boat/api-tester/src/ai/curler.js.map +1 -0
- package/dist/boat/api-tester/src/api-client.js +26 -0
- package/dist/boat/api-tester/src/api-client.js.map +1 -0
- package/dist/boat/api-tester/src/apibot.js +166 -0
- package/dist/boat/api-tester/src/apibot.js.map +1 -0
- package/dist/boat/api-tester/src/cli.js +262 -0
- package/dist/boat/api-tester/src/cli.js.map +1 -0
- package/dist/boat/api-tester/src/config.js +159 -0
- package/dist/boat/api-tester/src/config.js.map +1 -0
- package/dist/prompts/audit-rules.md +124 -0
- package/dist/rules/chief/general.md +11 -0
- package/dist/rules/chief/styles/curious.md +12 -0
- package/dist/rules/chief/styles/hacker.md +19 -0
- package/dist/rules/chief/styles/normal.md +11 -0
- package/dist/rules/chief/styles/psycho.md +17 -0
- package/dist/rules/navigator/multiple-locator.md +47 -0
- package/dist/rules/navigator/output.md +69 -0
- package/dist/rules/navigator/verification-actions.md +122 -0
- package/dist/rules/navigator/verification-output.md +53 -0
- package/dist/rules/planner/styles/curious.md +39 -0
- package/dist/rules/planner/styles/normal.md +21 -0
- package/dist/rules/planner/styles/psycho.md +14 -0
- package/dist/rules/researcher/list-element.md +11 -0
- package/dist/rules/researcher/screenshot-ui-map.md +30 -0
- package/dist/rules/researcher/section-ui-map.md +18 -0
- package/dist/rules/researcher/ui-map-table.md +18 -0
- package/dist/src/action-result.js +574 -0
- package/dist/src/action-result.js.map +1 -0
- package/dist/src/action.js +388 -0
- package/dist/src/action.js.map +1 -0
- package/dist/src/activity.js +86 -0
- package/dist/src/activity.js.map +1 -0
- package/dist/src/ai/agent.js +2 -0
- package/dist/src/ai/agent.js.map +1 -0
- package/dist/src/ai/bosun.js +443 -0
- package/dist/src/ai/bosun.js.map +1 -0
- package/dist/src/ai/captain/idle-mode.js +102 -0
- package/dist/src/ai/captain/idle-mode.js.map +1 -0
- package/dist/src/ai/captain/mixin.js +11 -0
- package/dist/src/ai/captain/mixin.js.map +1 -0
- package/dist/src/ai/captain/test-mode.js +251 -0
- package/dist/src/ai/captain/test-mode.js.map +1 -0
- package/dist/src/ai/captain/web-mode.js +124 -0
- package/dist/src/ai/captain/web-mode.js.map +1 -0
- package/dist/src/ai/captain.js +442 -0
- package/dist/src/ai/captain.js.map +1 -0
- package/dist/src/ai/conversation.js +176 -0
- package/dist/src/ai/conversation.js.map +1 -0
- package/dist/src/ai/experience-compactor.js +232 -0
- package/dist/src/ai/experience-compactor.js.map +1 -0
- package/dist/src/ai/fisherman-tools.js +154 -0
- package/dist/src/ai/fisherman-tools.js.map +1 -0
- package/dist/src/ai/fisherman.js +184 -0
- package/dist/src/ai/fisherman.js.map +1 -0
- package/dist/src/ai/historian.js +384 -0
- package/dist/src/ai/historian.js.map +1 -0
- package/dist/src/ai/navigator.js +493 -0
- package/dist/src/ai/navigator.js.map +1 -0
- package/dist/src/ai/pilot.js +684 -0
- package/dist/src/ai/pilot.js.map +1 -0
- package/dist/src/ai/planner/session-dedup.js +28 -0
- package/dist/src/ai/planner/session-dedup.js.map +1 -0
- package/dist/src/ai/planner/styles.js +15 -0
- package/dist/src/ai/planner/styles.js.map +1 -0
- package/dist/src/ai/planner/subpages.js +118 -0
- package/dist/src/ai/planner/subpages.js.map +1 -0
- package/dist/src/ai/planner.js +486 -0
- package/dist/src/ai/planner.js.map +1 -0
- package/dist/src/ai/provider.js +540 -0
- package/dist/src/ai/provider.js.map +1 -0
- package/dist/src/ai/quartermaster.js +210 -0
- package/dist/src/ai/quartermaster.js.map +1 -0
- package/dist/src/ai/researcher/cache.js +95 -0
- package/dist/src/ai/researcher/cache.js.map +1 -0
- package/dist/src/ai/researcher/coordinates.js +210 -0
- package/dist/src/ai/researcher/coordinates.js.map +1 -0
- package/dist/src/ai/researcher/deep-analysis.js +364 -0
- package/dist/src/ai/researcher/deep-analysis.js.map +1 -0
- package/dist/src/ai/researcher/fingerprint-worker.js +46 -0
- package/dist/src/ai/researcher/fingerprint-worker.js.map +1 -0
- package/dist/src/ai/researcher/focus.js +37 -0
- package/dist/src/ai/researcher/focus.js.map +1 -0
- package/dist/src/ai/researcher/locators.js +242 -0
- package/dist/src/ai/researcher/locators.js.map +1 -0
- package/dist/src/ai/researcher/mixin.js +3 -0
- package/dist/src/ai/researcher/mixin.js.map +1 -0
- package/dist/src/ai/researcher/parser.js +160 -0
- package/dist/src/ai/researcher/parser.js.map +1 -0
- package/dist/src/ai/researcher/research-result.js +110 -0
- package/dist/src/ai/researcher/research-result.js.map +1 -0
- package/dist/src/ai/researcher.js +776 -0
- package/dist/src/ai/researcher.js.map +1 -0
- package/dist/src/ai/rules.js +368 -0
- package/dist/src/ai/rules.js.map +1 -0
- package/dist/src/ai/task-agent.js +110 -0
- package/dist/src/ai/task-agent.js.map +1 -0
- package/dist/src/ai/tester.js +840 -0
- package/dist/src/ai/tester.js.map +1 -0
- package/dist/src/ai/tools.js +980 -0
- package/dist/src/ai/tools.js.map +1 -0
- package/dist/src/api/api-client.js +91 -0
- package/dist/src/api/api-client.js.map +1 -0
- package/dist/src/api/request-result.js +177 -0
- package/dist/src/api/request-result.js.map +1 -0
- package/dist/src/api/request-store.js +109 -0
- package/dist/src/api/request-store.js.map +1 -0
- package/dist/src/api/spec-reader.js +148 -0
- package/dist/src/api/spec-reader.js.map +1 -0
- package/dist/src/api/xhr-capture.js +91 -0
- package/dist/src/api/xhr-capture.js.map +1 -0
- package/dist/src/browser-server.js +67 -0
- package/dist/src/browser-server.js.map +1 -0
- package/dist/src/command-handler.js +363 -0
- package/dist/src/command-handler.js.map +1 -0
- package/dist/src/commands/add-rule-command.js +52 -0
- package/dist/src/commands/add-rule-command.js.map +1 -0
- package/dist/src/commands/base-command.js +14 -0
- package/dist/src/commands/base-command.js.map +1 -0
- package/dist/src/commands/clean-command.js +67 -0
- package/dist/src/commands/clean-command.js.map +1 -0
- package/dist/src/commands/context-aria-command.js +18 -0
- package/dist/src/commands/context-aria-command.js.map +1 -0
- package/dist/src/commands/context-command.js +57 -0
- package/dist/src/commands/context-command.js.map +1 -0
- package/dist/src/commands/context-data-command.js +25 -0
- package/dist/src/commands/context-data-command.js.map +1 -0
- package/dist/src/commands/context-experience-command.js +41 -0
- package/dist/src/commands/context-experience-command.js.map +1 -0
- package/dist/src/commands/context-html-command.js +26 -0
- package/dist/src/commands/context-html-command.js.map +1 -0
- package/dist/src/commands/context-knowledge-command.js +36 -0
- package/dist/src/commands/context-knowledge-command.js.map +1 -0
- package/dist/src/commands/debug-command.js +12 -0
- package/dist/src/commands/debug-command.js.map +1 -0
- package/dist/src/commands/drill-command.js +29 -0
- package/dist/src/commands/drill-command.js.map +1 -0
- package/dist/src/commands/exit-command.js +26 -0
- package/dist/src/commands/exit-command.js.map +1 -0
- package/dist/src/commands/explore-command.js +124 -0
- package/dist/src/commands/explore-command.js.map +1 -0
- package/dist/src/commands/freesail-command.js +84 -0
- package/dist/src/commands/freesail-command.js.map +1 -0
- package/dist/src/commands/help-command.js +7 -0
- package/dist/src/commands/help-command.js.map +1 -0
- package/dist/src/commands/index.js +63 -0
- package/dist/src/commands/index.js.map +1 -0
- package/dist/src/commands/knows-command.js +54 -0
- package/dist/src/commands/knows-command.js.map +1 -0
- package/dist/src/commands/learn-command.js +35 -0
- package/dist/src/commands/learn-command.js.map +1 -0
- package/dist/src/commands/navigate-command.js +16 -0
- package/dist/src/commands/navigate-command.js.map +1 -0
- package/dist/src/commands/path-command.js +70 -0
- package/dist/src/commands/path-command.js.map +1 -0
- package/dist/src/commands/plan-clear-command.js +13 -0
- package/dist/src/commands/plan-clear-command.js.map +1 -0
- package/dist/src/commands/plan-command.js +36 -0
- package/dist/src/commands/plan-command.js.map +1 -0
- package/dist/src/commands/plan-edit-command.js +8 -0
- package/dist/src/commands/plan-edit-command.js.map +1 -0
- package/dist/src/commands/plan-load-command.js +16 -0
- package/dist/src/commands/plan-load-command.js.map +1 -0
- package/dist/src/commands/plan-reload-command.js +23 -0
- package/dist/src/commands/plan-reload-command.js.map +1 -0
- package/dist/src/commands/plan-save-command.js +22 -0
- package/dist/src/commands/plan-save-command.js.map +1 -0
- package/dist/src/commands/research-command.js +38 -0
- package/dist/src/commands/research-command.js.map +1 -0
- package/dist/src/commands/start-command.js +12 -0
- package/dist/src/commands/start-command.js.map +1 -0
- package/dist/src/commands/status-command.js +19 -0
- package/dist/src/commands/status-command.js.map +1 -0
- package/dist/src/commands/test-command.js +85 -0
- package/dist/src/commands/test-command.js.map +1 -0
- package/dist/src/components/ActivityPane.js +55 -0
- package/dist/src/components/ActivityPane.js.map +1 -0
- package/dist/src/components/AddKnowledge.js +122 -0
- package/dist/src/components/AddKnowledge.js.map +1 -0
- package/dist/src/components/AddRule.js +117 -0
- package/dist/src/components/AddRule.js.map +1 -0
- package/dist/src/components/App.js +313 -0
- package/dist/src/components/App.js.map +1 -0
- package/dist/src/components/Autocomplete.js +43 -0
- package/dist/src/components/Autocomplete.js.map +1 -0
- package/dist/src/components/InputPane.js +207 -0
- package/dist/src/components/InputPane.js.map +1 -0
- package/dist/src/components/InputReadline.js +598 -0
- package/dist/src/components/InputReadline.js.map +1 -0
- package/dist/src/components/LogPane.js +123 -0
- package/dist/src/components/LogPane.js.map +1 -0
- package/dist/src/components/PlanEditor.js +126 -0
- package/dist/src/components/PlanEditor.js.map +1 -0
- package/dist/src/components/PlanPane.js +51 -0
- package/dist/src/components/PlanPane.js.map +1 -0
- package/dist/src/components/SessionTimer.js +26 -0
- package/dist/src/components/SessionTimer.js.map +1 -0
- package/dist/src/components/StateTransitionPane.js +107 -0
- package/dist/src/components/StateTransitionPane.js.map +1 -0
- package/dist/src/components/StatusPane.js +37 -0
- package/dist/src/components/StatusPane.js.map +1 -0
- package/dist/src/components/TaskPane.js +96 -0
- package/dist/src/components/TaskPane.js.map +1 -0
- package/dist/src/components/Welcome.js +52 -0
- package/dist/src/components/Welcome.js.map +1 -0
- package/dist/src/components/WelcomeChecklist.js +96 -0
- package/dist/src/components/WelcomeChecklist.js.map +1 -0
- package/dist/src/components/WelcomeCommands.js +61 -0
- package/dist/src/components/WelcomeCommands.js.map +1 -0
- package/dist/src/components/autocomplete-store.js +22 -0
- package/dist/src/components/autocomplete-store.js.map +1 -0
- package/dist/src/components/parse-keypress.js +174 -0
- package/dist/src/components/parse-keypress.js.map +1 -0
- package/dist/src/config.js +249 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/execution-controller.js +92 -0
- package/dist/src/execution-controller.js.map +1 -0
- package/dist/src/experience-tracker.js +294 -0
- package/dist/src/experience-tracker.js.map +1 -0
- package/dist/src/explorbot.js +348 -0
- package/dist/src/explorbot.js.map +1 -0
- package/dist/src/explorer.js +611 -0
- package/dist/src/explorer.js.map +1 -0
- package/dist/src/index.js +56 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/knowledge-tracker.js +184 -0
- package/dist/src/knowledge-tracker.js.map +1 -0
- package/dist/src/observability.js +126 -0
- package/dist/src/observability.js.map +1 -0
- package/dist/src/reporter.js +185 -0
- package/dist/src/reporter.js.map +1 -0
- package/dist/src/state-manager.js +427 -0
- package/dist/src/state-manager.js.map +1 -0
- package/dist/src/stats.js +44 -0
- package/dist/src/stats.js.map +1 -0
- package/dist/src/test-plan.js +343 -0
- package/dist/src/test-plan.js.map +1 -0
- package/dist/src/utils/aria.js +588 -0
- package/dist/src/utils/aria.js.map +1 -0
- package/dist/src/utils/code-extractor.js +21 -0
- package/dist/src/utils/code-extractor.js.map +1 -0
- package/dist/src/utils/context-formatter.js +205 -0
- package/dist/src/utils/context-formatter.js.map +1 -0
- package/dist/src/utils/error-page.js +19 -0
- package/dist/src/utils/error-page.js.map +1 -0
- package/dist/src/utils/expandable.js +35 -0
- package/dist/src/utils/expandable.js.map +1 -0
- package/dist/src/utils/hooks-runner.js +77 -0
- package/dist/src/utils/hooks-runner.js.map +1 -0
- package/dist/src/utils/html-diff.js +734 -0
- package/dist/src/utils/html-diff.js.map +1 -0
- package/dist/src/utils/html.js +1163 -0
- package/dist/src/utils/html.js.map +1 -0
- package/dist/src/utils/logger.js +465 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/dist/src/utils/loop.js +126 -0
- package/dist/src/utils/loop.js.map +1 -0
- package/dist/src/utils/markdown-parser.js +117 -0
- package/dist/src/utils/markdown-parser.js.map +1 -0
- package/dist/src/utils/markdown-query.js +393 -0
- package/dist/src/utils/markdown-query.js.map +1 -0
- package/dist/src/utils/markdown-terminal.js +40 -0
- package/dist/src/utils/markdown-terminal.js.map +1 -0
- package/dist/src/utils/research-parser.js +2 -0
- package/dist/src/utils/research-parser.js.map +1 -0
- package/dist/src/utils/retry.js +55 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/utils/rules-loader.js +104 -0
- package/dist/src/utils/rules-loader.js.map +1 -0
- package/dist/src/utils/strings.js +14 -0
- package/dist/src/utils/strings.js.map +1 -0
- package/dist/src/utils/test-plan-markdown.js +301 -0
- package/dist/src/utils/test-plan-markdown.js.map +1 -0
- package/dist/src/utils/throttle.js +16 -0
- package/dist/src/utils/throttle.js.map +1 -0
- package/dist/src/utils/unique-names.js +13 -0
- package/dist/src/utils/unique-names.js.map +1 -0
- package/dist/src/utils/url-matcher.js +48 -0
- package/dist/src/utils/url-matcher.js.map +1 -0
- package/dist/src/utils/web-element.js +131 -0
- package/dist/src/utils/web-element.js.map +1 -0
- package/dist/src/utils/xpath.js +110 -0
- package/dist/src/utils/xpath.js.map +1 -0
- package/package.json +119 -0
- package/prompts/audit-rules.md +124 -0
- package/rules/chief/general.md +11 -0
- package/rules/chief/styles/curious.md +12 -0
- package/rules/chief/styles/hacker.md +19 -0
- package/rules/chief/styles/normal.md +11 -0
- package/rules/chief/styles/psycho.md +17 -0
- package/rules/navigator/multiple-locator.md +47 -0
- package/rules/navigator/output.md +69 -0
- package/rules/navigator/verification-actions.md +122 -0
- package/rules/navigator/verification-output.md +53 -0
- package/rules/planner/styles/curious.md +39 -0
- package/rules/planner/styles/normal.md +21 -0
- package/rules/planner/styles/psycho.md +14 -0
- package/rules/researcher/list-element.md +11 -0
- package/rules/researcher/screenshot-ui-map.md +30 -0
- package/rules/researcher/section-ui-map.md +18 -0
- package/rules/researcher/ui-map-table.md +18 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
You will need to provide multiple solutions to achieve the result.
|
|
2
|
+
|
|
3
|
+
<short_vs_long_locators>
|
|
4
|
+
Short locators = minimal selector that uniquely identifies the element
|
|
5
|
+
- ARIA and Text locators are always short: { "role": "button", "text": "Submit" }, 'Login'
|
|
6
|
+
- Short CSS: #email, [data-testid="submit"]
|
|
7
|
+
|
|
8
|
+
Long locators = add ancestor context for resilience
|
|
9
|
+
- CSS with ancestors: form#login #email, .modal .form input[name="email"]
|
|
10
|
+
- XPath with path: //form[@id="login"]//input[@name="email"]
|
|
11
|
+
- Full path to body (lowest priority): //html/body//div[@id="app"]//form//input[@name="email"]
|
|
12
|
+
</short_vs_long_locators>
|
|
13
|
+
|
|
14
|
+
When container is available, text + container is simplest and preferred over complex locators.
|
|
15
|
+
|
|
16
|
+
Start with short locators (ARIA/Text first), then progressively try longer CSS/XPath.
|
|
17
|
+
Long locators with full path are lowest priority but should still be tried as fallback.
|
|
18
|
+
|
|
19
|
+
Be specific about locators, check if multiple elements can be selected by the same locator.
|
|
20
|
+
Each new solution should add ancestor context, stepping up the hierarchy.
|
|
21
|
+
When suggesting XPath, do not repeat the same CSS locator and vice versa.
|
|
22
|
+
|
|
23
|
+
Do not include comments into code blocks.
|
|
24
|
+
|
|
25
|
+
<bad_locator_example>
|
|
26
|
+
Suggestion 1:
|
|
27
|
+
#user_email
|
|
28
|
+
|
|
29
|
+
Suggestion 2: (is the same as suggestion 1)
|
|
30
|
+
//*[@id="user_email"]
|
|
31
|
+
</bad_locator_example>
|
|
32
|
+
|
|
33
|
+
<good_locator_example>
|
|
34
|
+
Suggestion 1 (short - ARIA):
|
|
35
|
+
{ "role": "textbox", "text": "Email" }
|
|
36
|
+
|
|
37
|
+
Suggestion 2 (short - CSS):
|
|
38
|
+
#user_email
|
|
39
|
+
|
|
40
|
+
Suggestion 3 (long - CSS with ancestor):
|
|
41
|
+
#user_form #user_email
|
|
42
|
+
|
|
43
|
+
Suggestion 4 (long - XPath with full path):
|
|
44
|
+
//html/body//form[@id="user_form"]//input[@id="user_email"]
|
|
45
|
+
</good_locator_example>
|
|
46
|
+
|
|
47
|
+
Solutions should be different, do not repeat the same locator in different solutions.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<rules>
|
|
2
|
+
Do not invent locators, focus only on locators from HTML PAGE.
|
|
3
|
+
Provide up to {{maxAttempts}} various code suggestions to achieve the result.
|
|
4
|
+
If there was already successful solution in <experience> use it as a first solution.
|
|
5
|
+
|
|
6
|
+
If no successful solution was found in <experience> propose codeblocks for each area that can help to achieve the result.
|
|
7
|
+
Do not stick only to the first found element as it might be hidden or not availble on the page.
|
|
8
|
+
If you think HTML contains several areas that can help to achieve the result, propose codeblocks for each such area.
|
|
9
|
+
Use exact locators that can pick the elements from each areas.
|
|
10
|
+
Detect such duplicated areas by looking for duplicate IDs, data-ids, forms, etc.
|
|
11
|
+
|
|
12
|
+
In <explanation> write only one line without heading or bullet list or any other formatting.
|
|
13
|
+
Check previous solutions, if there is already successful solution, use it!
|
|
14
|
+
CodeceptJS code must start with "I."
|
|
15
|
+
All lines of code must be CodeceptJS code and start with "I."
|
|
16
|
+
</rules>
|
|
17
|
+
|
|
18
|
+
<output>
|
|
19
|
+
Your response must start explanation of what you are going to do to achive the result
|
|
20
|
+
It is important to explain intention before proposing code.
|
|
21
|
+
Response must also valid CodeceptJS code in code blocks.
|
|
22
|
+
Propose codeblock from successful solutions in <experience> first if they exist.
|
|
23
|
+
Use only locators from HTML PAGE that was passed in <page> context.
|
|
24
|
+
</output>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<output_format>
|
|
28
|
+
<explanation>
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
<code>
|
|
32
|
+
```
|
|
33
|
+
</code>
|
|
34
|
+
<code>
|
|
35
|
+
```
|
|
36
|
+
</code>
|
|
37
|
+
<code>
|
|
38
|
+
```
|
|
39
|
+
</code>
|
|
40
|
+
</output_format>
|
|
41
|
+
|
|
42
|
+
<example_output>
|
|
43
|
+
Trying to fill the form on the page
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
I.fillField('Name', 'Value');
|
|
47
|
+
I.click('Submit');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
I.fillField('//form/input[@name="name"]', 'Value');
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
I.fillField('#app .form input[name="name"]', 'Value');
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
I.fillField('/html/body/div/div/div/form/input[@name="name"]', 'Value');
|
|
60
|
+
```
|
|
61
|
+
</example_output>
|
|
62
|
+
|
|
63
|
+
If you don't know the answer, answer as:
|
|
64
|
+
|
|
65
|
+
<example_output>
|
|
66
|
+
```js
|
|
67
|
+
throw new Error('No resolution');
|
|
68
|
+
```
|
|
69
|
+
</example_output>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<actions>
|
|
2
|
+
### I.see
|
|
3
|
+
|
|
4
|
+
I.see(<text>, <context>)
|
|
5
|
+
|
|
6
|
+
Checks that text is visible inside a specific element.
|
|
7
|
+
Context parameter is REQUIRED - never use I.see without context.
|
|
8
|
+
|
|
9
|
+
<example>
|
|
10
|
+
I.see('Welcome', '.message');
|
|
11
|
+
I.see('Welcome', '#header');
|
|
12
|
+
I.see('Success', '.notification');
|
|
13
|
+
</example>
|
|
14
|
+
|
|
15
|
+
### I.seeElement
|
|
16
|
+
|
|
17
|
+
I.seeElement(<locator>)
|
|
18
|
+
|
|
19
|
+
Checks that element is present on the page.
|
|
20
|
+
Prefer ARIA locators for reliable element detection.
|
|
21
|
+
|
|
22
|
+
<example>
|
|
23
|
+
I.seeElement({"role":"button","text":"Submit"});
|
|
24
|
+
I.seeElement({"role":"alert","text":"Success"});
|
|
25
|
+
I.seeElement('#submit-button');
|
|
26
|
+
I.seeElement('.success-message');
|
|
27
|
+
</example>
|
|
28
|
+
|
|
29
|
+
### I.seeInField
|
|
30
|
+
|
|
31
|
+
I.seeInField(<locator>, <value>, <context>)
|
|
32
|
+
|
|
33
|
+
Checks that an input field contains the expected value.
|
|
34
|
+
Use for verifying text inputs, search fields, textareas, and any form field values.
|
|
35
|
+
This is the ONLY reliable way to check input values — do NOT use I.seeElement with [value=...] or I.seeInSource.
|
|
36
|
+
|
|
37
|
+
<example>
|
|
38
|
+
I.seeInField('Email', 'john@example.com', '.profile-form');
|
|
39
|
+
I.seeInField('Search', 'nightwatch');
|
|
40
|
+
I.seeInField('input[name="search"]', 'test query');
|
|
41
|
+
</example>
|
|
42
|
+
|
|
43
|
+
### I.seeInTitle
|
|
44
|
+
|
|
45
|
+
I.seeInTitle(<text>)
|
|
46
|
+
|
|
47
|
+
Checks that page title contains expected text.
|
|
48
|
+
|
|
49
|
+
<example>
|
|
50
|
+
I.seeInTitle('Dashboard');
|
|
51
|
+
</example>
|
|
52
|
+
|
|
53
|
+
### I.seeInSource
|
|
54
|
+
|
|
55
|
+
I.seeInSource(<text>)
|
|
56
|
+
|
|
57
|
+
Checks that page source contains expected text (including hidden elements).
|
|
58
|
+
|
|
59
|
+
<example>
|
|
60
|
+
I.seeInSource('<div class="hidden">');
|
|
61
|
+
</example>
|
|
62
|
+
|
|
63
|
+
### I.dontSee
|
|
64
|
+
|
|
65
|
+
I.dontSee(<text>, <context>)
|
|
66
|
+
|
|
67
|
+
Checks that text is NOT visible inside a specific element.
|
|
68
|
+
Context parameter is REQUIRED - never use I.dontSee without context.
|
|
69
|
+
|
|
70
|
+
<example>
|
|
71
|
+
I.dontSee('Error', '.alert');
|
|
72
|
+
I.dontSee('Failed', '.status');
|
|
73
|
+
</example>
|
|
74
|
+
|
|
75
|
+
### I.dontSeeElement
|
|
76
|
+
|
|
77
|
+
I.dontSeeElement(<locator>)
|
|
78
|
+
|
|
79
|
+
Checks that element is NOT present on the page.
|
|
80
|
+
|
|
81
|
+
<example>
|
|
82
|
+
I.dontSeeElement('#error-message');
|
|
83
|
+
I.dontSeeElement({"role":"alert","text":"Error"});
|
|
84
|
+
</example>
|
|
85
|
+
|
|
86
|
+
### I.dontSeeInField
|
|
87
|
+
|
|
88
|
+
I.dontSeeInField(<locator>, <value>, <context>)
|
|
89
|
+
|
|
90
|
+
Checks that an input field does NOT contain the specified value.
|
|
91
|
+
|
|
92
|
+
<example>
|
|
93
|
+
I.dontSeeInField('Password', '', '.login-form');
|
|
94
|
+
I.dontSeeInField('Search', 'old query');
|
|
95
|
+
I.dontSeeInField('Email', '');
|
|
96
|
+
</example>
|
|
97
|
+
|
|
98
|
+
### I.dontSeeInSource
|
|
99
|
+
|
|
100
|
+
I.dontSeeInSource(<text>)
|
|
101
|
+
|
|
102
|
+
Checks that page source does NOT contain expected text.
|
|
103
|
+
|
|
104
|
+
<example>
|
|
105
|
+
I.dontSeeInSource('error-class');
|
|
106
|
+
</example>
|
|
107
|
+
|
|
108
|
+
<verification_rules>
|
|
109
|
+
Be strict in assertions to avoid false positives.
|
|
110
|
+
Prefer I.seeElement() with ARIA locators - most reliable.
|
|
111
|
+
I.see() and I.dontSee() MUST include context parameter.
|
|
112
|
+
For input field values, ALWAYS use I.seeInField() — never check value via CSS attribute selectors or I.seeInSource.
|
|
113
|
+
Prefer text locators (label, name, placeholder) for form fields: I.seeInField('Search', 'value') over I.seeInField('input[name="search"]', 'value').
|
|
114
|
+
Only use locators that exist in the provided HTML or ARIA snapshot.
|
|
115
|
+
Verify exact conditions, not approximate matches.
|
|
116
|
+
</verification_rules>
|
|
117
|
+
|
|
118
|
+
[DO NEVER USE OTHER CODECEPTJS COMMANDS THAN PROPOSED HERE]
|
|
119
|
+
[INTERACT ONLY WITH ELEMENTS THAT ARE ON THE PAGE HTML OR ARIA SNAPSHOT]
|
|
120
|
+
[DO NOT USE WAIT FUNCTIONS]
|
|
121
|
+
|
|
122
|
+
</actions>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<rules>
|
|
2
|
+
Do not invent locators, focus only on locators from HTML PAGE.
|
|
3
|
+
Provide up to {{maxAttempts}} various code suggestions to verify the assertion.
|
|
4
|
+
If there was already successful solution in <experience> use it as a first solution.
|
|
5
|
+
|
|
6
|
+
Propose codeblocks with different locator strategies to verify the same assertion.
|
|
7
|
+
Use exact locators from the HTML page.
|
|
8
|
+
|
|
9
|
+
In <explanation> write only one line without heading or bullet list or any other formatting.
|
|
10
|
+
CodeceptJS code must start with "I."
|
|
11
|
+
</rules>
|
|
12
|
+
|
|
13
|
+
<output>
|
|
14
|
+
Your response must start with explanation of what assertion you are going to verify.
|
|
15
|
+
It is important to explain intention before proposing code.
|
|
16
|
+
Response must contain valid CodeceptJS verification code in code blocks.
|
|
17
|
+
Use only locators from HTML PAGE that was passed in <page> context.
|
|
18
|
+
</output>
|
|
19
|
+
|
|
20
|
+
<output_format>
|
|
21
|
+
<explanation>
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
<code>
|
|
25
|
+
```
|
|
26
|
+
</code>
|
|
27
|
+
<code>
|
|
28
|
+
```
|
|
29
|
+
</code>
|
|
30
|
+
<code>
|
|
31
|
+
```
|
|
32
|
+
</code>
|
|
33
|
+
</output_format>
|
|
34
|
+
|
|
35
|
+
<example_output>
|
|
36
|
+
Verifying that welcome message is visible on the page
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
I.seeElement({"role":"heading","text":"Welcome"});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
I.see('Welcome', '.message');
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
I.see('Welcome', '#welcome-container');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
I.seeElement('.welcome-message');
|
|
52
|
+
```
|
|
53
|
+
</example_output>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Detect new valid paths that previous tests missed. Prioritize mining experience and research together before inventing abstract scenarios.
|
|
2
|
+
|
|
3
|
+
When <previously_tested_flows> is present, treat it as the ground truth for what already worked:
|
|
4
|
+
- List items under Successful Flow describe the path that was executed
|
|
5
|
+
- Lines in blockquotes (lines starting with >) are discoveries: extra fields, side panels, conditional UI, inputs called out during that run
|
|
6
|
+
Infer what was never tried or only partially exercised from that material.
|
|
7
|
+
DO NOT re-propose these flows or reword them into new scenarios. They are already covered.
|
|
8
|
+
Instead, use the discoveries (lines starting with >) as leads for NEW tests around elements that were revealed but never interacted with.
|
|
9
|
+
|
|
10
|
+
When <previously_tested_flows> is NOT present, use <tested_scenarios> as the ground truth instead.
|
|
11
|
+
Read the step lines for each test to understand which controls were actually interacted with.
|
|
12
|
+
Identify elements from <page_research> that appear in NO test steps — these are coverage gaps.
|
|
13
|
+
|
|
14
|
+
Cross-read with <page_research>: for each form and Extended Research subsection, compare against those flows. Which text inputs, selects, checkboxes, toggles, and side controls were skipped or touched once with a single value? Prefer filling those gaps over repeating the same path.
|
|
15
|
+
|
|
16
|
+
The Type column in <page_research> tables shows the ARIA role of each element.
|
|
17
|
+
Cross-reference these types with the steps listed in <tested_scenarios> or <previously_tested_flows>:
|
|
18
|
+
|
|
19
|
+
Coverage gaps to look for:
|
|
20
|
+
- Input controls (textbox, textarea, spinbutton) that were never filled, or only filled with one kind of value
|
|
21
|
+
- Selection controls (combobox, listbox, radio group) where only one option was ever chosen
|
|
22
|
+
- Toggle controls (checkbox, switch) that were never toggled, or only tested in one state
|
|
23
|
+
- Expandable sections, disclosure widgets, accordions that were never opened
|
|
24
|
+
- Action buttons that were never clicked as part of a complete workflow
|
|
25
|
+
- Dependent UI: controls that appear or change based on another control's value
|
|
26
|
+
|
|
27
|
+
When proposing tests for forms, prefer filling ALL visible fields — not just required ones.
|
|
28
|
+
Vary input strategies: try short values, multi-word values, edge-of-valid values.
|
|
29
|
+
When a form has sections, tabs, or conditional panels, propose tests that exercise each section.
|
|
30
|
+
If a control has downstream effects (e.g., selecting a type reveals extra fields), build a test around that interaction chain.
|
|
31
|
+
|
|
32
|
+
Combinatorial coverage (valid data only):
|
|
33
|
+
- For each select or equivalent, ensure each option is exercised in at least one scenario, or one scenario whose steps walk through distinct options in sequence if that fits the task constraints better
|
|
34
|
+
- Exercise each checkbox or binary control in both states when behavior can differ
|
|
35
|
+
- Combine checkboxes and related toggles in small sets (pairs or triples) when they plausibly change validation, visible sections, or outcomes — avoid exploding into huge Cartesian products
|
|
36
|
+
|
|
37
|
+
When heavy forms are not the focus, still pursue: unvisited state transitions, follow-ups after creates (share, export, duplicate), alternative routes to the same goal, preconditions that unlock UI, and visible controls never clicked.
|
|
38
|
+
|
|
39
|
+
Skip the Menu/Navigation section — we are testing THIS page.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Study the page and figure out its business purpose. What is this page FOR? What would a user come here to do?
|
|
2
|
+
|
|
3
|
+
Based on the page type, propose tests for COMPLETE user workflows:
|
|
4
|
+
- If this is a data page (lists, tables): test CRUD operations end-to-end (create item → verify in list, edit item → verify changes saved, delete item → verify removed)
|
|
5
|
+
- If this is a form page: test full submission flow, not just "form appears"
|
|
6
|
+
- If this has filters and search: test filtering AND verify results change, not just "filter tab clicked"
|
|
7
|
+
- If this has modals/dropdowns: test the ACTION inside them, not just opening/closing them
|
|
8
|
+
|
|
9
|
+
Each test should end with the application in a different state than it started.
|
|
10
|
+
|
|
11
|
+
IMPORTANT: Distribute tests across DIFFERENT feature areas from the research.
|
|
12
|
+
Do not propose more than 2 tests for the same feature area.
|
|
13
|
+
Every Extended Research section (modal, dropdown, panel) with actionable features deserves at least one test.
|
|
14
|
+
Tests that change application data MUST come first — create, update, delete records before testing filters, search, or pagination. You are aiming to change application state.
|
|
15
|
+
If the research shows multiple ways to create or modify data (different types, forms, or options), propose a separate test for each.
|
|
16
|
+
View only tests (tab switching, pagination, view toggles) should be proposed only after data-changing interactions are covered.
|
|
17
|
+
|
|
18
|
+
Skip the Menu/Navigation section — we are testing THIS page.
|
|
19
|
+
|
|
20
|
+
When <previously_tested_flows> is present, review the successful flows and consider re-testing important ones for regression coverage. Previously tested flows that are not in the current plan are candidates for re-testing.
|
|
21
|
+
Propose variations with different inputs or edge cases when re-testing a known flow.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Stress-test the page by filling invalid, empty, and extreme values into every input.
|
|
2
|
+
|
|
3
|
+
Focus on:
|
|
4
|
+
- Empty states: submit forms with no data, clear required fields, remove default values
|
|
5
|
+
- Long values: paste 10000 characters into inputs, use extremely long names and descriptions
|
|
6
|
+
- Boundary values: zero, negative numbers, special characters, unicode, HTML tags in text fields
|
|
7
|
+
- Invalid formats: wrong email formats, letters in number fields, SQL injection strings, script tags
|
|
8
|
+
- Invalid combinations: select incompatible options, mix conflicting settings
|
|
9
|
+
- Combining states: apply multiple filters at once, use conflicting form values together
|
|
10
|
+
- Out-of-range values: dates in the past/future, quantities beyond limits, prices with too many decimals
|
|
11
|
+
|
|
12
|
+
Push every input to its limits. Find what breaks when the form receives unexpected data.
|
|
13
|
+
|
|
14
|
+
Skip the Menu/Navigation section — we are testing THIS page.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<list_element_indexing>
|
|
2
|
+
When multiple elements share the same structure (e.g., list items, tabs, table rows, menu links):
|
|
3
|
+
Each element MUST have a UNIQUE CSS selector.
|
|
4
|
+
|
|
5
|
+
CSS — use :has-text("text") to disambiguate by visible text content:
|
|
6
|
+
a.filter-tab:has-text("Manual"), a.filter-tab:has-text("Automated")
|
|
7
|
+
a.node-link:has-text("IMR_API_Tests"), a.node-link:has-text("IMR_UI_Tests")
|
|
8
|
+
|
|
9
|
+
NEVER leave multiple elements with identical CSS selectors in the same section.
|
|
10
|
+
Every row in the UI map table must have selectors that match exactly ONE element.
|
|
11
|
+
</list_element_indexing>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<ui_map_rule>
|
|
2
|
+
List UI elements as a markdown table WITH Coordinates, Color, and Icon columns:
|
|
3
|
+
| Element | ARIA | CSS | Coordinates | Color | Icon |
|
|
4
|
+
| 'Save' | { role: 'button', text: 'Save' } | 'button.save' | (400, 300) | green | - |
|
|
5
|
+
| 'Delete' | { role: 'button', text: 'Delete' } | 'button.delete' | (500, 300) | red | trash |
|
|
6
|
+
| 'Settings dropdown' | { role: 'button', text: 'Settings' } | 'button.settings' | (500, 100) | - | down-chevron |
|
|
7
|
+
| 'Menu toggle' | - | 'button.hamburger' | (30, 25) | - | hamburger |
|
|
8
|
+
| 'Add item' | { role: 'button', text: 'Add' } | 'button.add' | (200, 50) | blue | plus |
|
|
9
|
+
| 'Close' | { role: 'button', text: 'Close' } | 'button.close' | (600, 10) | - | x |
|
|
10
|
+
|
|
11
|
+
- ARIA: Valid JSON with role and text keys (NOT "name"): { role: 'button', text: 'Save' }
|
|
12
|
+
* For icon buttons: use aria-label or title attribute value as text
|
|
13
|
+
* If no accessible name exists: use "-" and rely on CSS
|
|
14
|
+
* NEVER use empty text like { role: 'button', text: '' }
|
|
15
|
+
- CSS: Relative to section container, must be unique within section
|
|
16
|
+
- Coordinates: (X, Y) center point when visible on screenshot, "-" when not found
|
|
17
|
+
- Color: accent color ONLY if the element has a distinctive color that differs from the default/majority
|
|
18
|
+
* Use ONLY simple color words: red, green, blue, orange, yellow, purple, gray, white, black
|
|
19
|
+
* NEVER use hex codes (#ff0000), RGB values, or CSS color functions
|
|
20
|
+
* red = danger/delete, green = success/confirm, blue = primary, orange = warning
|
|
21
|
+
* Use "-" when element has no distinctive accent color (same color as other elements)
|
|
22
|
+
* Most elements should be "-" — only highlight elements that stand out visually
|
|
23
|
+
- Icon: one-word description of the visual icon on the element, "-" if no icon
|
|
24
|
+
* For directional icons use direction + shape: down-chevron, down-arrow, right-caret, up-arrow
|
|
25
|
+
* Common icons: plus, x, trash, pencil, gear, search, hamburger, ellipsis, star, check, filter
|
|
26
|
+
* Use "-" for text-only elements with no icon
|
|
27
|
+
|
|
28
|
+
IMPORTANT: Each section must have a blockquote container before the table: > Container: '.css-selector'
|
|
29
|
+
CRITICAL: Coordinates, Color, and Icon columns must be IN the table, NOT in a separate section.
|
|
30
|
+
</ui_map_rule>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<ui_map_rule>
|
|
2
|
+
List UI elements as a markdown table:
|
|
3
|
+
| Element | ARIA | CSS |
|
|
4
|
+
| 'Save' | { role: 'button', text: 'Save' } | 'button.save' |
|
|
5
|
+
| 'Close icon' | { role: 'button', text: 'Close' } | 'button.close-btn' |
|
|
6
|
+
| 'Menu toggle' | - | 'button.hamburger' |
|
|
7
|
+
|
|
8
|
+
Always include ARIA + CSS for each element.
|
|
9
|
+
|
|
10
|
+
- ARIA: Valid JSON with role and text keys (NOT "name"): { role: 'button', text: 'Save' }
|
|
11
|
+
* For icon buttons: use aria-label or title attribute value as text
|
|
12
|
+
* If no accessible name exists: use "-" and rely on CSS
|
|
13
|
+
* NEVER use empty text like { role: 'button', text: '' }
|
|
14
|
+
- CSS: Relative to section container, must be unique within section
|
|
15
|
+
|
|
16
|
+
IMPORTANT: Each section must have a blockquote container before the table: > Container: '.css-selector'
|
|
17
|
+
This container is critical for disambiguation when interacting with elements.
|
|
18
|
+
</ui_map_rule>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<ui_map_table_format>
|
|
2
|
+
ALWAYS use this exact table format for UI elements:
|
|
3
|
+
|
|
4
|
+
| Element | ARIA | CSS | eidx |
|
|
5
|
+
|---------|------|-----|------|
|
|
6
|
+
| 'Save' | { role: 'button', text: 'Save' } | 'button.save' | 5 |
|
|
7
|
+
|
|
8
|
+
Column definitions:
|
|
9
|
+
- Element: Human-readable name of the element
|
|
10
|
+
- ARIA: JSON format { role: '...', text: '...' } - use "text" key, NOT "name"
|
|
11
|
+
- CSS: Unique CSS selector (relative to section container)
|
|
12
|
+
- eidx: Value of the eidx attribute from the HTML element. Use "-" if not present.
|
|
13
|
+
|
|
14
|
+
IMPORTANT: Each section must have a blockquote container before the table: > Container: '.css-selector'
|
|
15
|
+
This container is used for disambiguation when clicking elements.
|
|
16
|
+
|
|
17
|
+
NEVER use different column layouts. This format is required for all UI maps.
|
|
18
|
+
</ui_map_table_format>
|