Skip to content

fix: fix secret handling without curly braces#4900

Merged
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:secret_and_fail
May 14, 2026
Merged

fix: fix secret handling without curly braces#4900
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:secret_and_fail

Conversation

@aaltat
Copy link
Copy Markdown
Member

@aaltat aaltat commented May 14, 2026

Fixes #4896

Copilot AI review requested due to automatic review settings May 14, 2026 10:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Robot Framework Secret handling for Type Secret/Fill Secret when secrets are passed using $var syntax (without curly braces), preventing a TypeError during exception masking and ensuring the original selector-related error surfaces correctly (Fixes #4896).

Changes:

  • Unwrap resolved Secret values to their underlying .value string when resolving $var/%var placeholders.
  • Extend acceptance tests to cover failing Type Secret/Fill Secret cases for both ${secret} and $secret syntaxes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Browser/base/librarycomponent.py Ensures placeholder resolution returns a plain string when the resolved value is a Secret, avoiding str.replace(..., Secret) failures.
atest/test/02_Content_Keywords/secret.robot Adds regression coverage for failure paths of Type Secret/Fill Secret with and without curly-brace variable syntax.

@aaltat aaltat merged commit e63f824 into MarketSquare:main May 14, 2026
27 checks passed
@aaltat aaltat deleted the secret_and_fail branch May 14, 2026 10:27
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.

incorrect str serialization for robot.api.types.Secret when calling Browser.TypeSecret

2 participants