From 8cdb24715fac3612d8ae80c2dbee541a3c8a963c Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Tue, 23 May 2017 16:10:33 +0300 Subject: Fix ComboBoxClosePopupRetainTextTest (#9415) --- .../combobox/ComboBoxClosePopupRetainTextTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'uitest/src') diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java index 606f406db0..3b7c57e693 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java @@ -37,8 +37,11 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest { ComboBoxElement cb = $(ComboBoxElement.class).first(); WebElement textbox = cb.findElement(By.vaadin("#textbox")); textbox.sendKeys("I"); - cb.openPopup(); - cb.openPopup(); // openPopup() actually toggles + // Toggle the popup + // Uses #clickElement instead of ComboBoxElement#openPopup() due to an + // issue with the firefox driver + clickElement(cb.findElement(By.vaadin("#button"))); + clickElement(cb.findElement(By.vaadin("#button"))); // The entered value should remain assertEquals("I", textbox.getAttribute("value")); } @@ -51,7 +54,10 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest { WebElement textbox = cb.findElement(By.vaadin("#textbox")); textbox.clear(); textbox.sendKeys("I"); - cb.openPopup(); + // Close the open suggestions popup + // Uses #clickElement instead of ComboBoxElement#openPopup() due to an + // issue with the firefox driver + clickElement(cb.findElement(By.vaadin("#button"))); // Entered value should remain in the text field even though the popup // is opened assertEquals("I", textbox.getAttribute("value")); -- cgit v1.2.3