2

The below is the code snippet and here when i try to execute sendKeys it is throwing error.

public class Revision {

    public static void main(String[] args) {

        WebDriver dr = new FirefoxDriver();

        dr.get("https://www.youtube.com/");

        dr.manage().window().maximize();

        dr.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        WebElement you=dr.findElement(By.id("masthead-search-term"));

        you.sendKeys("lean on");
jrbedard
  • 3,662
  • 5
  • 30
  • 34
  • http://stackoverflow.com/questions/9622454/error-with-selenium-webelement-sendkeys – Amol Chavan Sep 25 '16 at 05:30
  • http://stackoverflow.com/questions/23485363/the-method-sendkeyscharsequence-in-the-type-webelement-is-not-applicable-for – Amol Chavan Sep 25 '16 at 05:30
  • What version of JRE are you using?? It looks like JRE version problem.. if you're in old version of JRE try as `you.sendKeys(new String[] {"lean", "on"})` – Saurabh Gaur Sep 25 '16 at 05:49
  • Does this answer your question? [Error with selenium.WebElement.sendKeys()](https://stackoverflow.com/questions/9622454/error-with-selenium-webelement-sendkeys) – Joe23 Aug 20 '20 at 15:11

0 Answers0