selenium webdriver的包装器和一些工具
z3c.webdriver的Python项目详细描述
z3c.webdriver
这个包提供了围绕selenium.webdriver的工具和包装器。
我们特别关心selenium.webdriver.PhantomJS,因为:
- it’s easy to deploy, it’s a single executable, ^{tt3}$ works
- it’s built on ^{tt4}$
- it can be debugged with a ^{tt5}$ / ^{tt6}$ browser, incl. breakpoints
注意事项:
- any single instance of PhantomJS acts as a single browser instance that means cookies and whatnot are shared if you intantiate more browsers for a single driver. Workaround could be to start more drivers.
- the headless browser is truly ^{tt7}$, that means an AJAX click does NOT wait for the AJAX request to complete, you explicitely need to wait for it
- any single call to PhantomJS via selenium takes TIME
- zope.testbrowser supporting methods like ^{tt8}$ are slow now
- there are 2 options for setUp/tearDown, either the driver is started and torn down with the layer or with each test. Starting and stopping takes around 1.5-2 secs, so you decide whether you need separation or speed.
警告
这是正在进行的工作
0.0.1(2013-05-09)
- 初始版本