diff options
Diffstat (limited to 'uitest-common')
3 files changed, 4 insertions, 38 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java index 30874d1fee..78b6ffb4c4 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java @@ -24,6 +24,7 @@ import com.vaadin.testbench.elementsbase.ServerClass; public class ProgressBarElement extends com.vaadin.testbench.elements.ProgressBarElement { + @Override public double getValue() { WebElement indicator = findElement( By.className("v-progressbar-indicator")); @@ -35,22 +36,4 @@ public class ProgressBarElement return Double.parseDouble(width.replace("%", "")) / 100.0; } - /** - * @since 7.5.6 - * @param indicator - * @param string - * @return - */ - private String getStyleAttribute(WebElement element, String styleName) { - String style = element.getAttribute("style"); - String[] styles = style.split(";"); - for (String s : styles) { - if (s.startsWith(styleName + ":")) { - return s.substring(styleName.length() + 1).trim(); - } - } - - return null; - } - } diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java index b84b67a896..28432fade9 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java @@ -3,7 +3,6 @@ package com.vaadin.testbench.customelements; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import com.vaadin.testbench.elementsbase.AbstractElement; import com.vaadin.testbench.elementsbase.ServerClass; @ServerClass("com.vaadin.ui.Table") @@ -22,19 +21,4 @@ public class TableElement extends com.vaadin.testbench.elements.TableElement { return findElement(By.className("v-table-column-selector")); } - public static class ContextMenuElement extends AbstractElement { - - public WebElement getItem(int index) { - return findElement( - By.xpath(".//table//tr[" + (index + 1) + "]//td/*")); - } - - } - - public ContextMenuElement getContextMenu() { - WebElement cm = getDriver().findElement(By.className("v-contextmenu")); - return wrapElement(cm, getCommandExecutor()) - .wrap(ContextMenuElement.class); - } - } diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java index 28d2dd63cc..eae6019b96 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java @@ -16,6 +16,7 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { private final String maximizeBoxClass = "v-window-maximizebox"; private final String closeBoxClass = "v-window-closebox"; + @Override public void restore() { if (isMaximized()) { getRestoreButton().click(); @@ -25,14 +26,11 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { } } - private boolean isMaximized() { - return isElementPresent(By.className(restoreBoxClass)); - } - private WebElement getRestoreButton() { return findElement(By.className("v-window-restorebox")); } + @Override public void maximize() { if (!isMaximized()) { getMaximizeButton().click(); @@ -69,6 +67,7 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { return findElement(By.className(closeBoxClass)); } + @Override public void close() { getCloseButton().click(); |