---
title: Hiding Sensitive Data during Selenium Tests
description: Preventing sensitive data from being exposed with Selenium WebDriver.
source_url:
  html: https://testingbot.com/support/web-automate/selenium/sensitive-data
  md: https://testingbot.com/support/web-automate/selenium/sensitive-data/index.md
---
# Hiding Sensitive Data

When you are running tests on the TestingBot cloud, we automatically gather logs and screenshots/videos of each of your tests.   
 This feature allows testers to debug potential issues with their tests, or verify if their tests are doing what they are supposed to be doing.

However, it might be important for you to prevent this logging from happening.

For example, you're testing a login/signup page and you are sending a password or secret token.

We offer several options to partially or completely disable logging during your tests:

- [stripping parameters in logs](https://testingbot.com#params)
- [completely disabling logs](https://testingbot.com#disable)
- [disable video recordings](https://testingbot.com#video)

The capabilities below (`recordLogs`, `disableLogs`, `screenrecorder`) are TestingBot-specific. In Selenium 4 / W3C mode they must be nested inside the `tb:options` capability, see the example below, not set as top-level keys.

    // Selenium 4 / W3C example - nest TestingBot custom keys inside tb:options
    ChromeOptions options = new ChromeOptions();
    Map<String, Object> tbOptions = new HashMap<>();
    tbOptions.put("recordLogs", "strip-parameters");
    tbOptions.put("disableLogs", new String[] {"appium", "browser"});
    tbOptions.put("screenrecorder", false);
    options.setCapability("tb:options", tbOptions);

## Strip Parameters

You can choose to remove all parameters from the TestingBot logs, which are sent during your test.

Parameters like passwords, tokens or other sensitive data will no longer appear in our logs.

[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[NodeJS](https://testingbot.com#)[C#](https://testingbot.com#)

    caps["recordLogs"] = "strip-parameters"

    caps.setCapability("recordLogs", "strip-parameters");

    $caps["recordLogs"] = "strip-parameters";

    caps["recordLogs"] = "strip-parameters"

    capabilities['recordLogs'] = 'strip-parameters'

    caps.SetCapability("recordLogs", "strip-parameters");

## Disable Logging

By default, TestingBot collects several logs during your test. Depending on the browser/platform you're testing on, the log files may include:

- **vm** : our logs where we display what the VM is doing, including the Selenium commands it's relaying. 
- **selenium** : the log file generated by Selenium, which includes parameters and commands your test is sending. 
- **firefox** : the geckodriver (verbose) log for the test, if the test is running against a Firefox browser. 
- **sikuli** : if you are using [Sikuli](https://testingbot.com/support/other/sikuli), the output of Sikuli will appear here. 
- **appium** : mobile tests (live and automated) are using Appium. Commands and parameters will be logged here. 
- **logcat** : if you are running a mobile app test on Android, we will retrieve the [Android Logcat](https://developer.android.com/studio/command-line/logcat) file. 
- **android** : this contains the output of the Android emulator. 
- **browser** : the console logs of the browser. 
- **cypress** : output generated by Cypress, if you are using [Cypress Testing](https://testingbot.com/support/web-automate/cypress). 

To **disable all logs** , you can use this capability:

[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[NodeJS](https://testingbot.com#)[C#](https://testingbot.com#)

    caps["recordLogs"] = false

    caps.setCapability("recordLogs", false);

    $caps["recordLogs"] = false;

    caps["recordLogs"] = False

    capabilities['recordLogs'] = false

    caps.SetCapability("recordLogs", false);

You can also choose to **disable some logs** :

[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[NodeJS](https://testingbot.com#)[C#](https://testingbot.com#)

    caps["disableLogs"] = ['appium', 'browser']

    caps.setCapability("disableLogs", new String[] {"appium", "browser"});

    $caps["disableLogs"] = array('appium', 'browser');

    caps["disableLogs"] = ['appium', 'browser']

    capabilities['disableLogs'] = ['appium', 'browser']

    caps.SetCapability("disableLogs", new[] {"appium", "browser"});

## Disable video recordings

By default, we'll record the screen during your test. This makes it easy to troubleshoot or verify the test.

You can choose to disable the video recording with this capability:

[Ruby](https://testingbot.com#)[Python](https://testingbot.com#)[PHP](https://testingbot.com#)[Java](https://testingbot.com#)[NodeJS](https://testingbot.com#)[C#](https://testingbot.com#)

    caps["screenrecorder"] = false

    caps.setCapability("screenrecorder", false);

    $caps["screenrecorder"] = false;

    caps["screenrecorder"] = False

    capabilities['screenrecorder'] = false

    caps.SetCapability("screenrecorder", false);

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
