diff --git a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java index 191350816c..992e940d0d 100644 --- a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java +++ b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java @@ -642,6 +642,24 @@ public List getColumnLabels() return elementCache().getColumnLabels(); } + /** + * + * @return a List<String> containing the names of the fields for each column header + */ + public List getColumnNames() + { + return elementCache().getColumnNames(); + } + + /** + * + * @return a List<FieldKey> containing the fieldKeys for each column header + */ + public List getColumnFieldKeys() + { + return elementCache().getColumnFieldKeys(); + } + /** * Get data from a row * @param rowIndex the index of the desired row @@ -773,7 +791,7 @@ public Optional getGridEmptyMessage() return msg; } - List getHeaders() + public List getHeaders() { return Collections.unmodifiableList(elementCache().findHeaders()); } @@ -861,6 +879,16 @@ protected List getColumnLabels() return findHeaders().stream().map(FieldReferenceManager.FieldReference::getLabel).collect(Collectors.toList()); } + protected List getColumnNames() + { + return findHeaders().stream().map(FieldReferenceManager.FieldReference::getName).collect(Collectors.toList()); + } + + protected List getColumnFieldKeys() + { + return findHeaders().stream().map(FieldReferenceManager.FieldReference::getFieldKey).collect(Collectors.toList()); + } + protected GridRow getRow(int index) { return getRows().get(index);