The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)

Solution 1:

It has a simple solution. Change your compiler compliance level from 1.4 to 1.7.

Follow these steps in your eclipse:

  1. Right click on your java project and select Build Path -> Click on
    Configure Build Path...
  2. In project properties window, Click/select Java Compiler at the left
    panel
  3. At the right panel, change the Compiler compliance level from 1.4 to 1.7
    (Select which is higher version in your eclipse)
  4. Lastly Click on Apply and OK

Now check your code. it will never show the same error.

Solution 2:

element.sendKeys(new String[]{"Hello, selenium"});

My code looks like this, it's working.

Solution 3:

There are two possible solution for this

1- Change the compiler version from old version to 1.5 or greater.

2- Change the JRE version from JRE8 to JRE7.

I have created a detailed article on this may be it will help.

http://learn-automation.com/solution-for-sendkeyscharsequence-in-selenium/