Skip to main content

Hiding Sensitive Data

TestFairy offers a valuable feature that allows developers to conceal sensitive information from recorded sessions, ensuring that sensitive data, such as credit card information, remains protected during testing and debugging.

For example, you might want to prevent all information related to credit card data from appearing in the session:

To hide a view from video, all you need to do is the following:



TestFairy.hideView(View myView);

Replace with the identifier of the view you wish to hide. Review the full example below:


public class MyActivity extends Activity {

protected void onCreate(Bundle savedInstanceState) {




Below is a screen taken from a demo video: on the left, you can see what an app usually looks like; on the right is a screenshot taken with the Card Number EditText hidden by testfairy-secure-viewid.

iphone no hidden HTML elementsiphone hidden HTML elements
  • Hidden views are automatically removed from the video before being sent to TestFairy's servers, ensuring that sensitive data is never captured or exposed.
  • Developers can hide multiple views within a session to protect various sensitive elements in the application.
  • It is permissible to add the same view multiple times for hiding without any additional checks.