Skip to content

Commit

Permalink
Clarify input parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-susanh committed Jan 25, 2025
1 parent 3b0c9a2 commit f69e374
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/org/labkey/test/components/ui/grids/DetailTableEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ public DetailTableEdit setTextareaByFieldName(String fieldName, String value)
/**
* Get the value of a boolean field.
*
* @param fieldCaption The caption/label of the field to get.
* @param inputName The caption/label of the field to get.
* @return The value of the field.
**/
public boolean getBooleanField(String fieldCaption)
public boolean getBooleanField(String inputName)
{
// The text used in the field caption and the value of the name attribute in the checkbox don't always have the same case.
WebElement editableElement = Locator.tagWithAttributeIgnoreCase("input", "name", fieldCaption).findElement(getComponentElement());
WebElement editableElement = Locator.tagWithAttributeIgnoreCase("input", "name", inputName).findElement(getComponentElement());
String elementType = editableElement.getAttribute("type").toLowerCase().trim();

Assert.assertEquals(String.format("Field '%s' is not a checkbox. Cannot be get true/false value.", fieldCaption), "checkbox", elementType);
Assert.assertEquals(String.format("Field '%s' is not a checkbox. Cannot be get true/false value.", inputName), "checkbox", elementType);

return new Checkbox(editableElement).isChecked();
}
Expand Down

0 comments on commit f69e374

Please sign in to comment.