com.onevizion.uitest.api.helper.grid.group.GridGroupJs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ui-test-api Show documentation
Show all versions of ui-test-api Show documentation
An API for easily write tests for OneVizion platform
The newest version!
package com.onevizion.uitest.api.helper.grid.group;
import java.util.List;
import org.springframework.stereotype.Component;
import com.onevizion.uitest.api.helper.Js;
@Component
class GridGroupJs extends Js {
String getGroupId(Long gridIdx, String groupLabel) {
return execJs(
"var obj = gridArr[" + gridIdx + "].grid.objTxtValue;" +
"return Object.keys(obj).find(key => obj[key] === '" + groupLabel + "');");
}
@SuppressWarnings("unchecked")
List getColumnValsInGroup(Long gridIdx, int columnIndex, String groupId) {
return (List) execJs2(
"var columnVals = [];" +
"gridArr[" + gridIdx + "].grid.forEachRowInGroup('" + groupId + "', function(rowId) {" +
" columnVals.push(gridArr[" + gridIdx + "].grid.cellById(rowId, " + columnIndex + ").getTxtValue().trim());" +
"});" +
"return columnVals;");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy