Если значение находится в таблице, вы должны использовать
selenium.getTable("tableName.0.1");
Где 0 - строка, а 1 - для столбца (для каждого индекса на основе 0)
getTable вернетстрока в случае успеха: «ОК, значение», поэтому вам нужно удалить ОК, деталь.
Обновить Добавить в user-extensions.js
Selenium.prototype.getTableRows = function(locator) {
/**
* Gets the number of rows in a table.
*
* @param locator element locator for table
* @return number of rows in the table, 0 if none
*/
var table = this.browserbot.findElement(locator);
return table.rows.length.toString();
};
Селен RC
// Table Name in inputParams
String[] inputParams = { "tblTryggHuvudlantagare", };
String y = proc.doCommand("getTableRows", inputParams);
String tmpString = y.replace("OK,", "");
// Rows minus headings
int tableRows = Integer.valueOf(tmpString).intValue() - 1;
for (int i = 1; i < tableRows; i++) {
// Your logic here to see if you reached the right row and then click button on same row..
}