select a row in HTMLTable
User Gary Kwok (firstname.lastname@example.org) posted:
By using the SQAProperty and the following code, i was able to extract
the content of a particular cell and row number, but when i do a click
on the row, somehow it first return back to the top of the table first,
and since you need to scroll down the table to that cell, the script
cannot continue and fails. Is there anything i can do? Also, is there
any other property for HTMLTable beside using Row and Col value?
Do while i <= length - 1
' if i = length then
temp = GetSubString(value, "<TR ondblclick=" , "</TD></TR>")
' temp = GetSubString(value, "<TD" , "</TD>")
' end if
' msgbox temp
value1 = TrimStringAfterToken(value, temp)
Result = Instr(temp, "Set Duration Units")
if Result <> 0 Then
Re: select a row in HTMLTable
User (email@example.com) posted:
Gary, I assume you are using SQAGetProperty to identify which row/col
contains the text you want to click on?
It depends on what is in the HTMLTable. If it contains an HTMLLink you
want to click on, the following command will work:
HTMLLink Click, "HTMLText=<text>", ""
If, on the other hand, it contains only text, the only options for
HTMLTable Click seem to be a) Coords or b) Row/Col. The text for all
cells in the HTMLTables I've seen is stored in one property (actually two,
but they contain the same text), innerHTML and outerHTML.
It is possible to include delimiters in the text that are not visible to
the user, but which can be used to parse the table text by row and column,
but this is up to the person cutting the HTML code.