'sendKeys' are not working in Selenium WebDriver

后端 未结 12 1614
暗喜
暗喜 2020-12-05 13:36

I am not able to put any value in my application using WebDriver. My application is using frames.

I am able to clear the value of my textbox with driver.findEle

12条回答
  •  清歌不尽
    2020-12-05 14:12

    Try using JavaScript to sendkeys().

    WebElement element = driver.findElement(By.name("name"));
    JavascriptExecutor executor = (JavascriptExecutor)driver;
    executor.executeScript("arguments[0].click();", element);
    

    More information on JavaScript Executor can be found at JavascriptExecutor - Selenium.

提交回复
热议问题