robotframework-plugins 2026.11.0__py3-none-any.whl

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.
Files changed (199) hide show
  1. robotframework_plugins/__init__.py +14 -0
  2. robotframework_plugins/_assets/catalog.json +143 -0
  3. robotframework_plugins/_assets/plugins/rf-agentskills/.claude-plugin/plugin.json +25 -0
  4. robotframework_plugins/_assets/plugins/rf-agentskills/CHANGELOG.md +198 -0
  5. robotframework_plugins/_assets/plugins/rf-agentskills/README.md +27 -0
  6. robotframework_plugins/_assets/plugins/rf-agentskills/catalog.yaml +25 -0
  7. robotframework_plugins/_assets/plugins/rf-api/.claude-plugin/plugin.json +25 -0
  8. robotframework_plugins/_assets/plugins/rf-api/CHANGELOG.md +9 -0
  9. robotframework_plugins/_assets/plugins/rf-api/README.md +27 -0
  10. robotframework_plugins/_assets/plugins/rf-api/catalog.yaml +27 -0
  11. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/SKILL.md +113 -0
  12. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/authentication-patterns.robot +39 -0
  13. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/basic-crud.robot +46 -0
  14. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/file-upload.robot +28 -0
  15. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/session-handling.robot +48 -0
  16. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/async-jobs.md +42 -0
  17. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/authentication.md +58 -0
  18. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/install.md +10 -0
  19. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/loose-assertions.md +20 -0
  20. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/request-options.md +90 -0
  21. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/response-validation.md +64 -0
  22. robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/troubleshooting.md +64 -0
  23. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/SKILL.md +120 -0
  24. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/basic-rest.robot +51 -0
  25. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schema-validation.robot +38 -0
  26. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schemas/user.json +10 -0
  27. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/authentication.md +61 -0
  28. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/install.md +11 -0
  29. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/json-handling.md +89 -0
  30. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/loose-assertions.md +18 -0
  31. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/migrate-from-requests.md +15 -0
  32. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/schema-validation.md +85 -0
  33. robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/troubleshooting.md +68 -0
  34. robotframework_plugins/_assets/plugins/rf-core/.claude-plugin/plugin.json +19 -0
  35. robotframework_plugins/_assets/plugins/rf-core/CHANGELOG.md +13 -0
  36. robotframework_plugins/_assets/plugins/rf-core/README.md +38 -0
  37. robotframework_plugins/_assets/plugins/rf-core/agents/rf-debug-expert.md +120 -0
  38. robotframework_plugins/_assets/plugins/rf-core/agents/rf-migration-guide.md +73 -0
  39. robotframework_plugins/_assets/plugins/rf-core/agents/rf-test-architect.md +98 -0
  40. robotframework_plugins/_assets/plugins/rf-core/catalog.yaml +19 -0
  41. robotframework_plugins/_assets/plugins/rf-core/hooks/README.md +445 -0
  42. robotframework_plugins/_assets/plugins/rf-core/hooks/hooks.json +70 -0
  43. robotframework_plugins/_assets/plugins/rf-core/scripts/_hook_input.mjs +101 -0
  44. robotframework_plugins/_assets/plugins/rf-core/scripts/_pending_errors.mjs +65 -0
  45. robotframework_plugins/_assets/plugins/rf-core/scripts/_python_env.mjs +181 -0
  46. robotframework_plugins/_assets/plugins/rf-core/scripts/check_rf_environment.mjs +181 -0
  47. robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_inject_rf_context.mjs +74 -0
  48. robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_remind_robot_tests.mjs +128 -0
  49. robotframework_plugins/_assets/plugins/rf-core/scripts/report_pending_errors.mjs +72 -0
  50. robotframework_plugins/_assets/plugins/rf-core/scripts/rf_error_hints.mjs +126 -0
  51. robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot.mjs +517 -0
  52. robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot_project.mjs +103 -0
  53. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/SKILL.md +313 -0
  54. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/api.resource +30 -0
  55. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/calc.resource +23 -0
  56. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/embedded.resource +20 -0
  57. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/keywords.resource +26 -0
  58. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/login.resource +10 -0
  59. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/01__keyword_driven.robot +15 -0
  60. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/02__data_driven.robot +10 -0
  61. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/03__templates.robot +17 -0
  62. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/04__bdd.robot +10 -0
  63. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/05__embedded.robot +13 -0
  64. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/__init__.robot +6 -0
  65. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/__init__.robot +7 -0
  66. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/users.robot +18 -0
  67. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/env.robot +15 -0
  68. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/common.py +11 -0
  69. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/dev.yaml +3 -0
  70. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/staging.yaml +3 -0
  71. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/arguments.md +139 -0
  72. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/control-structures.md +175 -0
  73. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/embedded-arguments.md +135 -0
  74. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/migration.md +90 -0
  75. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/resources-and-variable-files.md +127 -0
  76. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/styles.md +92 -0
  77. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/suites-and-init.md +96 -0
  78. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/tags-and-selection.md +104 -0
  79. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/templates.md +124 -0
  80. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/variables-and-scopes.md +129 -0
  81. robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/scripts/rf_conventions.py +883 -0
  82. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/SKILL.md +216 -0
  83. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ExampleLibrary.py +61 -0
  84. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ResultListener.py +60 -0
  85. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.py +48 -0
  86. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.robot +20 -0
  87. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/example_library.robot +31 -0
  88. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/listener.robot +12 -0
  89. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/api-variants.md +291 -0
  90. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/communication.md +248 -0
  91. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/conversion.md +347 -0
  92. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/listeners.md +150 -0
  93. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/packaging-and-docs.md +155 -0
  94. robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/scripts/check_library.py +842 -0
  95. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/SKILL.md +159 -0
  96. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/github-actions-robot.yml +32 -0
  97. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/gitignore.txt +22 -0
  98. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.poetry.toml +28 -0
  99. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.uv.toml +20 -0
  100. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/requirements.txt +9 -0
  101. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/robot.toml +16 -0
  102. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/smoke.robot +22 -0
  103. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/ci.md +61 -0
  104. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/cli-tools.md +33 -0
  105. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/libraries.md +47 -0
  106. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/poetry.md +77 -0
  107. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/project-layout.md +86 -0
  108. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/troubleshooting.md +73 -0
  109. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/uv.md +108 -0
  110. robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/venv-pip.md +71 -0
  111. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-debug-expert.toml +119 -0
  112. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-migration-guide.toml +72 -0
  113. robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-test-architect.toml +97 -0
  114. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-debug-expert.md +123 -0
  115. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-migration-guide.md +76 -0
  116. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-test-architect.md +101 -0
  117. robotframework_plugins/_assets/plugins/rf-core/variants/opencode/plugins/rf-core.js +93 -0
  118. robotframework_plugins/_assets/plugins/rf-desktop/.claude-plugin/plugin.json +24 -0
  119. robotframework_plugins/_assets/plugins/rf-desktop/CHANGELOG.md +10 -0
  120. robotframework_plugins/_assets/plugins/rf-desktop/README.md +26 -0
  121. robotframework_plugins/_assets/plugins/rf-desktop/catalog.yaml +23 -0
  122. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/SKILL.md +268 -0
  123. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/calculator.robot +45 -0
  124. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/mock-deterministic.robot +33 -0
  125. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/cli-and-inspector.md +82 -0
  126. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/install.md +14 -0
  127. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/keywords-reference.md +102 -0
  128. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/locators-and-queries.md +95 -0
  129. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/platform-setup.md +65 -0
  130. robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/status-and-migration.md +41 -0
  131. robotframework_plugins/_assets/plugins/rf-mobile/.claude-plugin/plugin.json +24 -0
  132. robotframework_plugins/_assets/plugins/rf-mobile/CHANGELOG.md +9 -0
  133. robotframework_plugins/_assets/plugins/rf-mobile/README.md +26 -0
  134. robotframework_plugins/_assets/plugins/rf-mobile/catalog.yaml +23 -0
  135. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/SKILL.md +134 -0
  136. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/android-basic.robot +60 -0
  137. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/gestures-example.robot +59 -0
  138. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/hybrid-app.robot +54 -0
  139. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/ios-basic.robot +48 -0
  140. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/capabilities.md +117 -0
  141. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/gestures-touch.md +84 -0
  142. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/install.md +21 -0
  143. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/locators-mobile.md +74 -0
  144. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/platform-specific.md +105 -0
  145. robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/troubleshooting.md +70 -0
  146. robotframework_plugins/_assets/plugins/rf-web/.claude-plugin/plugin.json +25 -0
  147. robotframework_plugins/_assets/plugins/rf-web/CHANGELOG.md +9 -0
  148. robotframework_plugins/_assets/plugins/rf-web/README.md +27 -0
  149. robotframework_plugins/_assets/plugins/rf-web/catalog.yaml +27 -0
  150. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/SKILL.md +134 -0
  151. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/authentication-flow.robot +34 -0
  152. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/basic-web-test.robot +29 -0
  153. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/form-handling.robot +49 -0
  154. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/iframe-shadow-dom.robot +31 -0
  155. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/assertion-engine.md +79 -0
  156. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/authentication-storage.md +86 -0
  157. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/browser-context-page.md +110 -0
  158. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/downloads-uploads.md +51 -0
  159. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/iframes-shadow-dom.md +67 -0
  160. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/install.md +67 -0
  161. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/locators.md +83 -0
  162. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/migrate-from-selenium.md +22 -0
  163. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/selector-drift.md +29 -0
  164. robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/troubleshooting.md +100 -0
  165. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/SKILL.md +123 -0
  166. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/basic-web-test.robot +64 -0
  167. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/multi-window.robot +55 -0
  168. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/wait-patterns.robot +53 -0
  169. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/browser-setup.md +103 -0
  170. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/frames-windows.md +84 -0
  171. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/install.md +12 -0
  172. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/javascript-execution.md +65 -0
  173. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/locators.md +86 -0
  174. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/troubleshooting.md +122 -0
  175. robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/waiting-strategies.md +84 -0
  176. robotframework_plugins/_assets.py +120 -0
  177. robotframework_plugins/_catalog.py +123 -0
  178. robotframework_plugins/_snapshot.py +320 -0
  179. robotframework_plugins/adapters/__init__.py +53 -0
  180. robotframework_plugins/adapters/_base.py +400 -0
  181. robotframework_plugins/adapters/claude_code.py +312 -0
  182. robotframework_plugins/adapters/claude_desktop.py +129 -0
  183. robotframework_plugins/adapters/codex.py +276 -0
  184. robotframework_plugins/adapters/copilot.py +87 -0
  185. robotframework_plugins/adapters/cursor.py +295 -0
  186. robotframework_plugins/adapters/goose.py +240 -0
  187. robotframework_plugins/adapters/opencode.py +170 -0
  188. robotframework_plugins/bundle.py +85 -0
  189. robotframework_plugins/cli.py +1311 -0
  190. robotframework_plugins/detect.py +121 -0
  191. robotframework_plugins/manifest.py +338 -0
  192. robotframework_plugins/py.typed +0 -0
  193. robotframework_plugins/skillzip.py +39 -0
  194. robotframework_plugins/transforms.py +725 -0
  195. robotframework_plugins-2026.11.0.dist-info/METADATA +198 -0
  196. robotframework_plugins-2026.11.0.dist-info/RECORD +199 -0
  197. robotframework_plugins-2026.11.0.dist-info/WHEEL +4 -0
  198. robotframework_plugins-2026.11.0.dist-info/entry_points.txt +2 -0
  199. robotframework_plugins-2026.11.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,67 @@
1
+ # iframes and Shadow DOM
2
+
3
+ - iframes with >>>
4
+ - Many steps inside one frame
5
+ - Shadow DOM
6
+ - Frames and shadow roots together
7
+ - When the element is still not found
8
+
9
+ ## iframes with >>>
10
+
11
+ Selectors do not cross frame boundaries. `>>>` joins a selector for the frame element (left) with a selector evaluated inside that frame (right); the part directly before `>>>` must select the `<iframe>` itself.
12
+
13
+ ```robotframework
14
+ *** Test Cases ***
15
+ Pay Inside Iframe
16
+ Fill Text iframe[name="payment"] >>> input#card 4242424242424242
17
+ Click iframe[name="payment"] >>> button[type="submit"]
18
+ Get Text iframe#outer >>> iframe#inner >>> .status == Paid
19
+ ```
20
+
21
+ Nested frames chain `>>>` once per level. Element references from `Get Element` cannot be used to pierce frames.
22
+
23
+ ## Many steps inside one frame
24
+
25
+ `Set Selector Prefix` prepends a selector to every following selector, which works like entering a frame:
26
+
27
+ ```robotframework
28
+ *** Test Cases ***
29
+ Editor In Frame
30
+ ${old}= Set Selector Prefix iframe#editor >>>
31
+ Fill Text body Hello
32
+ Get Text body == Hello
33
+ Set Selector Prefix ${old}
34
+ ```
35
+
36
+ Restore the previous prefix afterwards; the prefix also applies to selectors outside the frame until then.
37
+
38
+ ## Shadow DOM
39
+
40
+ The CSS engine (the default) and `text=` pierce open shadow roots automatically, so `css=my-card button.buy` finds a button inside `<my-card>`'s shadow tree without any special syntax. XPath does not pierce shadow roots, and closed shadow roots are not reachable at all.
41
+
42
+ ```robotframework
43
+ *** Test Cases ***
44
+ Web Component
45
+ Click my-login >> input[name="user"]
46
+ Fill Text my-login input[name="user"] demo
47
+ Get Text my-toast .message == Saved
48
+ ```
49
+
50
+ ## Frames and shadow roots together
51
+
52
+ Combine both rules: `>>>` for each frame boundary, plain CSS for shadow roots inside it.
53
+
54
+ ```robotframework
55
+ *** Test Cases ***
56
+ Component In Frame
57
+ Click iframe#app >>> my-dialog button.confirm
58
+ ```
59
+
60
+ ## When the element is still not found
61
+
62
+ | Symptom | Cause | Fix |
63
+ |---|---|---|
64
+ | Timeout on a selector that works in DevTools | element is in an iframe | add `iframe-selector >>>` before it |
65
+ | XPath finds nothing inside a component | XPath does not pierce shadow roots | use CSS or `text=` |
66
+ | A selector with `>>>` times out | the part before `>>>` does not match the `<iframe>` element | select the `<iframe>` element itself, not a wrapper |
67
+ | Works once, then fails | frame reloads and its content is replaced | select through `>>>` each time; don't keep element references |
@@ -0,0 +1,67 @@
1
+ # Installing Browser Library
2
+
3
+ Commands are in uv form. For a new environment, Poetry and venv + pip forms, and the general troubleshooting (wrong interpreter, PEP 668, old Python), see `rf-setup` (plugin `rf-core`): `uv add <pkg>` is `poetry add <pkg>` (pip alternative: `.venv/bin/python -m pip install <pkg>`), and `uv run <cmd>` is `poetry run <cmd>` or `.venv/bin/<cmd>`. Versions and floors checked on PyPI 2026-09-26.
4
+
5
+ Package `robotframework-browser` (20.x, Python ≥ 3.10). Module `Browser`. There are two ways to install it; both are verified.
6
+
7
+ ## A. Without Node.js (recommended for agents): BrowserBatteries
8
+
9
+ ```bash
10
+ uv add "robotframework-browser[bb]"
11
+ uv run rfbrowser install chromium # ~115 MiB; omit "chromium" to get chromium, firefox and webkit (~700 MB)
12
+ ```
13
+
14
+ The `[bb]` extra pulls `robotframework-browser-batteries`, which ships prebuilt Node binaries and dependencies. It may not exist for every OS/CPU. If the install finds no matching wheel, use B.
15
+
16
+ ## B. With Node.js
17
+
18
+ ```bash
19
+ node --version # Node 22, 24 or 26 LTS
20
+ uv add robotframework-browser
21
+ uv run rfbrowser init chromium # installs the node dependencies + chromium
22
+ ```
23
+
24
+ - Use `rfbrowser install` **only** with `[bb]`, and `rfbrowser init` **only** on the Node.js path. Don't mix them.
25
+ - If `rfbrowser` is not found: `uv run python -m Browser.entry install chromium` (`[bb]`), or `uv run python -m Browser.entry init chromium` on the Node.js path.
26
+ - Node 26 with npm 12 blocks post-install scripts. After the Node.js-path `rfbrowser init`, run `npm approve-scripts --allow-scripts-pending`, review the list, approve the packages, and run the Node.js-path init again.
27
+ - `--skip-browsers` skips the browser download when you manage Playwright browsers yourself.
28
+
29
+ Browser binaries are stored **inside the environment** (`site-packages/Browser/wrapper/…`). A new venv, or `uv sync` into a fresh `.venv`, needs the install step again. Run it again after upgrading Browser too.
30
+
31
+ ## Verify
32
+
33
+ ```bash
34
+ uv run robot --outputdir results tests/browser_smoke.robot
35
+ ```
36
+
37
+ ```robotframework
38
+ *** Settings ***
39
+ Library Browser
40
+
41
+ *** Test Cases ***
42
+ Browser Opens A Page
43
+ New Browser chromium headless=True
44
+ New Page data:text/html,<h1>ok</h1>
45
+ Get Text h1 == ok
46
+ ```
47
+
48
+ ## `rfbrowser` not found, or Browser not initialised
49
+
50
+ **Symptom:** `rfbrowser: command not found`, or tests fail with `Could not connect to the playwright process`, `Executable doesn't exist at …/chromium…`, or `Browser library … node dependencies are not installed`.
51
+ **Cause:** `rfbrowser` lives in the project environment's scripts folder and isn't on PATH, or the post-install step never ran for this environment (a fresh `.venv` has no browsers).
52
+ **Fix:** run it through the environment: `uv run rfbrowser install chromium` with `[bb]`. On the Node.js path, `uv run rfbrowser init chromium`. Fallback: `uv run python -m Browser.entry install chromium`.
53
+
54
+ ## In CI
55
+
56
+ Add the browser step after `uv sync --locked` (GitHub Actions; `--with-deps` installs the OS libraries):
57
+
58
+ ```yaml
59
+ - name: Install Playwright browser (Browser[bb])
60
+ run: uv run rfbrowser install chromium --with-deps
61
+ ```
62
+
63
+ On the Node.js path, install Node first and run the Node.js-path init: `uv run rfbrowser init chromium`.
64
+
65
+ The browser binaries live inside `.venv`, so every job installs them; the uv cache doesn't cover them. For containers, the Browser project publishes images with browsers preinstalled (`ghcr.io/marketsquare/robotframework-browser/rfbrowser-stable`).
66
+
67
+ Add `playwright-log.txt` and `browser/` to `.gitignore`.
@@ -0,0 +1,83 @@
1
+ # Selectors
2
+
3
+ - Strategies and implicit rules
4
+ - Test ids and roles
5
+ - Chaining with >>
6
+ - Filters: nth, visible, has
7
+ - Strict mode
8
+ - Keeping selectors in variables
9
+ - Finding a selector
10
+
11
+ ## Strategies and implicit rules
12
+
13
+ | Selector | Meaning |
14
+ |---|---|
15
+ | `css=.cart li`, or no prefix | CSS (the default); pierces open shadow roots |
16
+ | `xpath=//button` or starting with `//` / `..` | XPath; does not pierce shadow roots |
17
+ | `text=Save` | case-insensitive substring of the visible text, whitespace trimmed |
18
+ | `"Save it"` or `text="Save it"` | exact text match |
19
+ | `text=/^Save.*$/i` | regular expression |
20
+ | `id=login` | `[id="login"]` |
21
+
22
+ A cell that starts with `#` is a comment in Robot Framework, so `#login` silently disappears. Write `id=login` or `\#login`.
23
+
24
+ ## Test ids and roles
25
+
26
+ ```robotframework
27
+ *** Test Cases ***
28
+ Stable Selectors
29
+ Click data-testid=save
30
+ Click role=button[name="Save"]
31
+ Fill Text role=textbox[name="Email"] user@example.com
32
+ ```
33
+
34
+ `data-testid=`, `data-test-id=` and `data-test=` are shorthands for the attribute selectors. Role selectors follow the accessible name, so they survive markup changes that keep the label.
35
+
36
+ ## Chaining with >>
37
+
38
+ `>>` runs the right-hand selector inside each match of the left-hand one, and the parts can mix strategies:
39
+
40
+ ```robotframework
41
+ *** Test Cases ***
42
+ Chained Selectors
43
+ Click .cart >> text=Remove >> nth=0
44
+ Get Text xpath=//table >> css=tr:nth-child(2) >> td == 42
45
+ Get Text *css=article >> text=Hello contains Hello
46
+ ```
47
+
48
+ The `*` marks which part is returned: `*css=article >> text=Hello` returns the article that contains "Hello", not the text node. `>>>` is different: it enters an iframe.
49
+
50
+ ## Filters: nth, visible, has
51
+
52
+ | Need | Selector |
53
+ |---|---|
54
+ | First / last / n-th match (0-based) | `li >> nth=0`, `li >> nth=-1`, `li >> nth=2` |
55
+ | Only visible matches | `.msg >> visible=true` |
56
+ | Parent that contains a child | `li:has(span:text-is("Pear")) >> button` |
57
+ | Element with text | `button:has-text("Save")`, `span:text-is("Pear")` (exact) |
58
+
59
+ ## Strict mode
60
+
61
+ With the default `strict=True`, a keyword that works on one element fails with `strict mode violation: … resolved to N elements` when the selector matches several. Fix the selector (filters above) rather than calling `Set Strict Mode False`; keywords documented as working on many elements (`Get Element Count`, `Get Elements`) are not affected.
62
+
63
+ ## Keeping selectors in variables
64
+
65
+ ```robotframework
66
+ *** Variables ***
67
+ ${SAVE} data-testid=save
68
+ ${ROW} css=tr:has(td:text-is("{name}"))
69
+
70
+ *** Keywords ***
71
+ Row For
72
+ [Arguments] ${name}
73
+ ${selector}= Evaluate $ROW.format(name=$name)
74
+ RETURN ${selector}
75
+ ```
76
+
77
+ `Get Element` returns a reference that re-queries the page on each use and can prefix a chain: `Click ${ref} >> .child`.
78
+
79
+ ## Finding a selector
80
+
81
+ - `Record Selector` opens an interactive picker (headed browser) and returns a selector.
82
+ - `Highlight Elements li duration=3s` shows what a selector matches.
83
+ - `Get Element Count <selector>` tells you whether it matches zero, one or many.
@@ -0,0 +1,22 @@
1
+ # Migrating from SeleniumLibrary to Browser
2
+
3
+ A keyword map for moving suites from SeleniumLibrary to Browser Library. Verify each replacement with `robotcode doc keyword <Library> "<Keyword>"` before you use it; argument orders differ.
4
+
5
+ | SeleniumLibrary | Browser | Note |
6
+ |---|---|---|
7
+ | `Open Browser ${URL} chrome` | `New Browser chromium` + `New Page ${URL}` | browser → context → page |
8
+ | `Close All Browsers` | `Close Browser ALL` | |
9
+ | `Input Text` / `Input Password` | `Fill Text` / `Fill Secret` | `Fill Secret` takes `$var` |
10
+ | `Click Element css=x` | `Click x` | CSS is the default strategy |
11
+ | `Wait Until Element Is Visible` | usually none (auto-wait), else `Wait For Elements State x visible` | |
12
+ | `Wait Until Page Contains t` | `Get Text sel contains t` | assertion engine |
13
+ | `Select From List By Value` | `Select Options By sel value v` | argument order |
14
+ | `Get Value id=x` | `Get Property id=x value` | |
15
+ | `Execute Javascript` | `Evaluate JavaScript` | |
16
+ | `Select Frame id=x` | selector `id=x >>> inner` | no frame switching |
17
+ | `Capture Page Screenshot` | `Take Screenshot` | |
18
+
19
+ Phases: import both libraries during the transition, move shared login and navigation
20
+ keywords first, then suites one by one, and remove the SeleniumLibrary import last.
21
+
22
+ After each file, check it with `robotcode analyze code` and run the affected tests by longname (`robotcode robot -bl "<Suite.Test>"`). The `rf-migration-guide` subagent (plugin `rf-core`) runs the phased migration and reports each file as migrated or unverified.
@@ -0,0 +1,29 @@
1
+ # Selector drift and flaky UI tests
2
+
3
+ Use this when a UI test fails because an element is not found, is hidden or has moved, or passes on some runs and fails on others.
4
+
5
+ ## Decide what changed
6
+
7
+ 1. Read the failing step. A locator that matches nothing points at the selector or the page. A timeout on an element that is visible in the log points at timing.
8
+ 2. Measure before any rerun. Read the element's position and size with `Get BoundingBox` twice, a short time apart, and check whether an animation runs on it.
9
+ 3. Rerun only after you know what changed. Running unchanged code again only shows that the result is unstable. The one exception is the three-run flakiness check in "New and flaky tests" below.
10
+ 4. Decide who owns the cause:
11
+ - the test: the selector is too weak, or the test does not wait for the state it needs;
12
+ - the app: the element is missing, has moved or shows the wrong content.
13
+
14
+ Only the app case becomes a defect report.
15
+
16
+ ## Pick a locator that survives a redesign
17
+
18
+ - Prefer, in order: test ids (`[data-testid="save"]`), accessible roles (`role=button[name="Save"]`), short CSS, text (`text=Save`), XPath last. This is the order in `SKILL.md`.
19
+ - Check the match count with an operator in the getter, for example `Get Element Count role=button[name="Save"] == 1`.
20
+ - Avoid long CSS paths and `nth-child` chains. They break when the markup changes.
21
+
22
+ ## Elements outside the viewport and menus
23
+
24
+ - A design-library menu can close when the page scrolls. Scroll the trigger into view first with `Scroll To Element`, then open the menu and click the option with no scroll in between.
25
+
26
+ ## New and flaky tests
27
+
28
+ - To decide whether one failing test is flaky or a real defect, rerun that test three times with no code change. A test that passes on some runs and fails on others is flaky; one that fails every run points at the selector or the app.
29
+ - Quarantine a flaky test with a tag and a tracked issue. Do not add retries or longer timeouts to hide the cause.
@@ -0,0 +1,100 @@
1
+ # Troubleshooting
2
+
3
+ Each section starts from the error text or symptom, then gives the cause and the fix. Environment problems (wrong interpreter, library not importable, `robot` not found, PEP 668 errors) are covered by **rf-setup** (plugin rf-core).
4
+
5
+ - strict mode violation: selector resolved to N elements
6
+ - TimeoutError … waiting for locator
7
+ - … intercepts pointer events
8
+ - Assertion fails although the page shows the value
9
+ - Getter asserts before the page updates
10
+ - Wait For Response never matches
11
+ - Direct assignment of values or variables is not allowed
12
+ - Keyword works locally, fails in CI
13
+ - rfbrowser command not found
14
+ - Browser binaries missing after a new venv or an upgrade
15
+ - Node.js path (without bb)
16
+
17
+ ## strict mode violation: selector resolved to N elements
18
+
19
+ Cause: the import default `strict=True` makes single-element keywords fail when the selector matches several elements. Fix: make the selector unique (`data-testid=`, `:has()`, `>> nth=0`, `>> visible=true`); see the selector filters. Use `Set Strict Mode False` only for a scope that really has duplicates.
20
+
21
+ ## TimeoutError … waiting for locator
22
+
23
+ Message: `TimeoutError: locator.click: Timeout 10000ms exceeded.` followed by `waiting for locator('…')` and nothing resolved.
24
+
25
+ | Cause | Fix |
26
+ |---|---|
27
+ | The element is inside an iframe | prefix the selector with `<iframe selector> >>>` |
28
+ | The element is in a closed shadow root or the selector is XPath inside a component | use CSS or `text=` (they pierce open shadow roots) |
29
+ | The selector cell starts with `#` and Robot Framework treated it as a comment | write `id=name` or `\#name` |
30
+ | The element appears later than `timeout` (10 s) | `Wait For Elements State <selector> visible timeout=30s`, or `Set Browser Timeout` for the suite |
31
+ | Wrong page is active after a popup | `Switch Page NEW` or `Switch Page <id>` |
32
+
33
+ ## … intercepts pointer events
34
+
35
+ The call log shows the locator resolved, then repeats `<div …> intercepts pointer events` until the timeout. Cause: an overlay, cookie banner, spinner or sticky header covers the element. Fix: close the banner or wait for the overlay to go (`Wait For Elements State .overlay hidden`). `Click With Options <selector> force=True` skips the actionability checks; use it only when the covering element is intended.
36
+
37
+ ## Assertion fails although the page shows the value
38
+
39
+ | Cause | Fix |
40
+ |---|---|
41
+ | Expected value has the wrong type (`Get Text` returns a string) | compare strings with strings; counts are numbers |
42
+ | Hidden whitespace or line breaks | `contains`, `matches`, or `Set Assertion Formatters` with `strip` / `normalize spaces` |
43
+ | The selector matches a different element with similar text | check with `Highlight Elements` and `Get Element Count` |
44
+
45
+ ## Getter asserts before the page updates
46
+
47
+ Symptom: `Get Text h1 == Done` fails, but a second later the page shows "Done". Cause: `retry_assertions_for` defaults to 1 s. Fix: `Set Retry Assertions For 10s`, or `Wait For Condition Text h1 == Done timeout=10s` for one step. A getter without an operator (`${t}= Get Text h1`) never retries.
48
+
49
+ ## Wait For Response never matches
50
+
51
+ Causes: the response arrived before the wait started, or the matcher is wrong. Fix: start the wait as a promise before the action, and use a glob (`**/api/items*`) or a `/regex/`:
52
+
53
+ ```robotframework
54
+ *** Test Cases ***
55
+ Wait For Api Call
56
+ ${promise}= Promise To Wait For Response **/api/items*
57
+ Click button#load
58
+ ${response}= Wait For ${promise}
59
+ Should Be Equal As Integers ${response}[status] 200
60
+ ```
61
+
62
+ ## Direct assignment of values or variables is not allowed
63
+
64
+ Raised by `Fill Secret`, `Type Secret` and `New Context httpCredentials=` when they get a plain value or `${var}`. Pass the variable name as `$var` or `%ENV_VAR`, or a Robot Framework 7.4 `Secret` value.
65
+
66
+ ## Keyword works locally, fails in CI
67
+
68
+ | Cause | Fix |
69
+ |---|---|
70
+ | Headed vs headless layout or a smaller viewport | `New Browser chromium headless=True` locally too; set `viewport=` in `New Context` |
71
+ | Slower machine | raise timeouts per suite, not with `Sleep` |
72
+ | Missing system libraries on a fresh Linux image | `uv run rfbrowser install --with-deps chromium` |
73
+
74
+ The screenshot taken by `run_on_failure` (in the log) usually shows which case it is. For a trace of every action, open the context with `tracing=True` and view it with `uv run rfbrowser show-trace <file>`.
75
+
76
+ ## rfbrowser command not found
77
+
78
+ Run it through the project environment, or call the module directly:
79
+
80
+ ```bash
81
+ uv run rfbrowser install chromium
82
+ uv run python -m Browser.entry install chromium
83
+ ```
84
+
85
+ ## Browser binaries missing after a new venv or an upgrade
86
+
87
+ Playwright browser binaries are tied to the Browser version. Rerun the install step:
88
+
89
+ ```bash
90
+ uv run rfbrowser install chromium # add --with-deps on fresh Linux CI images
91
+ ```
92
+
93
+ ## Node.js path (without bb)
94
+
95
+ Only when you deliberately use the Node.js escape hatch (Node 22/24/26 LTS). Don't combine `rfbrowser init` with `[bb]`:
96
+
97
+ ```bash
98
+ uv run rfbrowser init chromium # install the Node wrapper + one browser
99
+ uv run rfbrowser init --skip-browsers # Node wrapper only, reuse existing browsers
100
+ ```
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: rf-selenium
3
+ description: "Use first, before answering, for RF web tests with SeleniumLibrary. Not installs/drivers: rf-setup."
4
+ license: Apache-2.0
5
+ compatibility: Requires Python 3.10+, robotframework>=7, robotcode[all]>=2.8 in the project environment and robotframework-seleniumlibrary 6.x, plus a locally installed browser (drivers resolved by Selenium Manager) or a Selenium Grid URL.
6
+ metadata:
7
+ author: manykarim
8
+ version: "1.0.0"
9
+ ---
10
+
11
+
12
+ # SeleniumLibrary Skill
13
+
14
+ Web UI tests through Selenium WebDriver. Unlike Browser Library, element keywords do not wait: every dynamic step needs an explicit wait.
15
+ Use this skill for suites that already import SeleniumLibrary or need Selenium Grid; for new web tests with no library chosen, use rf-browser.
16
+ Verified against SeleniumLibrary 6.8.0, Robot Framework 7.4.
17
+
18
+ ## When to use
19
+
20
+ Load this skill first, before exploring the project or answering from memory, when a Robot Framework web UI test uses SeleniumLibrary (`Library SeleniumLibrary`, Selenium WebDriver):
21
+
22
+ - writing or fixing a SeleniumLibrary test: browser options, `id:`/`css:`/`xpath:` locators, explicit waits, hover menus, frames, windows, alerts, JavaScript;
23
+ - a WebDriver exception in a robot run (element not found, click intercepted, stale element), or the user mentions SeleniumLibrary, WebDriver, chromedriver or Selenium Grid.
24
+
25
+ Not this skill: Browser Library/Playwright suites, or new web tests with no library chosen, use `rf-browser`; installing SeleniumLibrary or a driver uses `rf-setup` (plugin `rf-core`).
26
+
27
+ ## Installation
28
+
29
+ Install into the project environment, with the tool the project already uses. Full steps and verification: `references/install.md`. For a new environment, Poetry and venv + pip forms, and troubleshooting, see `rf-setup` (plugin `rf-core`).
30
+
31
+ ```bash
32
+ uv add robotframework-seleniumlibrary
33
+ ```
34
+ A real browser (Chrome, Firefox, Edge) must be installed; Selenium Manager (bundled with Selenium ≥ 4.6) fetches the matching driver on first use. No driver downloads or PATH setup. Offline or air-gapped machines: see `references/install.md`.
35
+
36
+ ## Import and defaults
37
+
38
+ ```robotframework
39
+ *** Settings ***
40
+ Library SeleniumLibrary timeout=10s implicit_wait=0s
41
+ Suite Setup Open Browser ${BASE_URL} headlesschrome
42
+ Suite Teardown Close All Browsers
43
+ ```
44
+
45
+ - `timeout=10s` raises the 5 s default of the `Wait Until …` and alert keywords, because CI pages load slower than local ones.
46
+ - `implicit_wait=0s` (the default) keeps element lookups fast and explicit; waits are written as `Wait Until …` steps.
47
+ - `run_on_failure` stays at its default, `Capture Page Screenshot`, so every failing SeleniumLibrary keyword leaves a screenshot in the log.
48
+ - `Open Browser` with `headlesschrome` (or `chrome` locally) lets Selenium Manager resolve the driver.
49
+
50
+ Use `options=` (for example `options=add_argument("--window-size=1920,1080")`), `remote_url=` for Selenium Grid, or `Create Webdriver` when you need browser flags, a grid or a custom driver service — see `references/browser-setup.md`.
51
+
52
+ ## Which keyword for which situation
53
+
54
+ | Situation | Use | Details |
55
+ |---|---|---|
56
+ | Click, type, select | `Click Element`, `Input Text`, `Input Password`, `Select From List By Label` — after a wait if the element appears late | `references/locators.md` |
57
+ | Element appears after navigation or AJAX | `Wait Until Element Is Visible`, `Wait Until Page Contains Element` | `references/waiting-strategies.md` |
58
+ | Spinner or dialog must go away | `Wait Until Element Is Not Visible` | `references/waiting-strategies.md` |
59
+ | Button becomes clickable | `Wait Until Element Is Enabled` | `references/waiting-strategies.md` |
60
+ | Assert text that loads late | `Wait Until Element Contains`, `Wait Until Page Contains` | `references/waiting-strategies.md` |
61
+ | Assert a state that is already settled | `Element Text Should Be`, `Element Should Be Visible`, `Title Should Be` | — |
62
+ | Wait for a count or any custom condition | `Wait Until Keyword Succeeds` + `Get Element Count` | `references/waiting-strategies.md` |
63
+ | Element inside an iframe | `Select Frame` … `Unselect Frame` | `references/frames-windows.md` |
64
+ | Popup window or new tab | `Switch Window NEW`, back with `Switch Window MAIN` | `references/frames-windows.md` |
65
+ | JavaScript alert or confirm | `Handle Alert` | `references/frames-windows.md` |
66
+ | File upload | `Choose File` on the `<input type="file">` | — |
67
+ | Something no keyword covers | `Execute Javascript` with `ARGUMENTS` | `references/javascript-execution.md` |
68
+ | Extra evidence for a failure | `Capture Element Screenshot`, `Log Source` | `references/troubleshooting.md` |
69
+
70
+ Keyword names and arguments: `robotcode doc keywords SeleniumLibrary "wait until"` lists them; there is no keyword catalog in this skill.
71
+
72
+ ## Agent workflow
73
+
74
+ 1. Look up each keyword before you use it: `robotcode doc keyword SeleniumLibrary "<Keyword>"`; find names with `robotcode doc keywords SeleniumLibrary "<text>"`. Copy names and arguments exactly as robotcode shows them.
75
+ 2. Write the test with the defaults above and the decision table.
76
+ 3. Check the changed files statically: `robotcode analyze code <changed files>` (through the project environment, e.g. `uv run robotcode …`). Fix every error it reports.
77
+ 4. Run them by longname: `robotcode robot -bl "<Suite.Sub.Test>"` (longnames from `robotcode discover tests`), or pass a whole directory. Don't pass a single `.robot` file: it skips the parent `__init__.robot`.
78
+ 5. Read the results: `robotcode results show --failed`, then `robotcode results log -bl "<longname>"`. Don't parse output.xml by hand.
79
+ 6. Fix the cause and go back to step 3 (static check). Stop when the tests pass or the failure is shown to be in the system under test, and say which.
80
+
81
+ ## Locator rules
82
+
83
+ - A locator without a prefix matches the `id` or `name` attribute (some keywords add more, e.g. `Click Link` also matches link text and `href`).
84
+ - A locator starting with `//` (or `(//`) is XPath; everything else needs an explicit strategy: `css:`, `xpath:`, `link:`, `partial link:`, `class:`, `tag:`, `data:`.
85
+ - Prefer `id:`/`css:` with stable attributes (`css:[data-testid="save"]`); XPath for text matches only: `xpath://button[normalize-space()="Save"]`.
86
+ - Keep locators in variables, never stored WebElements (see Gotchas).
87
+
88
+ ## Gotchas
89
+
90
+ - **Element keywords do not wait** — `Click Element`, `Input Text` and `Get Text` fail at once when the element is not there yet, because `implicit_wait` defaults to 0 and the import `timeout` applies only to `Wait …` and alert keywords. Put a `Wait Until Element Is Visible` (or `… Is Enabled`) before acting on anything that loads late.
91
+ - **Assertions check once** — `Page Should Contain`, `Element Should Be Visible` and `Element Text Should Be` do not retry. After navigation or AJAX use `Wait Until Page Contains`, `Wait Until Element Is Visible` or `Wait Until Element Contains`.
92
+ - **`Page Should Contain` leaves the frame** — it searches all frames and resets the selection to the main frame, because of how it walks frames. Call `Select Frame` again before the next locator inside the iframe.
93
+ - **`Select Frame` is sticky** — every later locator is resolved inside that frame until `Unselect Frame`, so a main-page element then fails with "element not found", not with a frame error. Pair each `Select Frame` with `Unselect Frame`.
94
+ - **Headless browser names have no underscore** — `Open Browser` accepts `headlesschrome` and `headlessfirefox`; `headless_chrome` fails with "is not a supported browser", and there is no headless Edge name. For headless Edge use `edge` with `options=add_argument("--headless=new")`.
95
+ - **`Open Browser` defaults to Firefox** — the `browser` argument defaults to `firefox`, so a call without it fails on machines that only have Chrome. Always pass the browser (e.g. from a `${BROWSER}` variable).
96
+ - **Implicit plus explicit waits** — setting `implicit_wait` (or `Set Selenium Implicit Wait`) makes every lookup block for up to that time, also inside the polling loop of `Wait Until …` keywords, so waits overshoot their `timeout` and absence checks such as `Wait Until Page Does Not Contain Element` slow down. Keep `implicit_wait=0s` and use explicit waits.
97
+ - **Stale WebElements** — a `${el}= Get WebElement …` stored before the page re-renders raises `StaleElementReferenceException` later, because Selenium element references die with the DOM node. Pass locator strings and look elements up again.
98
+ - **Covered elements** — `Click Element` on an element under an overlay or cookie banner fails with `ElementClickInterceptedException`. Wait for the overlay with `Wait Until Element Is Not Visible`, or use `Scroll Element Into View`; a JavaScript click is the last resort because it skips the user-visible check.
99
+ - **Screenshot teardowns are redundant** — `run_on_failure` already runs `Capture Page Screenshot` when a SeleniumLibrary keyword fails; a `Capture Page Screenshot` teardown only duplicates it. Change the behaviour with the `run_on_failure` import argument or `Register Keyword To Run On Failure`.
100
+
101
+ ## When to read the references
102
+
103
+ | Read | When |
104
+ |---|---|
105
+ | `references/install.md` | installing the library, its post-install steps, verifying the install, or a failed post-install step |
106
+ | `references/browser-setup.md` | you need browser options, window size, Selenium Grid (`remote_url`), `Create Webdriver`, or CI flags |
107
+ | `references/waiting-strategies.md` | a test is flaky, you need a count or custom wait, or you tune timeouts |
108
+ | `references/locators.md` | a locator does not match, or you need chaining, `Add Location Strategy` or WebElement arguments |
109
+ | `references/frames-windows.md` | the page uses iframes, popups, new tabs or alerts |
110
+ | `references/javascript-execution.md` | no keyword does what you need and you want `Execute Javascript` / `Execute Async Javascript` |
111
+ | `references/troubleshooting.md` | you have an error message (stale element, click intercepted, session not created, no such frame) or need screenshots and page source |
112
+
113
+ Examples in `assets/examples/`: `basic-web-test.robot` (navigation, forms, assertions), `wait-patterns.robot` (explicit waits, count wait), `multi-window.robot` (windows, frames, alerts).
114
+
115
+ ## Companion Skills
116
+
117
+ | Need | Skill |
118
+ |------|-------|
119
+ | Web UI tests with Browser Library (Playwright) | `rf-browser` |
120
+ | Install Robot Framework or a library, fix the environment | `rf-setup` (plugin `rf-core`) |
121
+ | Write tests, suites, user keywords, resources and variables in Robot Framework syntax | `rf-language` (plugin `rf-core`) |
122
+
123
+ For running, discovering, keyword documentation, result analysis and debugging with the robotcode CLI, use the `robotcode` skill of the robotcode plugin (`robotcode@robotframework-agent-plugins`); the commands above work without it.
@@ -0,0 +1,64 @@
1
+ *** Settings ***
2
+ Documentation SeleniumLibrary basics: open a browser, fill a form, assert with explicit waits.
3
+ ... Runs against https://the-internet.herokuapp.com (needs network and Chrome).
4
+ Library SeleniumLibrary timeout=10s implicit_wait=0s
5
+ Suite Setup Open Browser ${BASE_URL} ${BROWSER} options=${CHROME_OPTIONS}
6
+ Suite Teardown Close All Browsers
7
+ Test Setup Start Logged Out
8
+
9
+ *** Variables ***
10
+ ${BASE_URL} https://the-internet.herokuapp.com
11
+ ${BROWSER} headlesschrome
12
+ ${USERNAME} tomsmith
13
+ ${PASSWORD} SuperSecretPassword!
14
+ # Chrome's password-leak check opens a dialog after logging in with a known
15
+ # demo password; it swallows later clicks, so switch the password manager off.
16
+ ${CHROME_OPTIONS} add_experimental_option("prefs", {"credentials_enable_service": False, "profile.password_manager_enabled": False, "profile.password_manager_leak_detection": False})
17
+
18
+ *** Test Cases ***
19
+ Home Page Lists The Examples
20
+ Title Should Be The Internet
21
+ Wait Until Page Contains Element css:ul li a
22
+ ${links}= Get Element Count css:ul li a
23
+ Should Be True ${links} > 10
24
+
25
+ Valid Login Shows The Secure Area
26
+ Login As ${USERNAME} ${PASSWORD}
27
+ Wait Until Location Contains /secure
28
+ Wait Until Element Contains id:flash You logged into a secure area!
29
+
30
+ Invalid Login Shows An Error
31
+ Login As ${USERNAME} wrong-password
32
+ Wait Until Element Contains id:flash Your password is invalid!
33
+ Location Should Contain /login
34
+
35
+ Checkboxes And Dropdown
36
+ Go To ${BASE_URL}/checkboxes
37
+ Select Checkbox xpath:(//form[@id="checkboxes"]/input)[1]
38
+ Checkbox Should Be Selected xpath:(//form[@id="checkboxes"]/input)[1]
39
+ Unselect Checkbox xpath:(//form[@id="checkboxes"]/input)[2]
40
+ Checkbox Should Not Be Selected xpath:(//form[@id="checkboxes"]/input)[2]
41
+ Go To ${BASE_URL}/dropdown
42
+ Select From List By Label id:dropdown Option 2
43
+ List Selection Should Be id:dropdown Option 2
44
+
45
+ Upload A File
46
+ Go To ${BASE_URL}/upload
47
+ VAR ${file} ${TEMPDIR}${/}upload-example.txt
48
+ Evaluate pathlib.Path($file).write_text("hello") modules=pathlib
49
+ Choose File id:file-upload ${file}
50
+ Click Button id:file-submit
51
+ Wait Until Element Contains id:uploaded-files upload-example.txt
52
+
53
+ *** Keywords ***
54
+ Start Logged Out
55
+ Delete All Cookies
56
+ Go To ${BASE_URL}
57
+
58
+ Login As
59
+ [Arguments] ${username} ${password}
60
+ Go To ${BASE_URL}/login
61
+ Wait Until Element Is Visible id:username
62
+ Input Text id:username ${username}
63
+ Input Password id:password ${password}
64
+ Click Button css:button[type="submit"]
@@ -0,0 +1,55 @@
1
+ *** Settings ***
2
+ Documentation Windows, frames and alerts with SeleniumLibrary.
3
+ ... Runs against https://the-internet.herokuapp.com (needs network and Chrome).
4
+ Library SeleniumLibrary timeout=10s implicit_wait=0s
5
+ Suite Setup Open Browser ${BASE_URL} ${BROWSER}
6
+ Suite Teardown Close All Browsers
7
+ Test Teardown Switch Window MAIN
8
+
9
+ *** Variables ***
10
+ ${BASE_URL} https://the-internet.herokuapp.com
11
+ ${BROWSER} headlesschrome
12
+
13
+ *** Test Cases ***
14
+ Link Opens A New Window
15
+ Go To ${BASE_URL}/windows
16
+ Click Link link:Click Here
17
+ Switch Window NEW timeout=10s
18
+ Title Should Be New Window
19
+ Close Window
20
+
21
+ Switch By Excluding Known Windows
22
+ Go To ${BASE_URL}/windows
23
+ ${before}= Get Window Handles
24
+ Click Link link:Click Here
25
+ Switch Window ${before} timeout=10s
26
+ Page Should Contain New Window
27
+ Close Window
28
+
29
+ Type Inside An Iframe
30
+ Go To ${BASE_URL}/iframe
31
+ Wait Until Page Contains Element id:mce_0_ifr
32
+ Select Frame id:mce_0_ifr
33
+ Wait Until Element Is Visible id:tinymce
34
+ ${text}= Get Text id:tinymce
35
+ Unselect Frame
36
+ Should Not Be Empty ${text}
37
+
38
+ Nested Frames
39
+ Go To ${BASE_URL}/nested_frames
40
+ Select Frame name:frame-top
41
+ Select Frame name:frame-middle
42
+ Element Text Should Be id:content MIDDLE
43
+ Unselect Frame
44
+
45
+ Accept And Dismiss Alerts
46
+ Go To ${BASE_URL}/javascript_alerts
47
+ Click Button xpath://button[.="Click for JS Alert"]
48
+ ${message}= Handle Alert ACCEPT
49
+ Should Be Equal ${message} I am a JS Alert
50
+ Click Button xpath://button[.="Click for JS Confirm"]
51
+ Handle Alert DISMISS
52
+ Wait Until Element Contains id:result You clicked: Cancel
53
+ Click Button xpath://button[.="Click for JS Prompt"]
54
+ Input Text Into Alert hello
55
+ Wait Until Element Contains id:result You entered: hello