zoukankan      html  css  js  c++  java
  • selenium模块及类组织关系

    问题: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
  • 相关阅读:
    C# NameValueCollection
    visual studio使用技巧创建自己代码片段
    C#在DataTable中使用LINQ
    [转]C# 中的.pdb/ .vshost.exe/ .vshost.exe.manifest文件讨论
    C#自定义控件在添加引用后不显示在工具箱的解决方法
    Java 工程师
    redis-CRC16
    sql server-当天日期减去一天 应该如何写
    清除访问Windows共享时缓存的凭据
    cmd下查看当前登陆用户
  • 原文地址:https://www.cnblogs.com/yaoqingzhuan/p/12042043.html
Copyright © 2011-2022 走看看