Question

I have the following html tag for a Web Grid. How do I use it to identify this Webgrid using the unique Div ID in QTP. I need to use this div id as it's the only unique identifier.

<div id="UniqueID"class="rowdetail" width="100%">
<table class="datagrid" width="100%">
<tr><th colspan="2" style="text-align: center">TableName</th></tr>
<tr><td width="25%"> ....</td></tr>
</table></div>

I have retrieved Unique ID already using getattribute. I need to use this in my descriptive programming to identify uniquely.

Browse(B).Page(P).WbfGrid/WebTable?(?)

Let me know if you need more details. I did search the internet but with no help so created a question to serve the purpose. Any help is highly appreciated

Was it helpful?

Solution

I think I understand your question now. You cannot identify the UniqueID div as a WebTable since it's a WebElement in QTP not a table, however you can use the div in order to uniquely identify the table since it's the only child object of the div. Something like this should work:

 Browser("B").Page("P").WebElement("html id:=UniqueID").WebTable("html tag:=TABLE").RowCount()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top