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);
      touch = new TouchUtils();
      touchTool = new Purity(testActivity, getInstrumentation());
    } 
   
   
    public void testIframeDest() 
    { 
        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
        sleep(3000); 
        testView.sendJavascript("loadUrl('index2.html')");
        sleep(1000); 
        String url = testView.getUrl();
        assertTrue(url.endsWith("index.html"));
    }