How to retrieve cell values in the WebTable of portal application - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: How to retrieve cell values in the WebTable of portal application (/Thread-How-to-retrieve-cell-values-in-the-WebTable-of-portal-application) |
How to retrieve cell values in the WebTable of portal application - Sreedevi - 05-28-2009 Hi, I want to retrieve the cell data in the WebTable. For that I have defined a new test object under the browser and have given html tag and text as the test object properties. But while I try to identify it it says 'Object description is not unique'. I tried adding innerhtml, outerhtml, innertext and outertext along with the ordinal identifiers; but no use. What more properties need to be added to identify it? Also I want to enable smart identification for this object but the field is disabled in the object repository for this object alone(In QTP tools->object identification the enable smart identification checkbox is enabled). How do I enable it? RE: How to retrieve cell values in the WebTable of portal application - viv_karthy - 05-28-2009 Hi This is a common problem encoutered while tring to get data from a web table. Try this: Before you use the webtable use Browser().Fullscreen This will make the position of the abs_x and abs_y constant then using the Object spy check for the location of abs_x or abs_y CVhoose one amongst them for your scripting Remove all other properties Then use this: Code: WebTableExist=Browser(...).Page(...)WebTable(abs_x:=443").Exist Check whether the tool is identifying your table using Webtable().Exist property if exist then Code: WebTableExist=Browser(...).Page(...)WebTable(abs_x:=443").getCellData() ?Using ths split function you can get the exact value from on the cell Hope this help Regards Karthik RE: How to retrieve cell values in the WebTable of portal application - sreekanth chilam - 05-29-2009 @ ViV_Karthy : FYI , GetCellData() will not return an array (As it returns particular cell value itself) @ Sreedevi: For retrieving the Cell values of WebTable : Step1: Find the rowcount of Webtable Step2: Use for loop using this Rowcount Step3: use GetCellData(i,2) & store the cell values into variable. Example: (here i am trying to retrieve the values of Cell of column '2' for all rows) Code: rc=Browser(..).Page(..).WebTable(..).RowCount RE: How to retrieve cell values in the WebTable of portal application - Sreedevi - 06-04-2009 Hi Karthik, Thanks for your reply. I could get the cell values in the webtable by using the abs_x property. @Sreekanth: In portal application, the webtable was identified as webElement. So I created one new test object from OR. In such case the cell values cannot be retreived from the webtable, any unique property has to be taken and then your code can be used. Thanks for your reply. Regards, Sreedevi. RE: How to retrieve cell values in the WebTable of portal application - nikhilcogni - 06-19-2012 I want to store the values in an array how do I this. All values of webtable in an array |