selenium.selenium与selenium.webdriver的区别
我最近开始用Python的Selenium库进行一些工作。在网上大多数示例代码中,都会用到selenium.selenium
这个模块。但是,现在的Selenium Python Bindings 2的API文档里并没有这个模块。而Selenium RC 1的API文档里却有这个模块。
我也可以通过Ipython找到API文档,方法是:
from selenium import selenium
help(selenium)
我有两个相关的问题:
- 为什么现在的API文档里没有selenium.selenium这个模块?
- 在当前版本中,我应该用selenium.webdriver而不是selenium.selenium吗?它们之间有什么区别?
1 个回答
0
提供的链接不是官方文档,请查看官方的API文档在这里:http://selenium.googlecode.com/svn/trunk/docs/api/py/index.html(这个链接包含了完整的API,包括旧的RC API)。selenium.selenium是旧版的RC API。对于新的项目,建议使用selenium.webdriver API。