diff options
Diffstat (limited to 'testbench-api/src/main')
-rw-r--r-- | testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java | 10 |
1 files changed, 7 insertions, 3 deletions
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; } } |