summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java')
-rw-r--r--src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java b/src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java
new file mode 100644
index 0000000..159d0c9
--- /dev/null
+++ b/src/main/java/com/att/ecomp/dcae/ci/ui/rule_editor/components/actions/from/RegexFromComponent.java
@@ -0,0 +1,38 @@
+package com.att.ecomp.dcae.ci.ui.rule_editor.components.actions.from;
+
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import com.att.ecomp.dcae.ci.ui.utils.ByTest;
+import com.att.ecomp.dcae.ci.ui.utils.Locator;
+import com.att.ecomp.dcae.ci.utilities.Report;
+import com.aventstack.extentreports.Status;
+
+public class RegexFromComponent extends SimpleFromComponent {
+
+ public RegexFromComponent(WebDriverWait timeout, WebElement element) {
+ super(timeout, element);
+ }
+
+ public void clickRegex() {
+ Report.log(Status.INFO, "Clicking regex button...");
+ wait.until(Locator.from(root).findVisible(ByTest.id("btnFromRegex"), 0)).click();
+ }
+
+ public String getRegex() {
+ Report.log(Status.INFO, "Getting regex from...");
+ return getRegexElement().getAttribute("value");
+ }
+
+ public void setRegex(String value) {
+ Report.log(Status.INFO, "Setting regex from...");
+ getRegexElement().clear();
+ getRegexElement().sendKeys(value);
+ }
+
+ /* Private Methods */
+
+ private WebElement getRegexElement() {
+ return wait.until(Locator.from(root).findVisible(ByTest.id("inputFromRegex"), 0));
+ }
+}