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,53 @@
1
+ *** Settings ***
2
+ Documentation Explicit waits with SeleniumLibrary: visibility, disappearance, enabled state,
3
+ ... text, exact and minimum counts. Runs against https://the-internet.herokuapp.com.
4
+ Library SeleniumLibrary timeout=10s implicit_wait=0s
5
+ Suite Setup Open Browser ${BASE_URL} ${BROWSER}
6
+ Suite Teardown Close All Browsers
7
+
8
+ *** Variables ***
9
+ ${BASE_URL} https://the-internet.herokuapp.com
10
+ ${BROWSER} headlesschrome
11
+
12
+ *** Test Cases ***
13
+ Wait For Hidden Element To Appear
14
+ Go To ${BASE_URL}/dynamic_loading/1
15
+ Click Element css:#start button
16
+ Wait Until Element Is Not Visible id:loading timeout=15s
17
+ Wait Until Element Is Visible id:finish
18
+ Element Text Should Be css:#finish h4 Hello World!
19
+
20
+ Wait For Element Rendered After Click
21
+ Go To ${BASE_URL}/dynamic_loading/2
22
+ Click Element css:#start button
23
+ Wait Until Page Contains Hello World! timeout=15s
24
+
25
+ Wait For Control To Become Enabled
26
+ Go To ${BASE_URL}/dynamic_controls
27
+ Click Button css:#input-example button
28
+ Wait Until Element Is Enabled css:#input-example input[type="text"]
29
+ Input Text css:#input-example input[type="text"] typed after enable
30
+
31
+ Wait For Exact Count
32
+ Go To ${BASE_URL}/add_remove_elements/
33
+ FOR ${_} IN RANGE 3
34
+ Click Button css:button[onclick="addElement()"]
35
+ END
36
+ Wait Until Page Contains Element css:#elements button limit=3
37
+
38
+ Wait For Minimum Count
39
+ Go To ${BASE_URL}/add_remove_elements/
40
+ FOR ${_} IN RANGE 4
41
+ Click Button css:button[onclick="addElement()"]
42
+ END
43
+ Wait Until Keyword Succeeds 10s 500ms Element Count Should Be At Least css:#elements button 4
44
+
45
+ Wait For Condition In JavaScript
46
+ Go To ${BASE_URL}
47
+ Wait For Condition return document.readyState == "complete"
48
+
49
+ *** Keywords ***
50
+ Element Count Should Be At Least
51
+ [Arguments] ${locator} ${minimum}
52
+ ${count}= Get Element Count ${locator}
53
+ Should Be True ${count} >= ${minimum}
@@ -0,0 +1,103 @@
1
+ # Browser Setup
2
+
3
+ - Drivers and Selenium Manager
4
+ - Browser names
5
+ - Browser options
6
+ - Selenium Grid
7
+ - Create Webdriver
8
+ - CI
9
+
10
+ ## Drivers and Selenium Manager
11
+
12
+ Selenium ≥ 4.6 ships Selenium Manager. On the first `Open Browser` it finds the installed browser, downloads the matching driver (chromedriver, geckodriver, msedgedriver) and caches it in `~/.cache/selenium` (`SE_CACHE_PATH` moves the cache, for example into a CI cache directory). Nothing goes on `PATH` and no helper library is needed. Offline or locked-down machines: see rf-setup (plugin rf-core).
13
+
14
+ ## Browser names
15
+
16
+ `Open Browser` lower-cases the name and removes spaces, then looks it up:
17
+
18
+ | Browser | Names |
19
+ |---|---|
20
+ | Chrome | `chrome`, `googlechrome`, `gc` |
21
+ | Headless Chrome | `headlesschrome` |
22
+ | Firefox (the default) | `firefox`, `ff` |
23
+ | Headless Firefox | `headlessfirefox` |
24
+ | Edge | `edge` |
25
+ | Safari | `safari` |
26
+
27
+ `headless_chrome` and `headless_firefox` are rejected ("is not a supported browser"). For headless Edge, pass `edge` with a headless option.
28
+
29
+ ## Browser options
30
+
31
+ `options=` takes a string of method calls on the browser's Options object, separated by `;`:
32
+
33
+ ```robotframework
34
+ *** Test Cases ***
35
+ Chrome With Options
36
+ Open Browser ${URL} chrome
37
+ ... options=add_argument("--headless=new");add_argument("--window-size=1920,1080")
38
+ [Teardown] Close Browser
39
+
40
+ Headless Edge
41
+ Open Browser ${URL} edge options=add_argument("--headless=new")
42
+ [Teardown] Close Browser
43
+ ```
44
+
45
+ Useful Chrome/Edge arguments in containers: `--no-sandbox`, `--disable-dev-shm-usage`, `--window-size=W,H` (headless windows start small, so responsive layouts may hide elements). Firefox takes `-headless`, `-width`, `-height`. Capabilities go through the same string: `set_capability("acceptInsecureCerts", True)`.
46
+
47
+ For many settings, build the Options object once:
48
+
49
+ ```robotframework
50
+ *** Keywords ***
51
+ Open Chrome For CI
52
+ [Arguments] ${url}
53
+ ${options}= Evaluate selenium.webdriver.ChromeOptions() modules=selenium.webdriver
54
+ Call Method ${options} add_argument --headless\=new
55
+ Call Method ${options} add_argument --window-size\=1920,1080
56
+ Open Browser ${url} chrome options=${options}
57
+ ```
58
+
59
+ ## Selenium Grid
60
+
61
+ `remote_url=` sends the session to a Grid (or Selenium standalone container). Grid 4 listens on `http://<host>:4444`; the old `/wd/hub` suffix is still accepted.
62
+
63
+ ```robotframework
64
+ *** Variables ***
65
+ ${GRID_URL} http://localhost:4444
66
+
67
+ *** Keywords ***
68
+ Open Browser On Grid
69
+ [Arguments] ${url} ${browser}=chrome
70
+ Open Browser ${url} ${browser} remote_url=${GRID_URL}
71
+ ... options=set_capability("platformName", "linux")
72
+ ```
73
+
74
+ The browser and driver live on the Grid node, so the test machine needs neither.
75
+
76
+ ## Create Webdriver
77
+
78
+ Use `Create Webdriver` only when `Open Browser` cannot pass what you need (a proxy object, a custom service). It passes keyword arguments straight to the Selenium WebDriver class and does not navigate:
79
+
80
+ ```robotframework
81
+ *** Keywords ***
82
+ Open Firefox Through Proxy
83
+ [Arguments] ${url}
84
+ ${proxy}= Evaluate selenium.webdriver.Proxy() modules=selenium.webdriver
85
+ ${proxy.http_proxy}= Set Variable localhost:8888
86
+ Create Webdriver Firefox proxy=${proxy}
87
+ Go To ${url}
88
+ ```
89
+
90
+ ## CI
91
+
92
+ Install from the project's lock file and install a browser; Selenium Manager fetches the driver, so there is no driver step. Pass the browser name as a variable so CI can run headless:
93
+
94
+ ```yaml
95
+ steps:
96
+ - uses: actions/checkout@v4
97
+ - uses: astral-sh/setup-uv@v6
98
+ - uses: browser-actions/setup-chrome@v1
99
+ - run: uv sync --locked
100
+ - run: uv run robot --variable BROWSER:headlesschrome tests/
101
+ ```
102
+
103
+ Other CI systems (GitLab services, Jenkins) follow the same shape; see rf-setup (plugin rf-core) for CI setup.
@@ -0,0 +1,84 @@
1
+ # Frames, Windows and Alerts
2
+
3
+ - Frames
4
+ - Windows and tabs
5
+ - Alerts
6
+ - Several browsers
7
+
8
+ ## Frames
9
+
10
+ `Select Frame` makes a frame the context for every later keyword until `Unselect Frame` returns to the main document. Nested frames are selected one level at a time.
11
+
12
+ ```robotframework
13
+ *** Keywords ***
14
+ Fill Card Details
15
+ Wait Until Page Contains Element css:iframe#payment
16
+ Select Frame css:iframe#payment
17
+ Input Text id:card-number 4111111111111111
18
+ Unselect Frame
19
+
20
+ Read Nested Frame
21
+ Select Frame id:outer
22
+ Select Frame id:inner
23
+ ${text}= Get Text css:.message
24
+ Unselect Frame
25
+ RETURN ${text}
26
+ ```
27
+
28
+ - `Unselect Frame` always goes back to the top document, not to the parent frame.
29
+ - `Page Should Contain` searches all frames and leaves the main document selected; select the frame again after it.
30
+ - `Current Frame Should Contain` and `Frame Should Contain <frame> <text>` check text in one frame without changing the selection logic of the test.
31
+ - A locator that fails with "element not found" right after frame work is usually resolved in the wrong frame.
32
+
33
+ ## Windows and tabs
34
+
35
+ `Switch Window` selects a window by locator and returns the handle of the window it left:
36
+
37
+ | Locator | Selects |
38
+ |---|---|
39
+ | `NEW` | the last opened window (fails if it is the current one) |
40
+ | `MAIN` (default) | the first window |
41
+ | `CURRENT` | stays; use it to get the current handle: `${handle}= Switch Window CURRENT` |
42
+ | `title:…`, `name:…`, `url:…` | by title, window name or URL |
43
+ | a list of handles | the window not in the list |
44
+
45
+ ```robotframework
46
+ *** Keywords ***
47
+ Check Help Opens In New Tab
48
+ Click Link link:Help
49
+ Switch Window NEW timeout=10s
50
+ Title Should Be Help
51
+ Close Window
52
+ Switch Window MAIN
53
+
54
+ Switch To The Window A Click Opens
55
+ ${before}= Get Window Handles
56
+ Click Element id:open-report
57
+ Switch Window ${before} timeout=10s
58
+ ```
59
+
60
+ - `timeout=` on `Switch Window` polls until the window exists, so no separate wait is needed.
61
+ - `Close Window` closes the current window only; select another window afterwards, because keywords do not switch automatically.
62
+ - `Get Window Handles`, `Get Window Titles`, `Get Window Names` list windows; count windows with `Get Length` on `Get Window Handles`.
63
+
64
+ ## Alerts
65
+
66
+ `Handle Alert` waits for a JavaScript alert, confirm or prompt (up to the library `timeout`), accepts or dismisses it and returns its message:
67
+
68
+ ```robotframework
69
+ *** Keywords ***
70
+ Delete And Confirm
71
+ Click Element id:delete
72
+ ${message}= Handle Alert ACCEPT
73
+ Should Contain ${message} Are you sure
74
+
75
+ Cancel The Prompt
76
+ Click Element id:rename
77
+ Input Text Into Alert new-name action=DISMISS
78
+ ```
79
+
80
+ `action` is `ACCEPT` (default), `DISMISS` or `LEAVE`. `Alert Should Be Present text=…` asserts the text and handles the alert in one step. An alert left open makes the next keyword fail with an "unexpected alert open" error.
81
+
82
+ ## Several browsers
83
+
84
+ `Open Browser … alias=admin` names a browser; `Switch Browser admin` changes between them, and `Close All Browsers` in the suite teardown closes all of them. Use this for two-user scenarios; for more tabs of one user use windows.
@@ -0,0 +1,12 @@
1
+ # Installing SeleniumLibrary
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
+ ```bash
6
+ uv add robotframework-seleniumlibrary
7
+ ```
8
+
9
+ - Package `robotframework-seleniumlibrary` (6.9, Python ≥ 3.10). Module `SeleniumLibrary`. It pulls in `selenium` 4.x.
10
+ - After installing: a real browser (Chrome, Firefox, Edge) must be installed. **Selenium Manager** (built into selenium ≥ 4.6) downloads a matching driver on first use. Don't install chromedriver by hand unless the machine is offline.
11
+ - Offline or locked-down CI: preinstall the driver and put it on PATH; Selenium Manager then finds it.
12
+ - Verify: `uv run python -c "import SeleniumLibrary"`, then a one-line `Open Browser about:blank headlesschrome` test.
@@ -0,0 +1,65 @@
1
+ # JavaScript Execution
2
+
3
+ - When to use JavaScript
4
+ - Execute Javascript
5
+ - Passing arguments
6
+ - Asynchronous scripts
7
+
8
+ ## When to use JavaScript
9
+
10
+ Use `Execute Javascript` when no keyword covers the need: reading page state (`document.readyState`, a value from the app's store), scrolling a custom container, or setting up test data in `localStorage`. A JavaScript click or value assignment skips the checks a user would hit (visibility, overlays, disabled state) and fires no key events, so a test can pass while the real UI is broken; use it for clicks only as a last resort.
11
+
12
+ ## Execute Javascript
13
+
14
+ The code runs as the body of an anonymous function in the selected frame or window, so a value comes back only with `return`:
15
+
16
+ ```robotframework
17
+ *** Test Cases ***
18
+ Read Page State
19
+ ${state}= Execute Javascript return document.readyState;
20
+ Should Be Equal ${state} complete
21
+ ${count}= Execute Javascript return document.querySelectorAll('li.item').length;
22
+ Should Be True ${count} >= 3
23
+ ```
24
+
25
+ - Return values are converted to Python types (numbers, strings, lists, dicts; DOM elements become WebElements).
26
+ - If the code is split over several cells (`...` lines), the parts are joined without spaces: end each part with `;` or a space inside the code.
27
+ - A path to an existing `.js` file runs that file: `Execute Javascript ${CURDIR}/helpers.js`.
28
+ - After `Select Frame`, `document` is the frame's document.
29
+
30
+ ## Passing arguments
31
+
32
+ Pass values and WebElements after the `ARGUMENTS` marker instead of formatting them into the code (no quoting problems, WebElements arrive as DOM nodes). If `ARGUMENTS` comes first, the code needs the `JAVASCRIPT` marker.
33
+
34
+ ```robotframework
35
+ *** Keywords ***
36
+ Scroll Container To Bottom
37
+ [Arguments] ${locator}
38
+ ${box}= Get WebElement ${locator}
39
+ Execute Javascript arguments[0].scrollTop = arguments[0].scrollHeight; ARGUMENTS ${box}
40
+
41
+ Set Value And Notify App
42
+ [Arguments] ${locator} ${value}
43
+ ${input}= Get WebElement ${locator}
44
+ Execute Javascript
45
+ ... arguments[0].value = arguments[1];
46
+ ... arguments[0].dispatchEvent(new Event('input', {bubbles: true}));
47
+ ... ARGUMENTS ${input} ${value}
48
+ ```
49
+
50
+ Frameworks such as React or Angular listen for `input`/`change` events; a bare `value =` assignment without the event leaves the app's state unchanged.
51
+
52
+ ## Asynchronous scripts
53
+
54
+ `Execute Async Javascript` injects a callback as the last argument and waits until the script calls it (up to the library `timeout`):
55
+
56
+ ```robotframework
57
+ *** Test Cases ***
58
+ Fetch Health Endpoint From The Page
59
+ ${status}= Execute Async Javascript
60
+ ... var done = arguments[arguments.length - 1];
61
+ ... fetch('/health').then(function (r) { done(r.status); });
62
+ Should Be Equal As Integers ${status} 200
63
+ ```
64
+
65
+ To wait for a condition written in JavaScript, `Wait For Condition return window.appReady === true` is shorter than an async script.
@@ -0,0 +1,86 @@
1
+ # Locators
2
+
3
+ - Strategies
4
+ - Default strategy and implicit XPath
5
+ - Choosing a locator
6
+ - Chaining and lists
7
+ - WebElement arguments
8
+ - Custom strategies
9
+
10
+ ## Strategies
11
+
12
+ Write the strategy as a prefix, `strategy:value`. The `strategy=value` form also works, but it is the same syntax as a Robot Framework named argument, which libdoc warns can cause problems; prefer the colon.
13
+
14
+ | Strategy | Matches | Example |
15
+ |---|---|---|
16
+ | `id` | `id` attribute | `id:login` |
17
+ | `name` | `name` attribute | `name:username` |
18
+ | `identifier` | `id` or `name` | `identifier:email` |
19
+ | `css` | CSS selector | `css:form#login button[type="submit"]` |
20
+ | `xpath` | XPath | `xpath://button[normalize-space()="Save"]` |
21
+ | `link` / `partial link` | exact / partial link text | `link:Sign in`, `partial link:Sign` |
22
+ | `class` | one class name | `class:btn-primary` |
23
+ | `tag` | tag name | `tag:h1` |
24
+ | `data` | a `data-*` attribute | `data:testid:save` (matches `data-testid="save"`) |
25
+ | `dom` | JavaScript DOM expression | `dom:document.forms[0]` |
26
+
27
+ `sizzle` and `jquery` need jQuery on the page and `sizzle` is deprecated; use `css:`.
28
+
29
+ ## Default strategy and implicit XPath
30
+
31
+ - No prefix: the keyword's default strategy, which matches `id` or `name`. Some keywords add their own attributes (`Click Link` also matches link text and `href`, `Click Image` matches `src` and `alt`). A plain `Submit` therefore looks for `id="Submit"` or `name="Submit"`, not for text.
32
+ - A value starting with `//` or `(//` is XPath without the prefix: `//div[@id="main"]`, `(//li)[2]`.
33
+ - Anything that could be read as a strategy (`css:…` inside a text) can be forced to the default with `default:`.
34
+
35
+ ## Choosing a locator
36
+
37
+ 1. `id:` when the id is stable.
38
+ 2. `css:` with a test attribute: `css:[data-testid="checkout"]` (or `data:testid:checkout`).
39
+ 3. `css:` with structure and stable classes.
40
+ 4. `xpath:` when you need the element's text or an ancestor: `xpath://tr[td[.="Alice"]]//button[.="Edit"]`.
41
+
42
+ Keep locators in `*** Variables ***` or keyword arguments, so a UI change is fixed in one place.
43
+
44
+ ## Chaining and lists
45
+
46
+ `>>` chains locators; each part needs its own strategy, and each part searches inside the previous match:
47
+
48
+ ```robotframework
49
+ *** Test Cases ***
50
+ Click Edit In Alice Row
51
+ Click Element css:table#users >> xpath:.//tr[td[.="Alice"]] >> css:button.edit
52
+ ```
53
+
54
+ Chaining works for Selenium-based strategies (`css`, `xpath`, `id`, …), not for `jquery`/`sizzle`. If a locator contains ` >> ` literally, pass a list instead: `${loc}= Create List css:div#main xpath://a`.
55
+
56
+ ## WebElement arguments
57
+
58
+ Every `locator` argument also accepts a WebElement, for example from `Get WebElement` or `Get WebElements`. Use them only within a few steps: the reference goes stale when the page re-renders.
59
+
60
+ ```robotframework
61
+ *** Test Cases ***
62
+ Check Every Price Is Shown
63
+ @{prices}= Get WebElements css:.price
64
+ FOR ${price} IN @{prices}
65
+ Element Should Be Visible ${price}
66
+ END
67
+ ```
68
+
69
+ ## Custom strategies
70
+
71
+ `Add Location Strategy` registers a keyword that returns a WebElement; the strategy is then used as a prefix:
72
+
73
+ ```robotframework
74
+ *** Test Cases ***
75
+ Use Test Id Strategy
76
+ Add Location Strategy testid Find By Test Id
77
+ Click Element testid:checkout
78
+
79
+ *** Keywords ***
80
+ Find By Test Id
81
+ [Arguments] ${browser} ${locator} ${tag} ${constraints}
82
+ ${element}= Execute Javascript return document.querySelector('[data-testid="${locator}"]');
83
+ RETURN ${element}
84
+ ```
85
+
86
+ The built-in `data:testid:checkout` does the same lookup; a custom strategy pays off for lookups that need logic.
@@ -0,0 +1,122 @@
1
+ # Troubleshooting
2
+
3
+ - Element not found
4
+ - ElementNotInteractableException or ElementClickInterceptedException
5
+ - StaleElementReferenceException
6
+ - Wait Until keyword times out although the element is there
7
+ - UnexpectedAlertPresentException
8
+ - Unsupported browser name
9
+ - SessionNotCreatedException
10
+ - Chrome fails to start in CI or a container
11
+ - Clicks have no effect after a login
12
+ - Screenshots, page source and logs
13
+
14
+ ## Element not found
15
+
16
+ `Element with locator '…' not found.`
17
+
18
+ | Cause | Fix |
19
+ |---|---|
20
+ | The element appears after page load or an AJAX call | Add `Wait Until Element Is Visible` / `Wait Until Page Contains Element` before the step |
21
+ | The element is inside an iframe | `Select Frame` first; `Unselect Frame` afterwards |
22
+ | A previous `Select Frame` (or `Page Should Contain`, which resets to the main document) left the wrong frame selected | Select the right frame again |
23
+ | The element opened in a new window or tab | `Switch Window NEW` |
24
+ | A locator without a prefix is text, not an id or name | Use `link:`, `xpath://*[normalize-space()="…"]` or `css:` |
25
+
26
+ ## ElementNotInteractableException or ElementClickInterceptedException
27
+
28
+ `element not interactable` / `element click intercepted: Element … is not clickable at point (x, y). Other element would receive the click`
29
+
30
+ | Cause | Fix |
31
+ |---|---|
32
+ | Overlay, spinner, cookie banner or modal covers the element | `Wait Until Element Is Not Visible` on the overlay, or close the banner |
33
+ | Element is outside the viewport or a small headless window | `Scroll Element Into View`, or `options=add_argument("--window-size=1920,1080")` |
34
+ | Element exists but is hidden or disabled | `Wait Until Element Is Visible` / `Wait Until Element Is Enabled` |
35
+ | Animation still running | Wait for the final state (a class or text), not with `Sleep` |
36
+
37
+ A JavaScript click (`Execute Javascript arguments[0].click(); ARGUMENTS ${element}`) hides the real problem from the test; use it only when the UI is known to behave correctly for users.
38
+
39
+ ## StaleElementReferenceException
40
+
41
+ `stale element reference: stale element not found`
42
+
43
+ A WebElement stored in a variable (`Get WebElement`, `Get WebElements`, JavaScript return values) belongs to a DOM node that the page has since replaced. Pass the locator string instead and let each keyword look the element up again; the `Wait Until …` keywords already retry on stale elements.
44
+
45
+ ## Wait Until keyword times out although the element is there
46
+
47
+ | Cause | Fix |
48
+ |---|---|
49
+ | `Wait Until Element Is Visible` on an element with `display:none` or `visibility:hidden` | Wait for what the user sees, or use `Wait Until Page Contains Element` for presence |
50
+ | The locator matches a hidden duplicate first (mobile and desktop menus) | Make the locator unique, e.g. scope it with `css:#desktop-nav …` |
51
+ | The element is in an iframe | `Select Frame` before the wait |
52
+ | Timeout too short for CI | Raise the import `timeout`, or pass `timeout=` on that call |
53
+
54
+ ## UnexpectedAlertPresentException
55
+
56
+ `unexpected alert open: {Alert text : …}`
57
+
58
+ A JavaScript alert, confirm or prompt is open; the step before it triggered the alert. Handle it with `Handle Alert ACCEPT` (or `DISMISS`) right after the step that opens it.
59
+
60
+ ## Unsupported browser name
61
+
62
+ `ValueError: headless_chrome is not a supported browser.`
63
+
64
+ `Open Browser` accepts `headlesschrome` and `headlessfirefox` (no underscore) and no headless Edge name. Use `edge` with `options=add_argument("--headless=new")` for headless Edge.
65
+
66
+ ## SessionNotCreatedException
67
+
68
+ `session not created: This version of ChromeDriver only supports Chrome version NN`
69
+
70
+ Selenium Manager normally fetches the matching driver. A mismatch means a stale driver in `PATH` or in the cache, or an old Selenium:
71
+
72
+ ```bash
73
+ uv lock --upgrade-package selenium && uv sync # newer Selenium Manager
74
+ rm -rf ~/.cache/selenium # drop cached drivers; fetched again on the next Open Browser
75
+ ```
76
+
77
+ Remove any old `chromedriver` from `PATH` so Selenium Manager's driver is used. Selenium Manager cannot download drivers without network access: see rf-setup (plugin rf-core) for offline setup.
78
+
79
+ ## Chrome fails to start in CI or a container
80
+
81
+ `unknown error: DevToolsActivePort file doesn't exist` or `Chrome failed to start: exited abnormally`
82
+
83
+ - No display: run headless (`headlesschrome`, or `options=add_argument("--headless=new")`).
84
+ - Running as root in a container: add `--no-sandbox`.
85
+ - Small `/dev/shm` in Docker: add `--disable-dev-shm-usage`.
86
+
87
+ ```robotframework
88
+ *** Keywords ***
89
+ Open Chrome In Container
90
+ [Arguments] ${url}
91
+ Open Browser ${url} chrome
92
+ ... options=add_argument("--headless=new");add_argument("--no-sandbox");add_argument("--disable-dev-shm-usage");add_argument("--window-size=1920,1080")
93
+ ```
94
+
95
+ ## Clicks have no effect after a login
96
+
97
+ After logging in with a password that Chrome knows from breach lists (demo sites, `password123`), Chrome's password manager shows a leak warning that swallows later clicks, even headless: elements are found, but nothing happens. Turn the password manager off for test browsers:
98
+
99
+ ```robotframework
100
+ *** Variables ***
101
+ ${CHROME_OPTIONS} add_experimental_option("prefs", {"credentials_enable_service": False, "profile.password_manager_enabled": False, "profile.password_manager_leak_detection": False})
102
+
103
+ *** Keywords ***
104
+ Open Test Browser
105
+ Open Browser ${URL} headlesschrome options=${CHROME_OPTIONS}
106
+ ```
107
+
108
+ ## Screenshots, page source and logs
109
+
110
+ - `run_on_failure` (import argument, default `Capture Page Screenshot`) runs whenever a SeleniumLibrary keyword fails, so failures already have a screenshot in the log. `run_on_failure=NOTHING` turns it off; `Register Keyword To Run On Failure Log Source` changes it during a run and returns the previous keyword.
111
+ - `Capture Page Screenshot EMBED` embeds the image in log.html instead of writing a file (useful when only log.html is archived); `filename=` with `{index}` avoids overwriting.
112
+ - `Capture Element Screenshot css:#chart` captures one element.
113
+ - `Log Source` writes the current page (or selected frame) HTML to the log, which shows what the locator was matched against.
114
+ - `Log Location` and `Log Title` record where the browser was.
115
+ - `Set Screenshot Directory` (or the `screenshot_root_directory` import argument) moves screenshot files.
116
+
117
+ Screenshots taken in teardowns duplicate `run_on_failure`; add one only for failures outside SeleniumLibrary keywords (for example a failed `Should Be Equal` on data read earlier):
118
+
119
+ ```robotframework
120
+ *** Settings ***
121
+ Test Teardown Run Keyword If Test Failed Capture Page Screenshot EMBED
122
+ ```
@@ -0,0 +1,84 @@
1
+ # Waits and Timeouts
2
+
3
+ - Which wait keyword
4
+ - Waiting for a count or a custom condition
5
+ - Timeout scopes
6
+ - Implicit wait
7
+ - Patterns
8
+
9
+ ## Which wait keyword
10
+
11
+ Element keywords (`Click Element`, `Input Text`, `Get Text`) and `… Should …` assertions do not wait. Put an explicit wait in front of anything that appears, changes or disappears after page load:
12
+
13
+ | Waiting for | Keyword |
14
+ |---|---|
15
+ | Element shown | `Wait Until Element Is Visible` |
16
+ | Element in the DOM (may be hidden) | `Wait Until Page Contains Element` (`limit=` waits for an exact count) |
17
+ | Element hidden / removed | `Wait Until Element Is Not Visible` / `Wait Until Page Does Not Contain Element` |
18
+ | Element clickable | `Wait Until Element Is Enabled` |
19
+ | Text anywhere / gone | `Wait Until Page Contains` / `Wait Until Page Does Not Contain` |
20
+ | Text in one element | `Wait Until Element Contains` / `Wait Until Element Does Not Contain` |
21
+ | URL change | `Wait Until Location Contains` / `Wait Until Location Is` / `Wait Until Location Does Not Contain` |
22
+ | JavaScript condition | `Wait For Condition return document.readyState == "complete"` |
23
+
24
+ All take `timeout=` and `error=` (custom failure message).
25
+
26
+ ## Waiting for a count or a custom condition
27
+
28
+ SeleniumLibrary has no "wait until element count is …" keyword. Use `limit=` for an exact count, or retry an assertion:
29
+
30
+ ```robotframework
31
+ *** Test Cases ***
32
+ Wait For Three Rows
33
+ Wait Until Page Contains Element css:table#results tr limit=3
34
+
35
+ Wait For At Least Four Items
36
+ Wait Until Keyword Succeeds 10s 500ms Item Count Should Be At Least css:li.item 4
37
+
38
+ *** Keywords ***
39
+ Item Count Should Be At Least
40
+ [Arguments] ${locator} ${minimum}
41
+ ${count}= Get Element Count ${locator}
42
+ Should Be True ${count} >= ${minimum}
43
+ ```
44
+
45
+ `Wait Until Keyword Succeeds` retries a whole keyword; keep the retried keyword free of side effects (no clicks), or a retry repeats them.
46
+
47
+ ## Timeout scopes
48
+
49
+ | Scope | How | Applies to |
50
+ |---|---|---|
51
+ | Library default | `Library SeleniumLibrary timeout=10s` (default 5 s) | `Wait …` keywords, alert keywords, `Execute Async Javascript` |
52
+ | Rest of the suite | `${old}= Set Selenium Timeout 30s` (returns the previous value) | same |
53
+ | One call | `timeout=30s` argument | that call |
54
+ | Page load | `page_load_timeout=` import argument (default 5 min) or `Set Selenium Page Load Timeout` | page loads started by `Open Browser` and `Go To` |
55
+
56
+ Restore a changed timeout in a teardown (`Set Selenium Timeout ${old}`) so later tests keep the default.
57
+
58
+ ## Implicit wait
59
+
60
+ `implicit_wait` (import argument or `Set Selenium Implicit Wait`) makes Selenium retry every element lookup for that long. It defaults to 0 and should stay there:
61
+
62
+ - Every lookup inside a `Wait Until …` poll also blocks, so a wait can run past its `timeout`.
63
+ - Absence checks (`Wait Until Page Does Not Contain Element`, `Page Should Not Contain Element`) pay the full implicit wait on every poll.
64
+ - A missing element fails only after the implicit wait, which makes every genuine failure slow.
65
+
66
+ `Set Selenium Speed` adds a delay after every Selenium command; it is for demos and debugging, not for synchronisation.
67
+
68
+ ## Patterns
69
+
70
+ ```robotframework
71
+ *** Keywords ***
72
+ Submit And Wait For Result
73
+ Wait Until Element Is Enabled id:submit
74
+ Click Element id:submit
75
+ Wait Until Element Is Not Visible css:.spinner timeout=30s
76
+ Wait Until Element Contains id:status Saved
77
+
78
+ Go To And Wait
79
+ [Arguments] ${url} ${ready_locator}
80
+ Go To ${url}
81
+ Wait Until Element Is Visible ${ready_locator}
82
+ ```
83
+
84
+ Wait for the thing the test needs next (a result element, a text), not for a fixed time: `Sleep` either wastes time or is too short on a slow CI machine.