我想使用selenium webdriver(java)测试一个站点,但该站点包含ajax,HTMLUnit没有看到ajax内容.
有解决方法吗?
例:
WebDriver driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);
//login into your account
this.login(driver);
//click on edit Profile Link into an ajax-loaded tab
driver.findElement(By.id("editProfile")).click();
//Result: org.openqa.selenium.NoSuchElementException
Run Code Online (Sandbox Code Playgroud)