diff options
Diffstat (limited to 'testbench-api/src/main/java/com')
-rw-r--r-- | testbench-api/src/main/java/com/vaadin/testbench/elements/ComboBoxElement.java | 28 |
1 files changed, 1 insertions, 27 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 e0e4799c15..11b823e656 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 @@ -20,7 +20,6 @@ import java.util.Collections; import java.util.List; import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; @@ -54,7 +53,7 @@ public class ComboBoxElement extends AbstractSelectElement { return; } getInputField().clear(); - sendInputFieldKeys(text); + getInputField().sendKeys(text); selectSuggestion(text); } @@ -118,31 +117,6 @@ public class ComboBoxElement extends AbstractSelectElement { return isElementPresent(bySuggestionPopup); } - /* - * Workaround selenium's bug: sendKeys() will not send left parentheses - * properly. See #14048. - */ - private void sendInputFieldKeys(String text) { - WebElement textBox = getInputField(); - if (!text.contains("(")) { - textBox.sendKeys(text); - return; - } - - String OPEN_PARENTHESES = "_OPEN_PARENT#H#ESES_"; - String tamperedText = text.replaceAll("\\(", OPEN_PARENTHESES); - textBox.sendKeys(tamperedText); - - JavascriptExecutor js = getCommandExecutor(); - String jsScript = String.format( - "arguments[0].value = arguments[0].value.replace(/%s/g, '(')", - OPEN_PARENTHESES); - js.executeScript(jsScript, textBox); - - // refresh suggestions popupBox - textBox.sendKeys("a" + Keys.BACK_SPACE); - } - /** * Open the suggestion popup */ |