TestFairy allows developers to hide specific views from the recorded video. As a developer, you may choose to hide one or more views from the video for security and privacy reasons.

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 this :

TestFairy.hideView(View myView);

Replace R.id.my_view with the identifier of the view you wish to hide. Please review the full example below:

Code example

public class MyActivity extends Activity {
        protected void onCreate(Bundle savedInstanceState) {


Sample video

Below is a sample screen taken from a demo video. On the left, you can see what the app normally looks like. On the right, there is a screenshot taken with the "Card Number" EditText hidden by testfairy-secure-viewid.


  • Hidden views are removed before sending video.
  • You may use 'TestFairy.hideView(Integer.valueOf(R.id.my_view))' on multiple Views.
  • You may add the same view multiple times, no checks needed.

Related Articles