Skip to content

Commit b2e8aed

Browse files
committed
Enhance password handling documentation for Secret type support in Input Password keyword
1 parent d35867b commit b2e8aed

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/SeleniumLibrary/keywords/formelement.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,15 @@ def input_password(
258258
| Input Password | password_field | ${PASSWORD} |
259259
260260
Please notice that Robot Framework logs all arguments using
261-
the TRACE level and tests must not be executed using level below
262-
DEBUG if the password should not be logged in any format.
261+
the TRACE level. When not using the ``Secret`` type, tests must
262+
not be executed using level below DEBUG if the password should
263+
not be logged in any format.``
264+
265+
This keyword supports Robot Framework 7.4
266+
[https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#secret-variables|Secret]
267+
variable type. When a ``Secret`` is passed, the value is protected
268+
from Robot Framework logs and Selenium internal logging is also
269+
suppressed during typing.
263270
264271
The `clear` argument is new in SeleniumLibrary 4.0. Hiding password
265272
logging from Selenium logs is new in SeleniumLibrary 4.2.
@@ -276,6 +283,12 @@ def input_text(self, locator: Locator, text: str | Secret, clear: bool = True):
276283
is not cleared from the element. Use `Input Password` if you
277284
do not want the given ``text`` to be logged.
278285
286+
This keyword supports Robot Framework 7.4
287+
[https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#secret-variables|Secret]
288+
variable type. When a ``Secret`` is passed, the value is masked in
289+
Robot Framework logs. Note that unlike `Input Password`, Selenium's
290+
internal logs are not suppressed during typing.
291+
279292
If [https://github.com/SeleniumHQ/selenium/wiki/Grid2|Selenium Grid]
280293
is used and the ``text`` argument points to a file in the file system,
281294
then this keyword prevents the Selenium to transfer the file to the

0 commit comments

Comments
 (0)