Counting no. of rows for a wbfgrid in a web based 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Counting no. of rows for a wbfgrid in a web based application (/Thread-Counting-no-of-rows-for-a-wbfgrid-in-a-web-based-application) |
Counting no. of rows for a wbfgrid in a web based application - sunny rao - 11-06-2008 Hi all, I am trying to record a web based application, 1) Using QTP 9.5 on one page I am not able to select objects or record on button objects in a wbfgrid which in turn comes lower in the hierarchy of Webtables. I have used .rowcount and getcelldata methods but it does not return the number of rows. 2) Also to use Descriptive programming for webtables up in the hierarchy , they have similar properties. Is there a way to distinguish between them so as to get the count of exact webtable? 3) All buttons on a particular page have similar properties so QTP is just clicking the button based on x,y co-ordinates is there any way I can tie up a particular button with the text in front of it, so that unique button will only be selected. My questions are little complicated, I will reply any counter questions to make the problem more clearer, thanks you for your patience RE: Counting no. of rows for a wbfgrid in a web based application - MR21135 - 11-07-2008 Normally, when the objects are created dynamically this problem may exist...you will be able to overcome these types of issue by using the Ordinal identifier - INDEX. Try including index property eg. Code: Browser("..").Page("..").Frame("..").Webbutton("html tag:=INPUT", "html id:=ok", "index:=0") Code: Browser("..").Page("..").Frame("..").Webbutton("html tag:=INPUT", "html id:=ok", "index:=1") RE: Counting no. of rows for a wbfgrid in a web based application - yugal - 11-07-2008 Hi MR21135, Can we record and insert a checkpoint for the data generated in a Div based grid view in any web page. I have tried this but didn't work... ---------------------------- Code: Dim i,rows,total ----------------------------- here the WebTable is not able to recognize the gridview displayed in the page... Thanks... & waiting for reply RE: Counting no. of rows for a wbfgrid in a web based application - MR21135 - 11-07-2008 Hi, You will not be able to use this statement Code: "Browser("..").Page("..").WebTable("..").GetROProperty("rows").GetCellData(i,1)" here in this case you need to increment i value according to the rows for example if you have two columns and two rows then the index would be C1 C2 R1 0 1 R2 2 3 just try Code: Dim i,rows,total one more thing you can also use Code: .GetCellData(i,1) instead of GetROProperty("innertext") Hope i would have answered you. |