Skip to content

fix(windows): raise when Select cannot find a value#1326

Merged
mikahanninen merged 3 commits into
robocorp:masterfrom
chelslava:fix/1150-select-missing-value-error
May 3, 2026
Merged

fix(windows): raise when Select cannot find a value#1326
mikahanninen merged 3 commits into
robocorp:masterfrom
chelslava:fix/1150-select-missing-value-error

Conversation

@chelslava

Copy link
Copy Markdown
Contributor

Summary

  • treat an explicit False return from UIAutomation Select() as a failed selection
  • raise ActionNotPossible when the requested combo box value is not available
  • add a focused regression test for the failure path

Closes #1150.

Test plan

  • python -m pytest packages/windows/tests/python/test_windows.py -q -p no:cacheprovider

RPA.Windows ignored the boolean result of the underlying UIAutomation
Select call, so missing combo box values looked like successful
selections. Raise ActionNotPossible on an explicit False return and
lock the behavior with a focused regression test.

Constraint: uiautomation reports missing selectable values with False instead of raising
Rejected: Treat every falsy return as failure | preserve compatibility with implementations that succeed with None
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep the explicit False check unless upstream Select starts raising its own error
Tested: python -m pytest packages/windows/tests/python/test_windows.py -q -p no:cacheprovider
Not-tested: Manual selection against a real Windows combo box
@CLAassistant

CLAassistant commented Apr 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

mikahanninen and others added 2 commits May 3, 2026 12:43
… None

Add a happy-path counterpart to the existing Select failure test.
UIAutomation COM methods return None on success (void); the guard
uses `is False` (identity) so None must not trigger ActionNotPossible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mikahanninen mikahanninen merged commit 5ed2ec4 into robocorp:master May 3, 2026
11 checks passed
@chelslava chelslava deleted the fix/1150-select-missing-value-error branch May 3, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPA.Windows: bubble up errors when Select is attempted on non-existent value

3 participants