You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DisabledDateFieldPopupTest.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.vaadin.tests.components.datefield;
  2. import static org.junit.Assert.assertFalse;
  3. import java.io.IOException;
  4. import java.util.List;
  5. import org.junit.Test;
  6. import org.openqa.selenium.By;
  7. import org.openqa.selenium.Keys;
  8. import org.openqa.selenium.WebElement;
  9. import org.openqa.selenium.interactions.Actions;
  10. import org.openqa.selenium.remote.DesiredCapabilities;
  11. import com.vaadin.tests.tb3.MultiBrowserTest;
  12. public class DisabledDateFieldPopupTest extends MultiBrowserTest {
  13. @Override
  14. public List<DesiredCapabilities> getBrowsersToTest() {
  15. return getIEBrowsersOnly();
  16. }
  17. @Test
  18. public void testPopup() throws IOException {
  19. openTestURL();
  20. WebElement button = driver
  21. .findElement(By.className("v-datefield-button"));
  22. new Actions(driver).moveToElement(button).click()
  23. .sendKeys(Keys.ARROW_DOWN).perform();
  24. assertFalse(
  25. "Calendar popup should not be opened for disabled date field",
  26. isElementPresent(By.className("v-datefield-popup")));
  27. }
  28. }