问题:webdriver子模块中为什么可以直接使用类Chrome、ChromeOptions、Firefox、FirefoxProfile...

在webdriver的__init__.py文件中已经从.firefox.webdriver 导入了 WebDriver并重新命名为Chrome、Firefox、Ie...

所以可以直接使用

# webdriver子模块的__init__.py文件
from .firefox.webdriver import WebDriver as Firefox # noqa
from .firefox.firefox_profile import FirefoxProfile # noqa
from .firefox.options import Options as FirefoxOptions # noqa
from .chrome.webdriver import WebDriver as Chrome # noqa
from .chrome.options import Options as ChromeOptions # noqa
from .ie.webdriver import WebDriver as Ie # noqa
from .ie.options import Options as IeOptions # noqa
from .edge.webdriver import WebDriver as Edge # noqa
from .opera.webdriver import WebDriver as Opera # noqa
from .safari.webdriver import WebDriver as Safari # noqa
from .blackberry.webdriver import WebDriver as BlackBerry # noqa
from .phantomjs.webdriver import WebDriver as PhantomJS # noqa
from .android.webdriver import WebDriver as Android # noqa
from .webkitgtk.webdriver import WebDriver as WebKitGTK # noqa
from .webkitgtk.options import Options as WebKitGTKOptions # noqa
from .remote.webdriver import WebDriver as Remote # noqa
from .common.desired_capabilities import DesiredCapabilities # noqa
from .common.action_chains import ActionChains # noqa
from .common.touch_actions import TouchActions # noqa
from .common.proxy import Proxy # noqa

最新文章

  1. 《你不知道的JavaScript》整理(一)——作用域、提升与闭包
  2. STM32 NVIC配置详解
  3. array
  4. [deviceone开发]-UI组件的动画示例
  5. Eclipse查看hadoop源代码出现Source not found,是因为没有添加.zip
  6. .NET: C#: Datetime
  7. Call requires API level 3 (current min is 1)
  8. sublime exclude folder?
  9. Inno Setup技巧[界面]欢迎页面上添加文字
  10. 求一个整数数组最大子数组之和,时间复杂度为N
  11. Mongodb启动&关闭
  12. 预加载(图片,css ,js)
  13. OOAD与UML
  14. Java序列化和反序列化,你该知道得更多
  15. iOS ReplayKit实时录制屏幕实现方案的细节记录
  16. css3学习--select怎么去掉默认样式
  17. OpenStack平台上,windows云主机可以ping通百度但是无法打开网页,部分其它网页可以打开
  18. HDU 6098 17多校6 Inversion(思维+优化)
  19. Monty Hall 问题与贝叶斯定理的理解
  20. python XlsxWriter Example: Hello World

热门文章

  1. SpringBoot配置多数据源Mysql+Sqlite
  2. JQuery高级(二)
  3. vps建站施工预告
  4. go包管理
  5. Java-手动搭建SSH(maven版)
  6. CentOS7安装Grafana(Yum)
  7. The five Day 水平翻转图像,然后反转图像并返回结果
  8. Deployment.spec.selector.matchLables实验解释
  9. Java自学-类和对象 构造方法
  10. GridPanel列头带有复选框的列