import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
+import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.elements.ButtonElement;
}
private void assertShadowSize() {
- Dimension shadowSize = findElement(By.className("v-shadow")).getSize();
+ Dimension shadowSize = getPopupShadow().getSize();
Dimension layoutSize = $(VerticalLayoutElement.class).id("content-vl")
.getSize();
assertThat(shadowSize.width, is(lessThan(layoutSize.width + 10)));
}
+ private WebElement getPopupShadow() {
+ //Shadows with index 0: tooltip, index 1: popup
+ return findElements(By.className("v-shadow")).get(1);
+ }
+
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
return Collections.singletonList(Browser.IE8.getDesiredCapabilities());