Code example for LinearLayout

Methods: getChildAt

0
      super.setUp(); 
      mInstr = this.getInstrumentation();
      testActivity = this.getActivity();
      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
      innerContainer = (LinearLayout) containerView.getChildAt(0);
      testView = (CordovaWebView) innerContainer.getChildAt(0);
      touchTool = new Purity(testActivity, getInstrumentation());
  } 
   
 
  public void testTouch() 
  { 
      sleep(5000); 
      int viewportHeight = touchTool.getViewportHeight() - 40;
      int viewportWidth = touchTool.getViewportWidth();
      touchTool.touch(50, viewportHeight);
      sleep(10000); 
  } 
   
  private void sleep(int timeout) {
      try {