Mailing List - Entries of 2012
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [QF-Test] Getting Row/Column count of a table for web application
Hi Chuck, in QF-Test 3.4 the only way for getting a row count might be a SUT-script.If you have a simple table, with more or less clean HTML structure and no inner tables, you can go for something like this:
table = rc.getComponent("<ID-of-TABLE>") rows = table.getElementsByClassName("<CLASS-which-identifies-a-table-row") rc.setLocal("rowNumber", len(rows))For more compley tables you will need to implement a ClassNameResolver in order to get good "Class names" for table rows.
Best Regards, Martin--On Donnerstag, Juni 14, 2012 10:33:07 +0200 Gregor Schmid <Gregor.Schmid@?.de> wrote:
Hi Chuck, the respective procedures will be implemented for web in QF-Test 3.5. For now you can use the following workaround: + Fetch index of <id of table>&-1 into variable lastcol + Fetch index of <id of table>&0&-1 into variable lastrow Then $(lastcol) is the index of the last column and $(lastrow) the index of the last row, i.e. $[$(lastcol) + 1] and $[$(lastrow) + 1] represent the number of columns and rows respectively. Best regards, Greg "Hunt,Chuck" <CHUNT1@?.com> writes:Hello, How do I get the rowCount and columnCount of a web table? domNode.getAttribute(¡°rows¡±) returns 0. ¡°cols¡± is also 0. Chuck Hunt ©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥ ©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥ ©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥ CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
-- Martin Moser martin.moser@?.de Quality First Software GmbH http://www.qfs.de Tulpenstr. 41 Tel: +49 8171 38648-14 DE-82538 Geretsried Fax: +49 8171 38648-16 GF: Gregor Schmid, Karlheinz Kellerer HRB München 14083