Selenium : Enter the text in div using xpath

前端 未结 3 732
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-06 13:28

In selenium for inputbox, we can enter value like :

WebElement inputBox = driver.findElement(By.xpath(xpath)));
inputBox.sendKeys(\"abc\");

3条回答
  •  青春惊慌失措
    2021-01-06 14:08

    You cannot edit this div using send keys as it has no Input to send to. Instead, try and edit the text field of the div.

提交回复
热议问题