Web Table - 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 Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions) +--- Thread: Web Table (/Thread-Web-Table--7895) |
Web Table - debakanta - 02-15-2014 Hi, Today i have faced one interview question. Q:In a web Table some of the cell contains same cell data.how to find out number of similar data & how many cell contains this same data. Example:Suppose 5 cell contains the data "X".How to find how many "X" are there & how many cell contains this. x a b c d e f x z x x y v b x m Ans: RE: Web Table - supputuri - 02-17-2014 you can use descriptive program and get the childobjects (TR with innertext 'x') and then use the use your own logic to get the number of x in the row. Simple logic: Code: NumberOfX= Len(childItem(i))-Len(Replace(childItem(i),"x","")) RE: Web Table - anu05446 - 02-18-2014 hi, can you please explain your approach, I am not sure how you mean to go about it. say in the webtable, each cell is a webelement, we need to count no, of cells which have values as "X", ie innertext for the webelement is "x", in this case , I don't think ChildObject can be used as the webelement, thou contained in the webtable, is a child of the page and not the webtable. correct me if I'm wrong. RE: Web Table - supputuri - 02-19-2014 Check out this below snippet Code: '******************************************** RE: Web Table - anu05446 - 02-26-2014 got it ..thanks RE: Web Table - supputuri - 02-26-2014 no problem ... welcome buddy RE: Web Table-----------Pls clarify - AMIT35352 - 06-15-2015 Code: oGetAlp("innertext").Value = ".*" & sSearchItem &".*" Query:- What is ".*" used for?What it does? Thanks in Advance |