使用Hitch测试框架在Firefox上运行Selenium的插件。
hitchselenium的Python项目详细描述
希氏元素
hitch selenium是一个用于hitch测试框架的插件,它包装了selenium和 启动firefox,可以选择使用xvfb,这样浏览器窗口就不会出现。
与悬挂装置一起使用
按如下方式安装:
$ hitch install hitchselenium
# Service definition in engine's setUp:self.services['Firefox']=hitchselenium.SeleniumService(xvfb=False# Optional (default: False))# N.B. if xvfb is installed and xvfb is set to True, firefox will run hidden.# Open page and type something into text box with id id_description:self.driver=self.services['Firefox'].driverself.driver.get(self.url)self.driver.find_element_by_id("id_description").send_keys("type something...")
请在DjangoRemindMe项目中查看此服务的运行情况。
功能
- 使用HitchServe运行时在单独的线程上启动浏览器,同时启动其他服务,这样集成测试运行得更快。
- 您可以选择使用xvfb以可见和不可见的方式运行firefox浏览器。
注意事项
- 目前只支持火狐。
- 可能不一定适用于最新版本的firefox。
- Faketime没有启用,因为Firefox对它没有很好的响应。javascript将始终返回系统时间。
待办事项
在.hitchpkg目录中为所有版本下载并安装指定版本的firefox/chromium。