From cda9a6c4726002e76a028acf03e2da6c6bc6b842 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 12 Feb 2025 15:38:06 -0800 Subject: [PATCH] Add new element and method for getting danger warnings --- .../components/ui/domainproperties/EntityTypeDesigner.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java b/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java index 4c8018b303..c92abe4c4e 100644 --- a/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java +++ b/src/org/labkey/test/components/ui/domainproperties/EntityTypeDesigner.java @@ -107,6 +107,11 @@ public boolean isNameFieldEnabled() return (null == disabledValue) || (!disabledValue.equalsIgnoreCase("true")); } + public String getErrorText() + { + return elementCache().dangerText.getText(); + } + public String getNameExpression() { expandPropertiesPanel(); @@ -378,6 +383,7 @@ public ElementCache() WebDriverWrapper.sleep(500); } + protected final WebElement dangerText = Locator.tagWithClass("span", "text-danger").findWhenNeeded(this); protected final ValidatingInput nameInput = new ValidatingInput(Locator.id("entity-name").findWhenNeeded(propertiesPanel), getDriver()); protected final Input nameExpressionInput = new ValidatingInput(Locator.id("entity-nameExpression").findWhenNeeded(propertiesPanel), getDriver()); protected final Input descriptionInput = new ValidatingInput(Locator.id("entity-description").findWhenNeeded(propertiesPanel), getDriver());