WebElement sendKeys() incompatibility between 2.52 & 3.5.0 versions

26 views
Skip to first unread message

Alex Nikulin

unread,
Aug 14, 2017, 1:03:19 PM8/14/17
to Selenium Users
Hello all,

My test code uses selenium 2.52 library. After updating the Selenium Grid to selenium 3.5.0, sendKeys() method fails to send special keys to the text inputs. The following code
        Capabilities cap = DesiredCapabilities.internetExplorer();
        WebDriver d = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), cap);

        String page = "https://google.com";
        d.get(page);
        WebElement q = d.findElement(By.name("q"));
        q.sendKeys("abcde" + Keys.RETURN);


is expected to submit search string and open "Search Results" page. Instead, it results in the string "abcde?" entered in the search box (note the "?" at the end).
The same issue with non-character and control keys: Keys.ARROW_LEFT. Keys.DELETE, Keys.F5 all produce "?" character in the text.

Reproducible in both Intenet Exporer 11 and Chrome.

Is there some known incompatibility between these Selenium versions? Or maybe some workaround exists?

Thanks.
Reply all
Reply to author
Forward
0 new messages