Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying a WebGrid using Div Tag - Solved
#1
Solved: 10 Years, 11 Months, 1 Week ago
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.

Code:
<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>

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

Solution

Code:
Browser("B").Page("P").WebElement("html id:=UniqueID").WebTable("html tag:=TABLE").RowCount()
Reply
#2
Solved: 10 Years, 11 Months, 1 Week ago
Hey, I belive the div will be identified as WebElement.

Try to add object in OR (ADD OBJECT) and then you can work on that. Let me know if you need any further help on this.
Thanks,
SUpputuri
Reply
#3
Solved: 10 Years, 11 Months, 1 Week ago
Thanks for your input. Probably this is the reason my various trail and error ended up in all errors.

Is there anyway I will be able to identify it rather as a WebGrid or Web Table as inner-tag of the div is a Table. It would be easier to retrieve data from the grid/table by iterating then after

Edit: I was able to solve it with help of another friend. Solution has been updated in the OP. Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DIV and span tags techvas 6 10,704 06-24-2015, 12:59 AM
Last Post: supputuri
  QTP Unable to differentiate WebTable in Application - Solved EnthusiasticLearner 3 6,365 12-27-2013, 12:26 PM
Last Post: EnthusiasticLearner
  How to identify HTML tables developed with DIV and SPAN tags as 'WEBTABLE'? bell.ramesh 1 4,317 08-20-2012, 11:07 AM
Last Post: Victor~
  QTP Webelement with Html tag as OPTION pjr 0 7,040 01-30-2011, 05:33 AM
Last Post: pjr
  Need URGENT help how to read xml string / xml tag value in web page using QTP VQTP 2 5,960 04-16-2009, 02:27 AM
Last Post: VQTP

Forum Jump:


Users browsing this thread: 2 Guest(s)