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
selenium模块及类组织关系的更多相关文章
- Python爬虫——selenium模块
selenium模块介绍 selenium最初是一个测试工具,而爬虫中使用它主要是为了解决requests无法直接执行JavaScript代码的问题 selenium本质是通过驱动浏览器,完全模拟浏览 ...
- 浏览器行为模拟之requests、selenium模块
requests模块 前言: 通常我们利用Python写一些WEB程序.webAPI部署在服务端,让客户端request,我们作为服务器端response数据: 但也可以反主为客利用Python的re ...
- 孤荷凌寒自学python第八十六天对selenium模块进行较详细的了解
孤荷凌寒自学python第八十六天对selenium模块进行较详细的了解 (今天由于文中所阐述的原因没有进行屏幕录屏,见谅) 为了能够使用selenium模块进行真正的操作,今天主要大范围搜索资料进行 ...
- 用selenium 模块控制浏览器
11.8 用selenium 模块控制浏览器selenium 模块让Python 直接控制浏览器,实际点击链接,填写登录信息,几乎就像是有一个人类用户在与页面交互.与Requests 和Beautif ...
- python3 selenium模块Chrome设置代理ip的实现
python3 selenium模块Chrome设置代理ip的实现 selenium模块Chrome设置代理ip的实现代码: from selenium import webdriver chrome ...
- 爬虫(五)—— selenium模块启动浏览器自动化测试
目录 selenium模块 一.selenium介绍 二.环境搭建 三.使用selenium模块 1.使用chrome并设置为无GUI模式 2.使用chrome有GUI模式 3.查找元素 4.获取标签 ...
- Selenium模块/目录说明
目录说明: selenium/common #定义了webdriver的异常类 selenium/webdriver #定义了webdriver所有python实现: 1.各种浏览器支 ...
- Python中Selenium模块的使用
目录 Selenium的介绍.配置和调用 Selenium的配置 Selenium的调用 Selenium的使用 定位 定位元素的使用 定位下拉标签元素 在iframe框架之间切换 上传文件 Webd ...
- selenium模块使用详解、打码平台使用、xpath使用、使用selenium爬取京东商品信息、scrapy框架介绍与安装
今日内容概要 selenium的使用 打码平台使用 xpath使用 爬取京东商品信息 scrapy 介绍和安装 内容详细 1.selenium模块的使用 # 之前咱们学requests,可以发送htt ...
随机推荐
- 找出二进制数中bit为1的最(高/低)索引
题1. 给定一个无符号整型数据(unsigned int),找出其对应二进制数据中bit位为1的最高/低索引. 比如:对于数据0,返回0:数据1,返回1:数据0x80000000,返回32: 题2. ...
- Django-11-Form组件
1. 概述 Django的Form组件一般功能有: 验证用户输入 生成html代码 返回错误信息 创建Form类 from django.shortcuts import render, redire ...
- ubuntu 安装和配置 GitLab
一.概述 GitLab 是一个基于 Web 的开源 Git 软件仓库管理器,用 Ruby 编写,包括 wiki,问题管理,代码审查,监控以及持续集成和部署.它使开发人员能够创建,审查和部署他们的项目. ...
- 2019vivo秋招提前批笔试题第3题
笔试的时候没做出来,就顺手截图了. 虽然知道要用动态规划做,但我一直就不太懂动态规划.笔试完又花了2小时把它做出来了.也不知道性能怎么样,但还好做出来了. def solution(n, toltal ...
- Bootstrap 遮罩插件jquery.mloading
使用方法 将jquery.mloading.js和jquery.mloading.css引入到页面,调用: $(element).mLoading({ text:"",//加载文字 ...
- .Net MVC如何渲染带有网页标签的字符串
有时候我们在解析一段文字时,可能文字中会包含网页上的标签,如div.p等等.那么如果将这种文字渲染成对应的标签效果呢?如图,最近博主就拿到了这么一段字符串(如图) 由于中间带有很多特殊字符,用Html ...
- java之spring mvc之初始spring mvc
1. mvc : mvc框架是处理 http请求和响应的框架 2. mvc 做的事情有哪些: 将 url 映射到一个java的处理方法上 将表单数据提交到 java 类中 将后台 java 类处理的结 ...
- C# -- 高性能RPC框架:Socean.RPC
简介 Socean.RPC是一个.Net下的高性能RPC框架,框架以高性能.高稳定性为目标,底层基于socket,无第三方库引用,代码简洁,总代码量大约在2000行,框架性能较高,在普通PC上测试,长 ...
- 2019-07-22 phpStudy配置虚拟主机
1.右击 phpStudy ->[打开配置文件]->[vhosts-conf]: 2.在里面加入如下代码,并保存: NameVirtualHost *:80 <VirtualHost ...
- Flink入门 - 窗口函数
/* * ProcessWinFunOnWindow */ final StreamExecutionEnvironment streamExecutionEnvironment = StreamEx ...