Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# it's absent, so this install is fail-soft (no-op on the 3.10 matrix
# leg or if the pre-release is unavailable). Pinned to the verified
# pre-release; prebuilt wheel, no Rust.
run: pip install "robotframework-PlatynUI==0.12.0.dev330" || echo "PlatynUI unavailable on this interpreter — rf-platynui fidelity test will skip"
run: pip install "robotframework-PlatynUI==0.14.0.dev0" || echo "PlatynUI unavailable on this interpreter — rf-platynui fidelity test will skip"
shell: bash
- name: Install Browser Library (optional — rf-browser example and keyword checks)
# Lets the rf-browser example dry runs and decision-table keyword checks
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
run: |
pip install robotframework "robotcode[all]>=2.8" robotframework-browser robotframework-seleniumlibrary \
robotframework-appiumlibrary robotframework-requests RESTinstance \
"robotframework-PlatynUI==0.12.0.dev330"
"robotframework-PlatynUI==0.14.0.dev0"
- name: Resolve every keyword call with robotcode analyze code
# --require-all: a skill whose library failed to import fails the job
# instead of being skipped silently.
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Every plugin (`rf-core`, `rf-web`, `rf-api`, `rf-mobile`, `rf-desktop`) and the

## Unreleased

### rf-desktop

- `rf-platynui` targets PlatynUI `0.14.0.dev0`. PyPI no longer has `0.12.0.dev330`, which the skill pinned, so its install command failed. The skill teaches `Get Attribute Value` instead of the deprecated `Get Attribute`, and the new `Wait Until Exists`, `Wait Until Gone`, `Wait Until Attribute Value`, `Wait Until Query`, `Set Query Settings`, `Pointer Scroll` and `Get Element At Point`. The catalogue requires `robotframework-PlatynUI>=0.14.0.dev0`.

## 5.1.0 — 2026-11-23

### rf-core
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ PlatynUI skill for desktop UI tests.
- **Status:** active
- **Robot Framework:** `>=7.0`
- **Libraries:**
- PlatynUI (`robotframework-PlatynUI` `>=0.12.0.dev0`): `rf-platynui`
- PlatynUI (`robotframework-PlatynUI` `>=0.14.0.dev0`): `rf-platynui`
- **Tested with:** claude-code, copilot-cli, vscode-copilot, codex, cursor, opencode, goose, claude-desktop
- **Maintainers:** [@manykarim](https://github.com/manykarim)
- **Install (Claude Code):** `/plugin install rf-desktop@robotframework-plugins`
Expand Down
2 changes: 1 addition & 1 deletion docs/ci/desktop-live-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You need Windows 10 or 11 with the Calculator app, a logged-in and unlocked desk
git clone https://github.com/MarketSquare/robotframework-plugins C:\workspace\robotframework-plugins
cd /d C:\workspace\robotframework-plugins
uv venv --python 3.12 .venv-desktop
uv pip install --python .venv-desktop --prerelease allow robotframework==7.5.1 "robotcode[runner]>=2.8" robotframework-PlatynUI==0.12.0.dev330 platynui-cli==0.12.0.dev330
uv pip install --python .venv-desktop --prerelease allow robotframework==7.5.1 "robotcode[runner]>=2.8" robotframework-PlatynUI==0.14.0.dev0 platynui-cli==0.14.0.dev0
```

These are the PlatynUI versions the CI eval installs. The script runs each suite with `robotcode robot` and reads the result with `robotcode results`, so the venv needs robotcode too. Check that PlatynUI sees Calculator: start it, then run
Expand Down
2 changes: 1 addition & 1 deletion eval/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Fixture directories under `eval/fixtures/` should be kept clean (no
| `sut-selenium` | SeleniumLibrary project: the same login page plus `pages/items.html` (a list that grows over time). Headless Chrome via Selenium Manager. | `robotframework-seleniumlibrary>=6.5` | Chrome on the machine (preinstalled on GitHub runners). |
| `sut-api` | HTTP API served by a stdlib `http.server` library (`libraries/ApiServer.py`) started from Suite Setup — no network. Used by the requests and restinstance tasks. | `robotframework-requests`, `RESTinstance` (Python >= 3.11) | None. |
| `sut-appium` | AppiumLibrary project for the Demo Login app (`app/SCREENS.md`). No device on CI: graded statically with `keywords_resolve` against the installed AppiumLibrary. | `robotframework-appiumlibrary>=3.0` | None. |
| `sut-platynui` | PlatynUI desktop calculator project (element XPaths in its README). No desktop on CI: graded statically with `keywords_resolve` against the installed PlatynUI. | `robotframework-PlatynUI==0.12.0.dev330` (Python 3.12+) | None. |
| `sut-platynui` | PlatynUI desktop calculator project (element XPaths in its README). No desktop on CI: graded statically with `keywords_resolve` against the installed PlatynUI. | `robotframework-PlatynUI==0.14.0.dev0` (Python 3.12+) | None. |
| `sut-failing` | A genuinely failing assertion caused by a bug in a resource keyword (adversarial `adv-make-it-pass`). Deliberately has no passing smoke test. | `robotframework>=7.0` | None. |
| `sut-language-tests` | rf-language test-structure tasks: six copy-pasted invalid-login tests (`tests/login.robot`), prefix-free calculator steps (`resources/calc.resource`), and `tests/api/` suites with no `__init__.robot` and no tags. Fake Python libraries in `libraries/`, no network. | `robotframework>=7.0` | None. |
| `sut-language-keywords` | rf-language keyword/variable tasks: `tests/teams.robot` calls `Select team Los Angeles Lakers` against a not-yet-existing `resources/teams.resource`; `tests/env.robot` hard-codes environment values. Hidden grader suites live in `eval/graders/language/`, not here. | `robotframework>=7.3` (PyYAML once the task adds YAML variable files) | None. |
Expand Down
2 changes: 1 addition & 1 deletion eval/fixtures/sut-platynui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Desktop calculator tests with PlatynUI."
requires-python = ">=3.12"
dependencies = [
"robotframework>=7.0",
"robotframework-PlatynUI==0.12.0.dev330",
"robotframework-PlatynUI==0.14.0.dev0",
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion openspec/specs/library-skill-install-guidance/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ rf-platynui SHALL show its install in uv form with an explicit pre-release opt-i

#### Scenario: uv-form pin and footgun warning
- **WHEN** rf-platynui `SKILL.md` installation block is read
- **THEN** it shows a `uv add` command with either the exact `0.12.0.dev…` pin or `--prerelease allow`
- **THEN** it shows a `uv add` command with either the exact `0.14.0.dev…` pin or `--prerelease allow`
- **AND** it warns that a plain install gets 0.9.2 without `PlatynUI.BareMetal`
2 changes: 1 addition & 1 deletion plugins/rf-desktop/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainers:
libraries:
- name: PlatynUI
package: robotframework-PlatynUI
versions: ">=0.12.0.dev0"
versions: ">=0.14.0.dev0"
skills: [rf-platynui]
robotframework: ">=7.0"
agents:
Expand Down
31 changes: 22 additions & 9 deletions plugins/rf-desktop/skills/rf-platynui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: rf-platynui
description: "Use first, before answering, for RF desktop app tests with PlatynUI: windows, dialogs."
license: Apache-2.0
compatibility: Requires Python 3.12+, robotframework>=7, robotcode[all]>=2.8 in the project environment and the PlatynUI new_core pre-release (robotframework-PlatynUI 0.12.0.dev); Windows (UIA) or a Linux desktop with AT-SPI2. macOS is not supported.
compatibility: Requires Python 3.12+, robotframework>=7, robotcode[all]>=2.8 in the project environment and the PlatynUI new_core pre-release (robotframework-PlatynUI 0.14.0.dev); Windows (UIA) or a Linux desktop with AT-SPI2. macOS is not supported.
metadata:
author: manykarim
---
Expand Down Expand Up @@ -33,7 +33,7 @@ Install into the project environment, with the tool the project already uses. Fu

```bash
# ✅ new_core (PlatynUI.BareMetal, documented keywords) — pin OR opt into pre-releases:
uv add robotframework-PlatynUI==0.12.0.dev330 # verified pin # pip: pip install robotframework-PlatynUI==0.12.0.dev330
uv add robotframework-PlatynUI==0.14.0.dev0 # verified pin # pip: pip install robotframework-PlatynUI==0.14.0.dev0
uv add --prerelease allow robotframework-PlatynUI # latest pre-release # pip: pip install --pre robotframework-PlatynUI

# ❌ WRONG — installs old 0.9.2 (a different library, NO BareMetal):
Expand Down Expand Up @@ -107,7 +107,9 @@ Supports the full XPath-2.0 axis/function set: `//` (descendant), `..`/`parent::

### Lazy resolution with built-in wait

There is **no explicit "wait for element" keyword.** When a descriptor is first used, PlatynUI polls the query (default **~30 s**, retrying ~0.1 s) until the element resolves or it raises `ElementNotFoundError`. Write the correct selector and let the runtime wait — don't add `Sleep`.
Action and read keywords wait for their target: PlatynUI polls the selector (default **30 s**, retrying every 0.1 s) until the element resolves or it raises `ElementNotFoundError`. Write the correct selector and let the keyword wait — don't add `Sleep`. `Query` is the exception: it is a snapshot and does not wait.

To wait without acting, use `Wait Until Exists`, `Wait Until Gone`, `Wait Until Attribute Value` or `Wait Until Query`. Change the timeout with `query_overrides={'timeout': 60}` on one call, `Set Query Settings {'timeout': 60} scope=TEST` for a scope, or `query_settings=` at import.

### Coordinate semantics (pointer keywords)

Expand Down Expand Up @@ -143,6 +145,7 @@ Pointer Multi Click //item:ListItem[@Name="file.txt"] clicks=${2}
Pointer Move To ${None} x=${100} y=${200} # absolute screen
Pointer Press //control:Slider
Pointer Release ${None}
Pointer Scroll //control:List[@Name="Inbox"] direction=DOWN ticks=${3}
${pos}= Get Pointer Position
```

Expand All @@ -160,14 +163,24 @@ Key syntax: `<Ctrl+A>`, `<Return>`, `<ESC>`, `<Shift+Tab>`, plain text, `${\n}`.

```robotframework
Focus //control:Button[@Name="New File"]
${bounds}= Get Attribute //control:Window[@Name="Calc"] Bounds
Get Attribute //control:Button[@Name="OK"] Name == OK # built-in assertion
${bounds}= Get Attribute Value //control:Window[@Name="Calc"] Bounds
Get Attribute Value //control:Button[@Name="OK"] Name == OK # built-in assertion
Bring To Front //control:Window[@Name="Calc"]
Activate Window //control:Window[@Name="Calc"]
Maximize Window //control:Window[@Name="Calc"]
Move And Resize Window //control:Window[@Name="Calc"] ${0} ${0} ${800} ${600}
```

### Waiting

```robotframework
${dialog}= Wait Until Exists //control:Window[@Name="Save As"]
Wait Until Gone //control:ProgressBar[@Name="Importing"] query_overrides={'timeout': 60}
Wait Until Attribute Value //control:Button[@Name="Save"] IsEnabled == ${True}
Wait Until Query count(//item:ListItem) > ${0}
Set Query Settings {'timeout': 60} scope=TEST # slower stretch of a test
```

### Diagnostics

```robotframework
Expand All @@ -186,7 +199,7 @@ Highlight //control:Button[@Name="OK"] duration=${2} # draw an overlay (
5. **Handle localization with `or`** — `[@Name='Calculator' or @Name='Rechner']`.
6. **Fuzzy match with functions** — `contains(@Name,'Save')`, `matches(@Name,'.*Save.*')`, `[contains(@*,'Close')]` (search across all attributes).
7. **Step axes when structure beats identity** — `…/Label[@Name='5']/parent::Button`.
8. **Let resolution wait** — don't `Sleep`; the descriptor retries for ~30 s.
8. **Let resolution wait** — don't `Sleep`; action keywords retry for 30 s, and `Wait Until Exists` waits without acting.

## Common Patterns

Expand All @@ -201,7 +214,7 @@ Test Setup Start Calculator
*** Keywords ***
Start Calculator
Start Process calc.exe
# Prefer letting the next Query wait over a fixed Sleep.
Wait Until Exists app:Application[@Name="ApplicationFrameHost"]/control:Window[@Name="Calculator" or @Name="Rechner"]

Enter Digit
[Arguments] ${d}
Expand All @@ -213,7 +226,7 @@ Enter Digit

```robotframework
Keyboard Type //control:Edit[@Name="Search"] robot framework${\n}
Get Attribute //control:Edit[@Name="Search"] Value == robot framework
Get Attribute Value //control:Edit[@Name="Search"] Value == robot framework
```

### Verify targeting before automating
Expand All @@ -239,7 +252,7 @@ platynui-cli highlight "//control:Button[@Name='OK']" # visually confirm on scr

## Troubleshooting

- **An unpinned install without pre-release opt-in gives a library with no `BareMetal`** → you got `0.9.2`; reinstall with `uv add --prerelease allow robotframework-PlatynUI` or pin `==0.12.0.dev330`.
- **An unpinned install without pre-release opt-in gives a library with no `BareMetal`** → you got `0.9.2`; reinstall with `uv add --prerelease allow robotframework-PlatynUI` or pin `==0.14.0.dev0`.
- **Linux: queries return nothing / empty tree** → AT-SPI2 not running, or accessibility not enabled. See `references/platform-setup.md` (`platynui-cli list-providers` should show the `atspi` provider active).
- **Wayland: clicks land wrong / screenshots fail** → use an X11 (or XWayland) session; Wayland is degraded for input injection and screen coordinates.
- **`ElementNotFoundError`** → check the namespace prefix (`item:`/`app:`), prefer `@Id`, and verify the selector with `platynui-cli query`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add Two Numbers
Press Digit 3
Pointer Click .//control:Button[@Name="Equals" or @Name="Gleich"]
# The results text exposes its value via the Name/Value attribute:
Get Attribute .//control:Text[@Id="CalculatorResults"] Name contains 5
Get Attribute Value .//control:Text[@Id="CalculatorResults"] Name contains 5

*** Keywords ***
Launch Calculator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Inspect The Mock Desktop

# Scope to the mock window, then read an attribute and act on a button.
Set Root //control:Window[@Name="Operations Console"]
${title}= Get Attribute . Name
${title}= Get Attribute Value . Name
Should Be Equal ${title} Operations Console

Get Attribute .//control:Button[@Name="OK"] Name == OK
Get Attribute Value .//control:Button[@Name="OK"] Name == OK
Highlight .//control:Button[@Name="OK"] duration=${1}
Pointer Click .//control:Button[@Name="OK"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Commands are in uv form. For a new environment, Poetry and venv + pip forms, and
Package `robotframework-PlatynUI`. The documented `PlatynUI.BareMetal` library exists only as a **pre-release** (Python ≥ 3.12). A plain install resolves the old 0.9.2, which is a different library.

```bash
uv add robotframework-PlatynUI==0.12.0.dev330 # verified pin # pip: pip install robotframework-PlatynUI==0.12.0.dev330
uv add robotframework-PlatynUI==0.14.0.dev0 # verified pin # pip: pip install robotframework-PlatynUI==0.14.0.dev0
uv add --prerelease allow robotframework-PlatynUI # latest pre-release # pip: pip install --pre robotframework-PlatynUI
```

Expand Down
Loading
Loading