title: Identifying an WebTable/WebGrid Object in QTP
body: <p>I have the below code in html for a WebTable(Web Grid). </p>
  
  <pre><code>&lt;table width="90%"&gt;
    &lt;div class="greybox" style="margin-top:2%;"&gt;
      &lt;table class="datagrid" width ="100%"&gt;....&lt;table&gt;
    &lt;/div&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I tried providing exactly the same(all) properties in my descriptive programming but the Web Element(DIV) is not being identified by QTP. Is there a unique way to identify this? </p>
  
  <p>Note: The Web page is developed a single page application</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>So I think I have resolved the issue with the below code. There were two Objects being identified without the "Unique Text" if clause. First Object was parent of the DIV object so had to use a "Unique text" from the first object which wouldn't be part of any other object. I am currently trying with different data to see if it's working fine</p>
  
  <pre><code>Browsername = Browser("micClass:=Browser").GetROProperty("name")
  Pagename = Browser("micClass:=Browser").Page("micClass:=Page").GetROProperty("name")
  
  Set desc = Description.Create()
  desc("micclass").Value = "Webelement"
  
  Set ChildObject=Browser("name:="&amp;BrowserName).Page("name:="&amp;PageName).ChildObjects(desc)
  
  Set Child_Table_Value = nothing
  
  For i=0 to ChildObject.Count-1
    innerhtmlvalue = ChildObject(i).GetRoproperty("innerhtml")
    htmltag = ChildObject(i).GetRoproperty("micclass")
  
    if(Instr(innerhtmlvalue, "MARGIN-TOP: 2%")&lt;&gt;0) then 
      if(Instr(innerhtmlvalue, "UniqueText")=0) then
        if(Instr(htmltag, "WebElement")&lt;&gt;0) then
          Set Child_Table_Value  = ChildObject(i)
        End If
      End If
    End IF
  Next
  
  Set Table_Value = Child_Table_Value.WebTable("html tag:=Table")
  </code></pre>