Code example for LinearLayout

Methods: getChildAt

0
  protected void setUp() throws Exception { 
      super.setUp(); 
      testActivity = this.getActivity();
      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
      innerContainer = (LinearLayout) containerView.getChildAt(0);
      testView = (CordovaWebView) innerContainer.getChildAt(0);
  } 
   
  public void testPreconditions(){ 
      assertNotNull(innerContainer);
      assertNotNull(testView);
  } 
   
  public void customTest() 
  { 
    assertTrue(CordovaWebView.class.isInstance(testView));
    assertTrue(CordovaWebViewClient.class.isInstance(testActivity.testViewClient));
    assertTrue(CordovaChromeClient.class.isInstance(testActivity.testChromeClient));
  }