-
Notifications
You must be signed in to change notification settings - Fork 143
Decide keyword call banner and secret log suppression in run_keyword #5171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+799
−156
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f681b25
Decide keyword hooks in run_keyword instead of the listener
Snooz82 0109129
Do not resolve banner variables for keywords taking a secret
Snooz82 8f87fb0
Mask secret-typed arguments too, not only ones named secret
Snooz82 2d8ed50
refactored atests
Snooz82 9da5d1d
Find a secret argument by name even when it has no type hint
Snooz82 be99c39
Add acceptance coverage for an untyped plugin secret
Snooz82 103fcdc
extracted keyword call methods to KeywordCallObserver
Snooz82 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import re | ||
| from typing import Any | ||
|
|
||
| from assertionengine.assertion_engine import AssertionOperator, verify_assertion | ||
| from robot.libraries.BuiltIn import BuiltIn | ||
|
|
||
| from Browser import Browser | ||
|
|
||
|
|
||
| def get_keyword_call_banner_text( | ||
| operator: AssertionOperator = None, expected: str | None = None | ||
| ): | ||
| """Keyword is not a Browser keyword, therefore can read without influencing the keyword call banner.""" | ||
| browser: Browser = BuiltIn().get_library_instance("Browser") | ||
| text_content = browser.evaluate_javascript( | ||
| None, | ||
| "() => {const e = document.getElementById('kwCallBanner');" | ||
| " return e ? e.textContent : '';}", | ||
| ) | ||
| content_match = re.search(r"content: '(.*?)';", text_content, re.DOTALL) | ||
| return verify_assertion( | ||
| content_match.group(1) if content_match else "", operator, expected | ||
| ) | ||
|
|
||
|
|
||
| def get_wrapped_page_source( | ||
| assertion_operator: AssertionOperator | None = None, | ||
| assertion_expected: Any | None = None, | ||
| message: str | None = None, | ||
| ) -> str | dict | tuple: | ||
| """Keyword is not a Browser keyword, therefore is neither shown in keyword call banner, nor is it hiding it.""" | ||
| browser: Browser = BuiltIn().get_library_instance("Browser") | ||
| return browser.get_page_source(assertion_operator, assertion_expected, message) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.