title: iOS UIAutomation : Accessing custom subviews added on a UIScrollView in automation script
body: <p>I am very new to the iOS UIAutomation, here is the problem I am facing</p>
  
  <p>I have a view hierarchy as below and want to access CustomView2 elements in the automation sctipt</p>
  
  <p>UIWindow > UIScrollView > CustomView1 (Multiple) > CustomView2 (Multiple)</p>
  
  <p>The scrollview has subviews of type CustomView1 and CustomView1 in turn has subviews of type CustomView2.</p>
  
  <p>I have assigned the accessibility information to all of the views in hierarchy, but I am not able to access the CustomView2 elements in my automation script.</p>
  
  <p>When I do a logElementTree() on UIScrollView, all I get is the instances of CustomView2, CustomView2 is not even in the tree structure of UIWindow.</p>
  
  <p>Please suggest if is there anything missing or anything going wrong.</p>
  
  <p>Here is the code I am using</p>
  
  <pre><code>var mainWindow = application.mainWindow();
  var scrollView = mainWindow.scrollViews()[0];
  var custom1 = scrollView.elements().withName("CustomView1");
  
  for(var index=0; index&lt;custom1.length; index++){
      currentIndustry.tap();
      custom1[index].logElementTree();
      var custom2 = custom1[index].elements().withName("CustomView2");
      UIALogger.logPass("Custom2 Length : " + custom2.length);
  }
  </code></pre>
  
  <p>The tree printed by
      custom1[index].logElementTree();
  does not contain instances of CustomView2</p>
  
  <p>P.S. I need to access both CustomView1 and CustomView2 elements</p>