小编Krz*_*zys的帖子

WebDriver HTMLUnit与Ajax有关

我想使用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)

java ajax webdriver htmlunit

5
推荐指数
1
解决办法
3186
查看次数

标签 统计

ajax ×1

htmlunit ×1

java ×1

webdriver ×1