How do I send special characters via SendKeys?

前端 未结 1 1256
时光说笑
时光说笑 2021-01-02 04:42

I\'m trying to fill out a form in Selenium2.

One input has an autocomplete that I want to close, preferably by sending esc after the search term. I.e. som

相关标签:
1条回答
  • 2021-01-02 04:56

    Try this:

    WebElement list1;    
    list1=firefoxDriver.findElement(By.name("lst")); 
    list1.sendKeys(Keys.CONTROL);
    
    0 讨论(0)
提交回复
热议问题