Support Robot Framework (SeleniumLibrary) `Secret` values in `Open Browser`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start at the SeleniumLibrary implementation of the Open Browser keyword and trace how its URL argument is passed to Selenium. Check how Robot Framework 7.4.2 Secret values are represented and handled, then add coverage for the provided Secret URL example. Done means Open Browser accepts the Secret directly while Robot Framework logs continue masking the URL.
Written by the indexing model from the issue text.
Description
Description
SeleniumLibrary currently does not support Robot Framework Secret values when they are passed to keywords expecting string arguments.
For example, when using a Secret as the url argument of Open Browser, the browser is not opened successfully.
To make it work, I have to explicitly use ${url.value} instead of ${url}. However, this defeats the purpose of using Secret, because the URL is then logged in clear text in Robot Framework log files.
Example
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
Open Browser With Secret URL
${url}= Get Secret https://example.com?token=secret-token
Open Browser ${url} Firefox
Current behavior
Passing a Secret object directly causes the keyword to fail.
A subsequent keyword then reports:
[FAIL] No browser is open.
The only workaround is to use:
Open Browser ${url.value} Firefox
This opens the browser correctly, but the secret URL is no longer protected and is written in clear text to Robot Framework log files.
Expected behavior
Keywords accepting string arguments should also accept Robot Framework Secret values.
SeleniumLibrary should automatically unwrap the Secret internally before passing the value to Selenium, while preserving Robot Framework's secret masking in logs and reports.
This would allow users to use sensitive URLs (for example, URLs containing authentication tokens or embedded credentials) without exposing them in log files.
Environment
- Robot Framework: 7.4.2
- SeleniumLibrary: 6.9.0
Additional question
If this is not something that should be implemented in SeleniumLibrary, could you please advise whether support for Secret values should instead be implemented in Robot Framework?
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from robotframework/SeleniumLibrary
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
robotframework/SeleniumLibrary#1941 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
robotframework/SeleniumLibrary#1833 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
robotframework/SeleniumLibrary#1436 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
robotframework/SeleniumLibrary#1992 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
robotframework/SeleniumLibrary#1964 · 1 comment ·
All issues in robotframework/SeleniumLibrary
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·