fix: fix secret handling without curly braces#4900
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
Secretvalues to their underlying.valuestring when resolving$var/%varplaceholders. - Extend acceptance tests to cover failing
Type Secret/Fill Secretcases for both${secret}and$secretsyntaxes.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4896