【发布时间】:2011-11-15 21:15:53
【问题描述】:
我们有一个基于 RichFaces 3.3.3 的应用程序。我们使用 Selenium IDE 创建了运行良好的自动化测试。由于 RichFaces 组合框不是真正的 html 组合框,而是带有一堆 javascript 的输入字段,因此在 Selenium 中,我们需要使用以下技巧选择一个值:
type field_id "field value"
typeKeys field_id "field value"
fireEvent field_id "blur"
为了将测试集成到我们的持续集成系统中,我们将测试转换为使用 WebDriver (Selenium 2.5.0) 作为后端的 jUnit 测试。不幸的是,组合框技巧停止工作。
所有type和typeKeys命令翻译如下:
// ERROR: Caught exception [ERROR: Unsupported command [fireEvent]]
driver.findElement(By.id("patientCreateDataForm:patientBirthDateInputDate")).clear();
driver.findElement(By.id("patientCreateDataForm:patientBirthDateInputDate")).sendKeys("16.06.1910");
有没有人有任何有效的解决方案来测试 RichFaces 组合框元素?
提前致谢!
【问题讨论】:
标签: selenium richfaces webdriver