diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-12 13:34:07 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-09-20 07:01:49 +0000 |
commit | 0783541ba30dab597bb701b0c61cddc6c0216cf9 (patch) | |
tree | 65dfd6724f0e406ad696074179bf27f7765ad84c /uitest-common | |
parent | 53ea4816eedbfa8efd08e28e78d87899581be6e6 (diff) | |
download | vaadin-framework-0783541ba30dab597bb701b0c61cddc6c0216cf9.tar.gz vaadin-framework-0783541ba30dab597bb701b0c61cddc6c0216cf9.zip |
Update to TestBench 4.1.0
Some element methods have been integrated into TestBench and are removed from the
framework element classes
Change-Id: I35c8bf272b7603127816595de8145e68500e22e5
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(); |