selenium处理富文本框 时,直接通过sendKey是不能输入值的,因为这个富文本框时自动通过iframe自动生成的一串html的代码,
因此跑自动化的时候只能通过js的脚本输入值(如下图)
1、可以定位到body,然后输入值
//富文本框@FindBy(tagName="body")private WebElement editor;
public void description( )throws InterruptedException{this.driver.switchTo().frame(this.iframeEditor);Thread.sleep(1000