robotframework-plugins 2026.11.0.dev1__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.
- robotframework_plugins/__init__.py +14 -0
- robotframework_plugins/_assets/catalog.json +143 -0
- robotframework_plugins/_assets/plugins/rf-agentskills/.claude-plugin/plugin.json +25 -0
- robotframework_plugins/_assets/plugins/rf-agentskills/CHANGELOG.md +198 -0
- robotframework_plugins/_assets/plugins/rf-agentskills/README.md +27 -0
- robotframework_plugins/_assets/plugins/rf-agentskills/catalog.yaml +25 -0
- robotframework_plugins/_assets/plugins/rf-api/.claude-plugin/plugin.json +25 -0
- robotframework_plugins/_assets/plugins/rf-api/CHANGELOG.md +9 -0
- robotframework_plugins/_assets/plugins/rf-api/README.md +27 -0
- robotframework_plugins/_assets/plugins/rf-api/catalog.yaml +27 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/SKILL.md +110 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/authentication-patterns.robot +39 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/basic-crud.robot +46 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/file-upload.robot +28 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/assets/examples/session-handling.robot +48 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/authentication.md +58 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/install.md +10 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/request-options.md +90 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/response-validation.md +64 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-requests/references/troubleshooting.md +64 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/SKILL.md +119 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/basic-rest.robot +51 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schema-validation.robot +38 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/assets/examples/schemas/user.json +10 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/authentication.md +61 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/install.md +11 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/json-handling.md +89 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/migrate-from-requests.md +15 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/schema-validation.md +85 -0
- robotframework_plugins/_assets/plugins/rf-api/skills/rf-restinstance/references/troubleshooting.md +68 -0
- robotframework_plugins/_assets/plugins/rf-core/.claude-plugin/plugin.json +19 -0
- robotframework_plugins/_assets/plugins/rf-core/CHANGELOG.md +11 -0
- robotframework_plugins/_assets/plugins/rf-core/README.md +38 -0
- robotframework_plugins/_assets/plugins/rf-core/agents/rf-debug-expert.md +104 -0
- robotframework_plugins/_assets/plugins/rf-core/agents/rf-migration-guide.md +73 -0
- robotframework_plugins/_assets/plugins/rf-core/agents/rf-test-architect.md +98 -0
- robotframework_plugins/_assets/plugins/rf-core/catalog.yaml +19 -0
- robotframework_plugins/_assets/plugins/rf-core/hooks/README.md +435 -0
- robotframework_plugins/_assets/plugins/rf-core/hooks/hooks.json +70 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/_hook_input.mjs +101 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/_pending_errors.mjs +65 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/_python_env.mjs +181 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/check_rf_environment.mjs +181 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_inject_rf_context.mjs +74 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/maybe_remind_robot_tests.mjs +108 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/report_pending_errors.mjs +72 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/rf_error_hints.mjs +126 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot.mjs +509 -0
- robotframework_plugins/_assets/plugins/rf-core/scripts/validate_robot_project.mjs +103 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/SKILL.md +313 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/api.resource +30 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/calc.resource +23 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/embedded.resource +20 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/keywords.resource +26 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/resources/login.resource +10 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/01__keyword_driven.robot +15 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/02__data_driven.robot +10 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/03__templates.robot +17 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/04__bdd.robot +10 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/05__embedded.robot +13 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/__init__.robot +6 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/__init__.robot +7 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/api/users.robot +18 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/tests/env.robot +15 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/common.py +11 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/dev.yaml +3 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/assets/examples/variables/staging.yaml +3 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/arguments.md +139 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/control-structures.md +175 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/embedded-arguments.md +135 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/migration.md +90 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/resources-and-variable-files.md +127 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/styles.md +92 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/suites-and-init.md +96 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/tags-and-selection.md +104 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/templates.md +124 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/references/variables-and-scopes.md +129 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-language/scripts/rf_conventions.py +883 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/SKILL.md +216 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ExampleLibrary.py +61 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/ResultListener.py +60 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.py +48 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/converters.robot +20 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/example_library.robot +31 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/assets/examples/listener.robot +12 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/api-variants.md +291 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/communication.md +248 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/conversion.md +347 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/listeners.md +150 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/references/packaging-and-docs.md +155 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-python-library/scripts/check_library.py +842 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/SKILL.md +159 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/github-actions-robot.yml +32 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/gitignore.txt +22 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.poetry.toml +28 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/pyproject.uv.toml +20 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/requirements.txt +9 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/robot.toml +16 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/assets/examples/smoke.robot +22 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/ci.md +61 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/cli-tools.md +33 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/libraries.md +47 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/poetry.md +77 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/project-layout.md +86 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/troubleshooting.md +73 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/uv.md +108 -0
- robotframework_plugins/_assets/plugins/rf-core/skills/rf-setup/references/venv-pip.md +71 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-debug-expert.toml +103 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-migration-guide.toml +72 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/codex/agents/rf-test-architect.toml +97 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-debug-expert.md +107 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-migration-guide.md +76 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/opencode/agents/rf-test-architect.md +101 -0
- robotframework_plugins/_assets/plugins/rf-core/variants/opencode/plugins/rf-core.js +93 -0
- robotframework_plugins/_assets/plugins/rf-desktop/.claude-plugin/plugin.json +24 -0
- robotframework_plugins/_assets/plugins/rf-desktop/CHANGELOG.md +9 -0
- robotframework_plugins/_assets/plugins/rf-desktop/README.md +26 -0
- robotframework_plugins/_assets/plugins/rf-desktop/catalog.yaml +23 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/SKILL.md +266 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/calculator.robot +45 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/assets/examples/mock-deterministic.robot +33 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/cli-and-inspector.md +82 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/install.md +14 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/keywords-reference.md +102 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/locators-and-queries.md +95 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/platform-setup.md +65 -0
- robotframework_plugins/_assets/plugins/rf-desktop/skills/rf-platynui/references/status-and-migration.md +41 -0
- robotframework_plugins/_assets/plugins/rf-mobile/.claude-plugin/plugin.json +24 -0
- robotframework_plugins/_assets/plugins/rf-mobile/CHANGELOG.md +9 -0
- robotframework_plugins/_assets/plugins/rf-mobile/README.md +26 -0
- robotframework_plugins/_assets/plugins/rf-mobile/catalog.yaml +23 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/SKILL.md +134 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/android-basic.robot +60 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/gestures-example.robot +59 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/hybrid-app.robot +54 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/assets/examples/ios-basic.robot +48 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/capabilities.md +117 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/gestures-touch.md +84 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/install.md +21 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/locators-mobile.md +74 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/platform-specific.md +105 -0
- robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/troubleshooting.md +70 -0
- robotframework_plugins/_assets/plugins/rf-web/.claude-plugin/plugin.json +25 -0
- robotframework_plugins/_assets/plugins/rf-web/CHANGELOG.md +9 -0
- robotframework_plugins/_assets/plugins/rf-web/README.md +27 -0
- robotframework_plugins/_assets/plugins/rf-web/catalog.yaml +27 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/SKILL.md +132 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/authentication-flow.robot +34 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/basic-web-test.robot +29 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/form-handling.robot +49 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/iframe-shadow-dom.robot +31 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/assertion-engine.md +79 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/authentication-storage.md +86 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/browser-context-page.md +110 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/downloads-uploads.md +51 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/iframes-shadow-dom.md +67 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/install.md +67 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/locators.md +83 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/migrate-from-selenium.md +22 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/troubleshooting.md +100 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/SKILL.md +123 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/basic-web-test.robot +64 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/multi-window.robot +55 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/assets/examples/wait-patterns.robot +53 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/browser-setup.md +103 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/frames-windows.md +84 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/install.md +12 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/javascript-execution.md +65 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/locators.md +86 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/troubleshooting.md +122 -0
- robotframework_plugins/_assets/plugins/rf-web/skills/rf-selenium/references/waiting-strategies.md +84 -0
- robotframework_plugins/_assets.py +120 -0
- robotframework_plugins/_catalog.py +123 -0
- robotframework_plugins/_snapshot.py +230 -0
- robotframework_plugins/adapters/__init__.py +53 -0
- robotframework_plugins/adapters/_base.py +400 -0
- robotframework_plugins/adapters/claude_code.py +312 -0
- robotframework_plugins/adapters/claude_desktop.py +129 -0
- robotframework_plugins/adapters/codex.py +276 -0
- robotframework_plugins/adapters/copilot.py +87 -0
- robotframework_plugins/adapters/cursor.py +295 -0
- robotframework_plugins/adapters/goose.py +240 -0
- robotframework_plugins/adapters/opencode.py +170 -0
- robotframework_plugins/bundle.py +85 -0
- robotframework_plugins/cli.py +1311 -0
- robotframework_plugins/detect.py +121 -0
- robotframework_plugins/manifest.py +338 -0
- robotframework_plugins/py.typed +0 -0
- robotframework_plugins/skillzip.py +39 -0
- robotframework_plugins/transforms.py +725 -0
- robotframework_plugins-2026.11.0.dev1.dist-info/METADATA +178 -0
- robotframework_plugins-2026.11.0.dev1.dist-info/RECORD +195 -0
- robotframework_plugins-2026.11.0.dev1.dist-info/WHEEL +4 -0
- robotframework_plugins-2026.11.0.dev1.dist-info/entry_points.txt +2 -0
- robotframework_plugins-2026.11.0.dev1.dist-info/licenses/LICENSE +201 -0
robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/platform-specific.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Platform-Specific Keywords
|
|
2
|
+
|
|
3
|
+
Keywords and driver commands that exist on only one platform, and hybrid-app context handling. Capabilities and locators per platform are in their own reference files.
|
|
4
|
+
|
|
5
|
+
- Android: keys and keyboard
|
|
6
|
+
- Android: activities and app state
|
|
7
|
+
- Android: permissions, notifications and shell
|
|
8
|
+
- iOS: alerts and permissions
|
|
9
|
+
- iOS: keyboard, pickers and biometrics
|
|
10
|
+
- Both: orientation, background and app lifecycle
|
|
11
|
+
- Hybrid apps and WebViews
|
|
12
|
+
|
|
13
|
+
## Android: keys and keyboard
|
|
14
|
+
|
|
15
|
+
`Press Keycode` and `Long Press Keycode` send Android key codes (`metastate=1` adds Shift).
|
|
16
|
+
|
|
17
|
+
| Key | Code | Key | Code |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| Back | `4` | Enter | `66` |
|
|
20
|
+
| Home | `3` | Delete (backspace) | `67` |
|
|
21
|
+
| Menu | `82` | Tab | `61` |
|
|
22
|
+
| Volume up / down | `24` / `25` | App switch | `187` |
|
|
23
|
+
|
|
24
|
+
```robotframework
|
|
25
|
+
Press Keycode 4 # back
|
|
26
|
+
Press Keycode 66 # enter, e.g. submit a search field
|
|
27
|
+
Hide Keyboard # Android ignores the key_name argument
|
|
28
|
+
${shown}= Is Keyboard Shown
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Android: activities and app state
|
|
32
|
+
|
|
33
|
+
```robotframework
|
|
34
|
+
${activity}= Get Activity
|
|
35
|
+
Start Activity com.example.app .SettingsActivity
|
|
36
|
+
Wait Activity .SettingsActivity 10
|
|
37
|
+
${state}= Execute Script mobile: queryAppState appId=com.example.app # 4 = running in foreground
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`Start Activity` passes extra options (`stop=${True}`, `action=…`, `uri=…`) to the driver's `mobile: startActivity`. Deep links: `Start Activity` with `action=android.intent.action.VIEW` and `uri=myapp://path`.
|
|
41
|
+
|
|
42
|
+
## Android: permissions, notifications and shell
|
|
43
|
+
|
|
44
|
+
- Runtime permission dialogs: start the session with `appium:autoGrantPermissions=${True}`; otherwise tap the dialog's button (`id=com.android.permissioncontroller:id/permission_allow_button` on recent Android versions; read the exact id with `Log Source`).
|
|
45
|
+
- `Open Notifications` expands the notification drawer; locate notifications by text with `android=new UiSelector().textContains("…")`, then `Press Keycode 4` to close it.
|
|
46
|
+
- Shell commands: `Execute Adb Shell <command> <args>` or `Execute Script mobile: shell command=getprop args=${{ ["ro.build.version.release"] }}`. Both need the server started with the insecure feature `adb_shell` allowed.
|
|
47
|
+
|
|
48
|
+
## iOS: alerts and permissions
|
|
49
|
+
|
|
50
|
+
```robotframework
|
|
51
|
+
Wait Until Page Contains Element class=XCUIElementTypeAlert timeout=5s
|
|
52
|
+
Click Alert Button Allow
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`Click Alert Button` is iOS-only and takes the button text. To accept every system alert, start the session with `appium:autoAcceptAlerts=${True}` (or `appium:autoDismissAlerts`). Checking for an optional alert:
|
|
56
|
+
|
|
57
|
+
```robotframework
|
|
58
|
+
*** Keywords ***
|
|
59
|
+
Accept Alert If Present
|
|
60
|
+
${present}= Run Keyword And Return Status
|
|
61
|
+
... Wait Until Page Contains Element class=XCUIElementTypeAlert timeout=3s
|
|
62
|
+
IF ${present} Click Alert Button Allow
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## iOS: keyboard, pickers and biometrics
|
|
66
|
+
|
|
67
|
+
```robotframework
|
|
68
|
+
Hide Keyboard Done # iOS presses the named key to dismiss the keyboard
|
|
69
|
+
@{wheels}= Get Webelements class=XCUIElementTypePickerWheel
|
|
70
|
+
Input Value ${wheels}[0] December
|
|
71
|
+
Input Value ${wheels}[1] 25
|
|
72
|
+
Touch Id match=${True} # simulator only; enrol first with Toggle Touch Id Enrollment
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`Input Value` (iOS only) sets a value directly and suits picker wheels; `Input Text` types key by key. Face ID and Touch ID on simulators can also be driven with `Execute Script mobile: sendBiometricMatch type=faceId match=${True}`.
|
|
76
|
+
|
|
77
|
+
## Both: orientation, background and app lifecycle
|
|
78
|
+
|
|
79
|
+
```robotframework
|
|
80
|
+
Landscape
|
|
81
|
+
Portrait
|
|
82
|
+
Background Application 3 # seconds in the background, then back
|
|
83
|
+
Terminate Application com.example.app # bundleId on iOS
|
|
84
|
+
Activate Application com.example.app
|
|
85
|
+
Lock 2
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`Close Application` ends the session; `Terminate Application` only stops the app and keeps the session, so the next step can `Activate Application` again.
|
|
89
|
+
|
|
90
|
+
## Hybrid apps and WebViews
|
|
91
|
+
|
|
92
|
+
```robotframework
|
|
93
|
+
Wait Until Page Contains Element class=android.webkit.WebView timeout=15s
|
|
94
|
+
@{contexts}= Get Contexts
|
|
95
|
+
Log ${contexts} # e.g. NATIVE_APP, WEBVIEW_com.example.app
|
|
96
|
+
Switch To Context WEBVIEW_com.example.app
|
|
97
|
+
Input Text css=input#email demo@example.com
|
|
98
|
+
Click Element css=button[type=submit]
|
|
99
|
+
Switch To Context NATIVE_APP
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- The WebView context appears only after the WebView has loaded, and on Android only when the app enables WebView debugging (`setWebContentsDebuggingEnabled(true)` in debug builds).
|
|
103
|
+
- Android WebViews need a chromedriver that matches the WebView version (see the chromedriver capabilities in the capabilities reference).
|
|
104
|
+
- iOS WebView context names look like `WEBVIEW_12345.1`; read them from `Get Contexts` rather than hard-coding them.
|
|
105
|
+
- In the web context, native locators (`accessibility_id=`, `android=`) do not work; switch back to `NATIVE_APP` first.
|
robotframework_plugins/_assets/plugins/rf-mobile/skills/rf-appium/references/troubleshooting.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Organised by the message you see. Environment problems (Node.js, Appium server or driver install, Android SDK, Xcode) belong to rf-setup (plugin rf-core).
|
|
4
|
+
|
|
5
|
+
- Connection refused or "Max retries exceeded"
|
|
6
|
+
- "The requested resource could not be found" on session start
|
|
7
|
+
- "Could not find a connected Android device" / "Device … was not in the list"
|
|
8
|
+
- "SessionNotCreatedException" on iOS (WebDriverAgent)
|
|
9
|
+
- "Element locator '…' did not match any elements"
|
|
10
|
+
- "Element locator with prefix '…' is not supported"
|
|
11
|
+
- "No keyword with name '…' found"
|
|
12
|
+
- "No Chromedriver found that can automate Chrome"
|
|
13
|
+
- WebView context missing from Get Contexts
|
|
14
|
+
- Session ends between steps
|
|
15
|
+
- Reading the screen when a locator fails
|
|
16
|
+
|
|
17
|
+
## Connection refused or "Max retries exceeded"
|
|
18
|
+
|
|
19
|
+
The Appium server is not running at the URL of `Open Application`. Start it (`appium`, port 4723 by default) and check `curl http://127.0.0.1:4723/status`. Tests on another machine need its address and an open port.
|
|
20
|
+
|
|
21
|
+
## "The requested resource could not be found" on session start
|
|
22
|
+
|
|
23
|
+
The URL has the wrong base path. Appium 2 and later serve at `/` by default, so `http://127.0.0.1:4723/wd/hub` fails; drop `/wd/hub`, or start the server with `--base-path /wd/hub` when old suites cannot change. Cloud providers keep their own documented path.
|
|
24
|
+
|
|
25
|
+
## "Could not find a connected Android device" / "Device … was not in the list"
|
|
26
|
+
|
|
27
|
+
`adb devices` must list the emulator or device as `device` (not `unauthorized` or `offline`). With several devices, pick one with `appium:udid=<serial>`. Accept the USB debugging prompt on real devices.
|
|
28
|
+
|
|
29
|
+
## "SessionNotCreatedException" on iOS (WebDriverAgent)
|
|
30
|
+
|
|
31
|
+
WebDriverAgent could not be built or started. On simulators, check that `appium:deviceName` and `appium:platformVersion` name an installed simulator (`xcrun simctl list devices`). On real devices, set `appium:xcodeOrgId` and `appium:xcodeSigningId` and trust the developer certificate on the device. The first build can take minutes; raise `appium:wdaLaunchTimeout`.
|
|
32
|
+
|
|
33
|
+
## "Element locator '…' did not match any elements"
|
|
34
|
+
|
|
35
|
+
- The screen was not ready: action keywords do not wait. Add `Wait Until Page Contains Element` (or `Expect Element … visible`) before the first action on a new screen.
|
|
36
|
+
- The element is off-screen in a list: Android only creates visible rows. Scroll to it first (`Scroll Down <locator>` or a `UiScrollable` locator).
|
|
37
|
+
- The context is wrong: after `Switch To Context WEBVIEW_…`, native locators no longer match, and the other way round.
|
|
38
|
+
- The locator is wrong: run `Log Source` and compare attribute names and values.
|
|
39
|
+
|
|
40
|
+
## "Element locator with prefix '…' is not supported"
|
|
41
|
+
|
|
42
|
+
Everything before the first `=` is read as a strategy. Use one of `accessibility_id`, `id`, `name`, `xpath`, `class`, `android`, `predicate`, `chain`, `css` (web context), or write an XPath starting with `//`. A value that itself contains `=` needs an explicit prefix (`id=…`).
|
|
43
|
+
|
|
44
|
+
## "No keyword with name '…' found"
|
|
45
|
+
|
|
46
|
+
The keyword was removed in AppiumLibrary 3.x or never existed (`Long Press`, `Click A Point`, `Zoom`, `Pinch`, `Quit Application`, `Reset Application`, `Background App`, `Get Window Size`). Look the name up with libdoc; the replacements are in the skill's Gotchas.
|
|
47
|
+
|
|
48
|
+
## "No Chromedriver found that can automate Chrome"
|
|
49
|
+
|
|
50
|
+
The WebView or Chrome version on the device does not match any chromedriver the UiAutomator2 driver has. Set `appium:chromedriverAutodownload=${True}` and allow the server's insecure feature `chromedriver_autodownload`, or point `appium:chromedriverExecutable` at a matching binary.
|
|
51
|
+
|
|
52
|
+
## WebView context missing from Get Contexts
|
|
53
|
+
|
|
54
|
+
Wait for the WebView to load before calling `Get Contexts`. Android apps expose WebViews only when WebView debugging is enabled in the app build; iOS WebViews of release builds on real devices are not inspectable unless the app marks them inspectable.
|
|
55
|
+
|
|
56
|
+
## Session ends between steps
|
|
57
|
+
|
|
58
|
+
The server ends a session after `appium:newCommandTimeout` seconds without a command (default 60). Long `Sleep`s or debugger pauses trigger it; raise the capability instead of adding keep-alive steps. A session also ends when a previous test crashed the app: open it again in Test Setup or use per-test sessions.
|
|
59
|
+
|
|
60
|
+
## Reading the screen when a locator fails
|
|
61
|
+
|
|
62
|
+
`run_on_failure` captures a screenshot by default (`Capture Page Screenshot`). Add the view hierarchy while debugging:
|
|
63
|
+
|
|
64
|
+
```robotframework
|
|
65
|
+
Log Source loglevel=INFO
|
|
66
|
+
${source}= Get Source
|
|
67
|
+
Create File ${OUTPUT_DIR}/screen.xml ${source}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Keywords with a `loglevel` argument (`Expect Element`, `Page Should Contain Element`) already log the source when they fail; pass `loglevel=NONE` to turn that off.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rf-web",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Browser Library (Playwright) and SeleniumLibrary skills for Robot Framework web tests.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "manykarim",
|
|
7
|
+
"email": "manykarim@users.noreply.github.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/MarketSquare/robotframework-plugins",
|
|
10
|
+
"repository": "https://github.com/MarketSquare/robotframework-plugins",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"robotframework",
|
|
14
|
+
"testing",
|
|
15
|
+
"web-testing",
|
|
16
|
+
"playwright",
|
|
17
|
+
"selenium"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": [
|
|
20
|
+
{
|
|
21
|
+
"name": "rf-core",
|
|
22
|
+
"version": "^1.0"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
The `rf-web` plugin, versioned on its own (`rf-web--v<version>` tags); see `RELEASING.md` at the repository root.
|
|
4
|
+
|
|
5
|
+
## 1.0.0 (unreleased)
|
|
6
|
+
|
|
7
|
+
First release, split out of `rf-agentskills` 3.0.0: `rf-browser` and `rf-selenium`. It depends on `rf-core` `^1.0`. Skill names are unchanged; their plugin prefix is now `rf-web:` instead of `rf-agentskills:`, for example `/rf-web:rf-browser`.
|
|
8
|
+
|
|
9
|
+
- **Install steps moved here** from `rf-setup`: `rf-browser` and `rf-selenium` each have `references/install.md`, with the full post-install steps, verification, troubleshooting and the CI step. `rf-browser` also has `references/migrate-from-selenium.md`, the SeleniumLibrary → Browser keyword map that `rf-migration-guide` used to carry.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# rf-web plugin
|
|
2
|
+
|
|
3
|
+
Robot Framework skills for web tests. Install instructions for every agent are in the [repository README](https://github.com/MarketSquare/robotframework-plugins#install).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/plugin install rf-web --marketplace MarketSquare/robotframework-plugins
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That one step works on Claude Code 2.1.275 or later. The commands for other agents and older versions are in the repository README.
|
|
12
|
+
|
|
13
|
+
| Skill | Library and package |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `rf-browser` | Browser Library (Playwright): `robotframework-browser` |
|
|
16
|
+
| `rf-selenium` | SeleniumLibrary: `robotframework-seleniumlibrary` |
|
|
17
|
+
|
|
18
|
+
## Needs rf-core
|
|
19
|
+
|
|
20
|
+
This plugin depends on `rf-core`, which holds Robot Framework syntax, environment setup, the subagents and the validation hooks. Claude Code installs `rf-core` with it. Copilot CLI and Codex don't install plugin dependencies, so install `rf-core` there too:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
copilot plugin install rf-core@robotframework-plugins
|
|
24
|
+
codex plugin add rf-core@robotframework-plugins
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `robotframework-plugins` installer adds `rf-core` for you. Don't install this plugin next to the `rf-agentskills` bundle: the bundle carries its own copy of every skill, and you would see each skill twice.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Programme manifest: see schemas/catalog.schema.json and CONTRIBUTING.md.
|
|
2
|
+
name: rf-web
|
|
3
|
+
summary: Browser Library and SeleniumLibrary skills for web tests.
|
|
4
|
+
tier: verified
|
|
5
|
+
status: active
|
|
6
|
+
maintainers:
|
|
7
|
+
- github: manykarim
|
|
8
|
+
name: Many Kasiriha
|
|
9
|
+
libraries:
|
|
10
|
+
- name: Browser
|
|
11
|
+
package: robotframework-browser
|
|
12
|
+
versions: ">=20,<21"
|
|
13
|
+
skills: [rf-browser]
|
|
14
|
+
- name: SeleniumLibrary
|
|
15
|
+
package: robotframework-seleniumlibrary
|
|
16
|
+
versions: ">=6.9,<7"
|
|
17
|
+
skills: [rf-selenium]
|
|
18
|
+
robotframework: ">=7.0"
|
|
19
|
+
agents:
|
|
20
|
+
- claude-code
|
|
21
|
+
- copilot-cli
|
|
22
|
+
- vscode-copilot
|
|
23
|
+
- codex
|
|
24
|
+
- cursor
|
|
25
|
+
- opencode
|
|
26
|
+
- goose
|
|
27
|
+
- claude-desktop
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rf-browser
|
|
3
|
+
description: "Use first, before answering, for RF web tests with Browser Library (Playwright): selectors."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
compatibility: Requires Python 3.10+, robotframework>=7, robotcode[all]>=2.8 and robotframework-browser in the project environment. Node.js 22+ LTS only when the robotframework-browser[bb] batteries extra is not used. Needs network access for rfbrowser install.
|
|
6
|
+
metadata:
|
|
7
|
+
author: manykarim
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Browser Library Skill
|
|
12
|
+
|
|
13
|
+
Browser Library drives Chromium, Firefox and WebKit through Playwright: auto-waiting actions, retrying assertions, one isolated context per session. It is the default for new web tests; for suites that already import SeleniumLibrary, use rf-selenium.
|
|
14
|
+
Verified against Browser 19.14.2, Robot Framework 7.4.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
Load this skill first, before exploring the project or answering from memory, when a Robot Framework web UI test uses Browser Library (`Library Browser`, Playwright):
|
|
19
|
+
|
|
20
|
+
- writing or fixing a web test: pages, contexts and tabs, CSS/text/XPath selectors including iframes and shadow DOM, auto-waiting, assertions with an operator, downloads, storage state;
|
|
21
|
+
- a click or selector times out (`TimeoutError: locator.click`), or the user mentions Browser Library, Playwright or rfbrowser, even if they only say "browser lib";
|
|
22
|
+
- a new web test with no library chosen yet: Browser Library is the default.
|
|
23
|
+
|
|
24
|
+
Not this skill: suites that import SeleniumLibrary or run on WebDriver/Selenium Grid use `rf-selenium`; installing the library or errors in its Node.js `rfbrowser init` step use `rf-setup` (plugin `rf-core`).
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
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`).
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv add "robotframework-browser[bb]"
|
|
32
|
+
uv run rfbrowser install chromium
|
|
33
|
+
```
|
|
34
|
+
BrowserBatteries (`[bb]`) ships the Playwright wrapper, so no Node.js is needed. `rfbrowser install` downloads the browser binaries.
|
|
35
|
+
|
|
36
|
+
Node.js escape hatch — only if no BrowserBatteries wheel exists for your platform, or you need Node plugins (Node 22/24/26 LTS):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv add robotframework-browser
|
|
40
|
+
uv run rfbrowser init chromium
|
|
41
|
+
```
|
|
42
|
+
Don't mix the paths: `rfbrowser install` belongs to `[bb]`, `rfbrowser init` to the Node.js path.
|
|
43
|
+
|
|
44
|
+
## Import and defaults
|
|
45
|
+
|
|
46
|
+
Import the library without arguments; its defaults are the recommendation: strict mode on, `timeout=10s` for actions and waits, `retry_assertions_for=1s`, `auto_closing_level=TEST`, and a screenshot on every failing Browser keyword.
|
|
47
|
+
|
|
48
|
+
```robotframework
|
|
49
|
+
*** Settings ***
|
|
50
|
+
Library Browser
|
|
51
|
+
Suite Setup Open Test Browser
|
|
52
|
+
Test Setup New Page ${URL}
|
|
53
|
+
|
|
54
|
+
*** Variables ***
|
|
55
|
+
${URL} https://example.com
|
|
56
|
+
|
|
57
|
+
*** Keywords ***
|
|
58
|
+
Open Test Browser
|
|
59
|
+
New Browser chromium headless=True
|
|
60
|
+
New Context viewport={'width': 1280, 'height': 800}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The browser and context opened in Suite Setup live until the suite ends; each test gets a fresh page that is closed at test end. Use a new context per test when tests must not share cookies or storage, or per user in multi-user tests — see `references/browser-context-page.md`. Reuse a login with `storageState` — see `references/authentication-storage.md`.
|
|
64
|
+
|
|
65
|
+
## Which keyword for which situation
|
|
66
|
+
|
|
67
|
+
| Situation | Use | Details |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| Click, hover, check | `Click`, `Hover`, `Check Checkbox` (auto-wait for actionability) | `references/locators.md` |
|
|
70
|
+
| Enter text | `Fill Text`; `Type Text` when key events matter; `Fill Secret` for passwords | — |
|
|
71
|
+
| Choose from a `<select>` | `Select Options By select#country value US` | — |
|
|
72
|
+
| Assert text, URL, count, state | Getter + operator: `Get Text h1 == Welcome`, `Get Url contains /home`, `Get Element Count li == 3` | `references/assertion-engine.md` |
|
|
73
|
+
| Wait for appear/disappear | `Wait For Elements State .spinner hidden` | `references/assertion-engine.md` |
|
|
74
|
+
| Wait for page load or an API call | `Wait For Load State networkidle`; `Promise To Wait For Response **/api/items` before the click, `Wait For` after it | `references/troubleshooting.md` |
|
|
75
|
+
| Retry any getter until true | `Wait For Condition Text h1 == Done` | `references/assertion-engine.md` |
|
|
76
|
+
| Element inside an iframe or shadow DOM | `Click iframe#pay >>> button#submit`; CSS pierces open shadow roots | `references/iframes-shadow-dom.md` |
|
|
77
|
+
| Popup, new tab, several pages | `Switch Page NEW`, `Get Page Ids`, `Close Page` | `references/browser-context-page.md` |
|
|
78
|
+
| Log in once, reuse the session | `Save Storage State`, then `New Context storageState=${state}` | `references/authentication-storage.md` |
|
|
79
|
+
| Upload or download a file | `Upload File By Selector`; `Promise To Wait For Download` + `Wait For` | `references/downloads-uploads.md` |
|
|
80
|
+
| Run JavaScript on the page | `Evaluate JavaScript ${None} () => document.title` | — |
|
|
81
|
+
|
|
82
|
+
## Agent workflow
|
|
83
|
+
|
|
84
|
+
1. Look up each keyword before you use it: `robotcode doc keyword Browser "<Keyword>"`; find names with `robotcode doc keywords Browser "<text>"`. Copy names and arguments exactly as robotcode shows them.
|
|
85
|
+
2. Write the test with the defaults above and the decision table.
|
|
86
|
+
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.
|
|
87
|
+
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`.
|
|
88
|
+
5. Read the results: `robotcode results show --failed`, then `robotcode results log -bl "<longname>"`. Don't parse output.xml by hand.
|
|
89
|
+
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.
|
|
90
|
+
|
|
91
|
+
## Selector strategy
|
|
92
|
+
|
|
93
|
+
Prefer, in order: test ids (`[data-testid="save"]`), accessible roles (`role=button[name="Save"]`), short CSS, text (`text=Save`), XPath last. Narrow with `>>` chaining (`.cart >> text=Remove`) or `>> nth=0` instead of long absolute paths. Details: `references/locators.md`.
|
|
94
|
+
|
|
95
|
+
## Gotchas
|
|
96
|
+
|
|
97
|
+
- **Strict mode fails on several matches** — actions and getters fail when a selector matches more than one element, because the import default is `strict=True`. Make the selector unique or add `>> nth=0`; switch it off for one scope with `Set Strict Mode False` only when the page really has duplicates.
|
|
98
|
+
- **A plain getter does not retry** — `${t}= Get Text h1` followed by `Should Be Equal` checks once. Getters with an assertion operator (`Get Text h1 == Welcome`) retry for `retry_assertions_for` (default 1 s). Put the operator in the getter; for longer waits raise it with `Set Retry Assertions For` or use `Wait For Condition`, and never add `Sleep`.
|
|
99
|
+
- **Two different timeouts** — `timeout` (default 10 s, `Set Browser Timeout`) bounds actions and waits; `retry_assertions_for` bounds assertion retries. A slow assertion needs the second one raised, not the first.
|
|
100
|
+
- **`Wait Until Network Is Idle` is deprecated** — use `Wait For Load State networkidle`, or better wait for the element or response you need (`Wait For Elements State`, `Wait For Response`).
|
|
101
|
+
- **`Fill Text` sets the value in one step** — it fills and fires one input event, so key handlers (autocomplete, masks) never see keystrokes. Use `Type Text` (keydown/keypress/keyup per character) or `Press Keys` there.
|
|
102
|
+
- **`Fill Secret` rejects `${password}`** — it takes a Robot Framework 7.4 `Secret` variable, or the name as `$password` / `%ENV_VAR`, so the value is not logged. A plain `${password}` string fails; use `Fill Text` if hiding is not needed.
|
|
103
|
+
- **`auto_closing_level=TEST` closes what a test opened** — contexts and pages created inside a test close when it ends; those from Suite Setup live until suite teardown. Open shared browser/context in Suite Setup. `KEEP` leaves browsers and the node process running and is meant for local development only, not CI.
|
|
104
|
+
- **`New Page` without a browser uses defaults** — it silently runs `New Browser` and `New Context` with default values (headless Chromium, default viewport), so a `viewport`, `storageState` or `httpCredentials` you meant to set is missing. Call `New Browser` and `New Context` first.
|
|
105
|
+
- **Selector shortcuts** — a selector starting with `//` or `..` is XPath, one in quotes (`"Login"`) is exact text, anything else is CSS; `text=Login` matches case-insensitively as a substring. A cell that starts with `#` is a Robot Framework comment: write `id=login` or `\#login`. XPath does not pierce shadow roots; frames need `>>>`.
|
|
106
|
+
- **No screenshot teardown needed** — `run_on_failure` defaults to `Take Screenshot fail-screenshot-{index}`, so a `Run Keyword If Test Failed Take Screenshot` teardown only duplicates it.
|
|
107
|
+
|
|
108
|
+
## When to read the references
|
|
109
|
+
|
|
110
|
+
| Read | When |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `references/install.md` | installing the library, its post-install steps, verifying the install, or a failed post-install step |
|
|
113
|
+
| `references/migrate-from-selenium.md` | a suite moves from SeleniumLibrary to Browser: the keyword map |
|
|
114
|
+
| `references/locators.md` | a selector is ambiguous, brittle, or needs chaining, `nth=`, `:has()` or role selectors |
|
|
115
|
+
| `references/assertion-engine.md` | you need an operator other than `==`/`contains`, `validate`, or custom wait logic |
|
|
116
|
+
| `references/browser-context-page.md` | several browsers, contexts or users; popups and tabs; video/tracing; closing levels |
|
|
117
|
+
| `references/iframes-shadow-dom.md` | an element sits inside an iframe or a web component |
|
|
118
|
+
| `references/authentication-storage.md` | reusing a login, HTTP auth, cookies or local/session storage |
|
|
119
|
+
| `references/downloads-uploads.md` | a test uploads or downloads files |
|
|
120
|
+
| `references/troubleshooting.md` | a run fails with an error message you need to decode |
|
|
121
|
+
|
|
122
|
+
Examples in `assets/examples/`: `basic-web-test.robot`, `form-handling.robot`, `authentication-flow.robot`, `iframe-shadow-dom.robot`.
|
|
123
|
+
|
|
124
|
+
## Companion Skills
|
|
125
|
+
|
|
126
|
+
| Need | Skill |
|
|
127
|
+
|------|-------|
|
|
128
|
+
| Web UI tests with SeleniumLibrary (WebDriver) | `rf-selenium` |
|
|
129
|
+
| Install Robot Framework or a library, fix the environment | `rf-setup` (plugin `rf-core`) |
|
|
130
|
+
| Write tests, suites, user keywords, resources and variables in Robot Framework syntax | `rf-language` (plugin `rf-core`) |
|
|
131
|
+
|
|
132
|
+
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,34 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Log in once in Suite Setup, save the storage state and
|
|
3
|
+
... reuse it in every test's context (no login per test).
|
|
4
|
+
Library Browser
|
|
5
|
+
Suite Setup Log In Once
|
|
6
|
+
|
|
7
|
+
*** Variables ***
|
|
8
|
+
${BASE_URL} https://the-internet.herokuapp.com
|
|
9
|
+
${USER} tomsmith
|
|
10
|
+
${PASSWORD} SuperSecretPassword!
|
|
11
|
+
|
|
12
|
+
*** Test Cases ***
|
|
13
|
+
Secure Area Without Logging In Again
|
|
14
|
+
New Context storageState=${STATE}
|
|
15
|
+
New Page ${BASE_URL}/secure
|
|
16
|
+
Get Url contains /secure
|
|
17
|
+
Get Text h2 contains Secure Area
|
|
18
|
+
|
|
19
|
+
Fresh Context Is Logged Out
|
|
20
|
+
New Context
|
|
21
|
+
New Page ${BASE_URL}/secure
|
|
22
|
+
Get Url contains /login
|
|
23
|
+
|
|
24
|
+
*** Keywords ***
|
|
25
|
+
Log In Once
|
|
26
|
+
New Browser chromium headless=True
|
|
27
|
+
New Context
|
|
28
|
+
New Page ${BASE_URL}/login
|
|
29
|
+
Fill Text id=username ${USER}
|
|
30
|
+
Fill Secret id=password $PASSWORD
|
|
31
|
+
Click button[type="submit"]
|
|
32
|
+
Get Url contains /secure
|
|
33
|
+
${state}= Save Storage State
|
|
34
|
+
VAR ${STATE} ${state} scope=SUITE
|
robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/basic-web-test.robot
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Basic Browser Library suite: shared browser and context from
|
|
3
|
+
... Suite Setup, a fresh page per test, getter assertions.
|
|
4
|
+
Library Browser
|
|
5
|
+
Suite Setup Open Test Browser
|
|
6
|
+
Test Setup New Page ${URL}
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${URL} https://example.com
|
|
10
|
+
|
|
11
|
+
*** Test Cases ***
|
|
12
|
+
Title And Heading
|
|
13
|
+
Get Title == Example Domain
|
|
14
|
+
Get Text h1 == Example Domain
|
|
15
|
+
Get Element Count p >= 1
|
|
16
|
+
|
|
17
|
+
Link Navigates
|
|
18
|
+
Get Attribute a href contains iana.org
|
|
19
|
+
Click a
|
|
20
|
+
Get Url contains iana.org
|
|
21
|
+
|
|
22
|
+
Element States
|
|
23
|
+
Get Element States h1 contains visible
|
|
24
|
+
Get Text p >> nth=0 contains documentation
|
|
25
|
+
|
|
26
|
+
*** Keywords ***
|
|
27
|
+
Open Test Browser
|
|
28
|
+
New Browser chromium headless=True
|
|
29
|
+
New Context viewport={'width': 1280, 'height': 800}
|
robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/assets/examples/form-handling.robot
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Form handling: text, secrets, checkboxes, dropdowns and
|
|
3
|
+
... validation messages on the-internet.herokuapp.com.
|
|
4
|
+
Library Browser
|
|
5
|
+
Suite Setup Open Test Browser
|
|
6
|
+
Test Setup New Page ${BASE_URL}
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${BASE_URL} https://the-internet.herokuapp.com
|
|
10
|
+
${USER} tomsmith
|
|
11
|
+
${PASSWORD} SuperSecretPassword!
|
|
12
|
+
|
|
13
|
+
*** Test Cases ***
|
|
14
|
+
Valid Login
|
|
15
|
+
Go To ${BASE_URL}/login
|
|
16
|
+
Fill Text id=username ${USER}
|
|
17
|
+
Fill Secret id=password $PASSWORD
|
|
18
|
+
Click button[type="submit"]
|
|
19
|
+
Get Url contains /secure
|
|
20
|
+
Get Text id=flash contains You logged into a secure area
|
|
21
|
+
|
|
22
|
+
Invalid Login Shows Error
|
|
23
|
+
Go To ${BASE_URL}/login
|
|
24
|
+
Fill Text id=username nobody
|
|
25
|
+
Fill Text id=password wrong
|
|
26
|
+
Click button[type="submit"]
|
|
27
|
+
Get Text id=flash contains Your username is invalid
|
|
28
|
+
|
|
29
|
+
Checkboxes
|
|
30
|
+
Go To ${BASE_URL}/checkboxes
|
|
31
|
+
Check Checkbox input[type="checkbox"] >> nth=0
|
|
32
|
+
Uncheck Checkbox input[type="checkbox"] >> nth=1
|
|
33
|
+
Get Checkbox State input[type="checkbox"] >> nth=0 == checked
|
|
34
|
+
Get Checkbox State input[type="checkbox"] >> nth=1 == unchecked
|
|
35
|
+
|
|
36
|
+
Dropdown
|
|
37
|
+
Go To ${BASE_URL}/dropdown
|
|
38
|
+
Select Options By id=dropdown label Option 2
|
|
39
|
+
Get Selected Options id=dropdown label == Option 2
|
|
40
|
+
|
|
41
|
+
Typing For Key Handlers
|
|
42
|
+
Go To ${BASE_URL}/key_presses
|
|
43
|
+
Type Text id=target a delay=50ms
|
|
44
|
+
Get Text id=result == You entered: A
|
|
45
|
+
|
|
46
|
+
*** Keywords ***
|
|
47
|
+
Open Test Browser
|
|
48
|
+
New Browser chromium headless=True
|
|
49
|
+
New Context
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Frames with >>> and shadow DOM piercing with plain CSS.
|
|
3
|
+
Library Browser
|
|
4
|
+
Suite Setup Open Test Browser
|
|
5
|
+
Test Setup New Page ${BASE_URL}
|
|
6
|
+
|
|
7
|
+
*** Variables ***
|
|
8
|
+
${BASE_URL} https://the-internet.herokuapp.com
|
|
9
|
+
|
|
10
|
+
*** Test Cases ***
|
|
11
|
+
Nested Frames
|
|
12
|
+
Go To ${BASE_URL}/nested_frames
|
|
13
|
+
Get Text frame[name="frame-top"] >>> frame[name="frame-left"] >>> body contains LEFT
|
|
14
|
+
Get Text frame[name="frame-bottom"] >>> body contains BOTTOM
|
|
15
|
+
|
|
16
|
+
Many Steps In One Frame
|
|
17
|
+
Go To ${BASE_URL}/nested_frames
|
|
18
|
+
${old}= Set Selector Prefix frame[name="frame-top"] >>> frame[name="frame-middle"] >>>
|
|
19
|
+
Get Text id=content == MIDDLE
|
|
20
|
+
Set Selector Prefix ${old}
|
|
21
|
+
|
|
22
|
+
Shadow DOM
|
|
23
|
+
Go To ${BASE_URL}/shadowdom
|
|
24
|
+
# CSS pierces open shadow roots: no special syntax needed.
|
|
25
|
+
Get Text my-paragraph >> span[slot="my-text"] >> nth=0 contains text
|
|
26
|
+
Get Element Count css=my-paragraph p >= 1
|
|
27
|
+
|
|
28
|
+
*** Keywords ***
|
|
29
|
+
Open Test Browser
|
|
30
|
+
New Browser chromium headless=True
|
|
31
|
+
New Context
|
robotframework_plugins/_assets/plugins/rf-web/skills/rf-browser/references/assertion-engine.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Assertion Engine
|
|
2
|
+
|
|
3
|
+
- How getter assertions work
|
|
4
|
+
- Operators
|
|
5
|
+
- Types of expected values
|
|
6
|
+
- validate and then
|
|
7
|
+
- Waiting keywords
|
|
8
|
+
- Timeouts
|
|
9
|
+
|
|
10
|
+
## How getter assertions work
|
|
11
|
+
|
|
12
|
+
Every getter with `assertion_operator` / `assertion_expected` arguments (`Get Text`, `Get Title`, `Get Url`, `Get Element Count`, `Get Element States`, `Get Property`, `Get Attribute`, `Get Classes`, `Get Style`, `Get Checkbox State`, `Get Selected Options`, `LocalStorage Get Item`, …) asserts and returns the value in one step. With an operator it retries until the assertion passes or `retry_assertions_for` runs out; without one it reads once.
|
|
13
|
+
|
|
14
|
+
```robotframework
|
|
15
|
+
*** Test Cases ***
|
|
16
|
+
Getter Assertions
|
|
17
|
+
Get Text h1 == Welcome
|
|
18
|
+
Get Url contains /dashboard
|
|
19
|
+
Get Element Count li.item >= 3
|
|
20
|
+
Get Element States button#save contains enabled
|
|
21
|
+
Get Attribute a.help href ^= https://
|
|
22
|
+
Get Text .error == Required message=Form did not show {expected}, got {value}
|
|
23
|
+
${title}= Get Title != ${EMPTY}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`message=` replaces the default failure message; `{value}`, `{expected}`, `{value_type}` and `{expected_type}` are filled in.
|
|
27
|
+
|
|
28
|
+
## Operators
|
|
29
|
+
|
|
30
|
+
| Operator | Also written | Passes when |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `==` | `equal`, `equals`, `should be` | value equals expected |
|
|
33
|
+
| `!=` | `inequal`, `should not be` | value differs |
|
|
34
|
+
| `>` `>=` `<` `<=` | `greater than`, `less than` | numeric (or character-wise string) comparison |
|
|
35
|
+
| `*=` | `contains` | expected is a substring / member |
|
|
36
|
+
| `not contains` | | expected is not contained |
|
|
37
|
+
| `^=` | `starts`, `should start with` | value starts with expected |
|
|
38
|
+
| `$=` | `ends`, `should end with` | value ends with expected |
|
|
39
|
+
| `matches` | | regular expression matches somewhere in the value |
|
|
40
|
+
| `validate` | | Python expression over `value` is true |
|
|
41
|
+
| `then` | `evaluate` | returns the Python expression over `value` (no assertion) |
|
|
42
|
+
|
|
43
|
+
For `Get Element States`, `contains` and `not contains` check states such as `visible`, `hidden`, `enabled`, `disabled`, `editable`, `checked`, `focused`, `attached`, `detached`.
|
|
44
|
+
|
|
45
|
+
## Types of expected values
|
|
46
|
+
|
|
47
|
+
The expected value is not converted: `Get Text` returns a string, so compare it with a string. Getters that return numbers (`Get Element Count`, filtered `Get Viewport Size`, `Get BoundingBox`) convert the expected value to a number. String `<`/`>` compares character by character (`'100' < '2'`).
|
|
48
|
+
|
|
49
|
+
## validate and then
|
|
50
|
+
|
|
51
|
+
```robotframework
|
|
52
|
+
*** Test Cases ***
|
|
53
|
+
Validate And Then
|
|
54
|
+
Get Text .price validate float(value.strip('$')) > 10
|
|
55
|
+
Get Element Count li.item validate value % 2 == 0
|
|
56
|
+
${upper}= Get Title then value.upper()
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Waiting keywords
|
|
60
|
+
|
|
61
|
+
| Need | Keyword |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Element appears, disappears, becomes enabled | `Wait For Elements State .spinner hidden timeout=20s` |
|
|
64
|
+
| Any getter reaches a value, with its own timeout | `Wait For Condition Text h1 == Done timeout=20s` |
|
|
65
|
+
| Page load state | `Wait For Load State networkidle` (`load`, `domcontentloaded`, `networkidle`, `commit`) |
|
|
66
|
+
| Navigation to a URL | `Wait For Navigation **/success` |
|
|
67
|
+
| A JavaScript predicate | `Wait For Function () => window.appReady === true` |
|
|
68
|
+
| A network response | `Promise To Wait For Response **/api/items`, trigger, then `Wait For` |
|
|
69
|
+
|
|
70
|
+
`Wait For Condition` takes the getter name without `Get` (`Text`, `Url`, `Title`, `Element Count`, `Element States`, `Attribute`, `Property`, …) followed by the getter's own arguments.
|
|
71
|
+
|
|
72
|
+
## Timeouts
|
|
73
|
+
|
|
74
|
+
| Setting | Default | Scope keyword | Bounds |
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| `timeout` | 10 s | `Set Browser Timeout` | actions, waits, `Switch Page NEW` |
|
|
77
|
+
| `retry_assertions_for` | 1 s | `Set Retry Assertions For` | getter assertion retries |
|
|
78
|
+
|
|
79
|
+
Both scope keywords take `scope=Global|Suite|Test` (default `Suite`). A per-call `timeout=` on wait keywords overrides `timeout` for that call only.
|