From 167e733f1f998976569b448a1b6f52854d5e8d1e Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Fri, 3 Feb 2017 13:15:13 +0200 Subject: Fix some broken tests and ComboBoxElement (#8430) --- .../java/com/vaadin/testbench/elements/ComboBoxElement.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'testbench-api') diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java index dd538cecc1..dc6a59d360 100644 --- a/testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java +++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java @@ -21,7 +21,7 @@ import java.util.List; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; -import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import com.vaadin.testbench.By; @@ -183,7 +183,9 @@ public class ComboBoxElement extends AbstractSelectElement { try { getSuggestionPopup().findElement(byNextPage).click(); return true; - } catch (NoSuchElementException e) { + } catch (WebDriverException e) { + // PhantomJS driver can throw WDE instead of the more specific + // NoSuchElementException return false; } } @@ -197,7 +199,9 @@ public class ComboBoxElement extends AbstractSelectElement { try { getSuggestionPopup().findElement(byPrevPage).click(); return true; - } catch (NoSuchElementException e) { + } catch (WebDriverException e) { + // PhantomJS driver can throw WDE instead of the more specific + // NoSuchElementException return false; } } -- cgit v1.2.3