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

前端 未结 8 1137
北海茫月
北海茫月 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:21

    This is because of your eclipse Editor.

    Follow the steps below to overcome that error.

    1. Right click on the java Project.
    2. Select Build Path >Configure Build Path.

    Here there are two things you need to check

    A.Java Build Path > Libraries- Here editor should refer the version installed on your machine. If it's referring the old library files then remove it and click on Add Library and select the latest Jre system library from the List.

    B.Java Compiler. Here Compiler compliance level should be the latest/ the one installed on your machine.

提交回复
热议问题