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

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

    You could try this, similar issue has been answered here #sendKeys Issue

    myElement .sendKeys(new String[] { "text" }); //You could create a string array 
    

    or simply

    myElement .sendKeys(new String { "text" });
    

提交回复
热议问题