Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public List<WebElement> fieldLabels()
WebElement quantity = Locator.tagWithId("input", "numItems")
.findWhenNeeded(getComponentElement());

WebElement description = Locator.tagWithId("textarea", "Description")
WebElement description = Locator.textarea("Description")
.findWhenNeeded(getComponentElement());

RadioButton derivativesOption = new RadioButton.RadioButtonFinder().withNameAndValue("creationType", "Derive")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,15 @@ public List<String> getFieldNames()
names.add(FieldKey.fromFieldKey(attribute).getFullName());
}

// Amount and Units is an example that has a "hide-label" for StoredAmount
// Amount and Units is an example that has a "hide-label" for StoredAmount. A hidden label renders no
// data-fieldkey span, so the field key comes from the name of the control the label points at.
List<WebElement> hiddenLabels = Locator.tagWithClass("label", "hide-label").withAttribute("for")
.findElements(elementCache());
names.addAll(hiddenLabels.stream().map(a -> FieldKey.fromFieldKey(a.getDomAttribute("for")).getFullName()).toList());
for (WebElement label : hiddenLabels)
{
WebElement control = Locator.id(label.getDomAttribute("for")).findElement(elementCache());
names.add(FieldKey.fromFieldKey(control.getDomAttribute("name")).getFullName());
}

return names;
}
Expand Down