jqform html5 中一个textare selenium无法向其他输入值
import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class Jqform {
public static void main(String[] args){
WebDriver driver = new FirefoxDriver();
driver.get("http://www.trirand.com/blog/jqform/");
driver.findElement(By.xpath("(//button[@type='button'])")).click();
driver.findElement(By.id("bajax")).click();
driver.findElement(By.id("data")).sendKeys("test");
new Select(driver.findElement(By.id("dataType"))).selectByIndex(4);
new Select(driver.findElement(By.id("resetForm"))).selectByIndex(1);
new Select(driver.findElement(By.id("clearForm"))).selectByIndex(1);
new Select(driver.findElement(By.id("iframe"))).selectByIndex(1);
driver.findElement(By.id("iframeSrc")).sendKeys("Test123");
new Select(driver.findElement(By.id("forceSync"))).selectByIndex(1);
driver.findElement(By.cssSelector("div.CodeMirror.CodeMirror-focused > div > textarea")).sendKeys("3123123123");
}
}
最后一行代码 无法执行成功, 请大家帮忙看看 多谢了 换这个 试试HtmlUnitDriver
页:
[1]