How to mask data in command logs?
Hello NoahSmith,
The capability lambdaMaskCommands needs to be passed as an array that can have any one or all the options listed below :
-
setValues: To mask request payload sent by sendKeys() command.
-
getCookies: To mask response payload sent by getCookie() or getCookies() command.
-
setCookies: To mask request payload sent by setCookie() cmd.
This will replace all keystrokes and other values with REDACTED in test session logs (only applies to command logs and not to selenium/appium logs).
Sample code snippet:
String[] command = {"setValues", "setCookies", "getCookies"};
capabilities.setCapability("lambdaMaskCommands", command);