Q: How to identify HTML tables developed with DIV and SPAN tags as 'WEBTABLE'?
I have muliple tables in my webpage and all these were developed using DIV and SPAN tags. QTP unable to identify these tables as WEBTABLE instead it's treating each cell as a WebElement. Hence am not able to retrieve number of rows, columns and corresponding cell values. Moreover all tables are dynemic interms of rows and columns, means sometimes 5 rows, 5 columns and sometimes 10 rows 7 columns. SO it is very important for me to retrieve no.of rows and columns.
currently code is looking like below:
Browser().Page().WebElement() '' This is for each cell and there is no WebTable object.
And i would like to see as below:
Browser().Page().WebTable() '' for entire table grid in webapge
I would appreciate if someone could assist me in how to deal with such tables in QTP?
It won't see a table because it is not created with a <TABLE> tag. We have same thing. What I did was use the DOM approach to move through the DIV tables. Once you get handle with DOM you will be fine to access DIV tables. Have fun. [img]/images/graemlins/smile.gif[/img]
I think one way would be to use the ChildObjects to find all webelements and there is a pattern that i find here that can be use i.e. Class which i think is for first element is 'slick-cell l0 r0'. Do spy on the EUR or GBP and check if this pattern varies, if yes then u can use the solution bebeath