Error when using sendKeys() with Selenium WebDriver Java.lang.CharSequence cannot be resolved

前端 未结 8 1073
北海茫月
北海茫月 2020-12-19 15:46

I have imported the following and still get an error when using sendKeys();

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.*;
         


        
相关标签:
8条回答
  • 2020-12-19 16:37

    It needs to upgrade the Compiler Compliance. For Eclipse: Follow the steps below:

    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 or higher
    4. Lastly Click on Apply and OK

    0 讨论(0)
  • 2020-12-19 16:37

    Check Eclipse version Eclipse 4.3 (Kepler) and above version need to upgrade JAVA JDK 1.8.

    After installation just check Eclipse: build path >> configure build path>> java compiler>> changed the compiler compliance level is 1.8

    Note: 1. I suggest use Java JDK 1.8 version and Eclipse Eclipse 4.6 (Neon) 2. Selenium 3+ version jar file supported JAVA JDK 1.8 and above version only.

    0 讨论(0)
提交回复
热议问题