Skip to content

Commit

Permalink
added do... for all options
Browse files Browse the repository at this point in the history
  • Loading branch information
vculea committed Oct 9, 2024
1 parent 056f66e commit efbbc10
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/main/java/com/sdl/selenium/extjs4/window/XTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ default boolean clickOnTool(String suffix) {
return toolElement.click();
}

default boolean doClickOnTool(String suffix) {
WebLocator toolElement = getToolEl(suffix).setVisibility(true);
return toolElement.doClick();
}

default WebLocator getToolEl(String suffix) {
return new WebLocator(getView()).setClasses("x-tool-" + suffix);
}
Expand All @@ -25,31 +30,63 @@ default boolean close() {
return clickOnTool("close");
}

default boolean doClose() {
return doClickOnTool("close");
}

default boolean maximize() {
return clickOnTool("maximize");
}

default boolean doMaximize() {
return doClickOnTool("maximize");
}

default boolean restore() {
return clickOnTool("restore");
}

default boolean doRestore() {
return doClickOnTool("restore");
}

default boolean minimize() {
return clickOnTool("minimize");
}

default boolean doMinimize() {
return doClickOnTool("minimize");
}

default boolean toggle() {
return clickOnTool("toggle");
}

default boolean doToggle() {
return doClickOnTool("toggle");
}

default boolean plus() {
return clickOnTool("plus");
}

default boolean doPlus() {
return doClickOnTool("plus");
}

default boolean collapse() {
return clickOnTool("collapse");
}

default boolean doCollapse() {
return doClickOnTool("collapse");
}

default boolean expand() {
return clickOnTool("expand");
}

default boolean doExpand() {
return doClickOnTool("expand");
}
}

0 comments on commit efbbc10

Please sign in to comment.