E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
webdriver
Selenium 高效爬取拉勾网职位信息并保存至MongoDB
主程序:importrefromseleniumimport
webdriver
fromselenium.common.exceptionsimportTimeoutExceptionfromselenium.
webdriver
.common.byimportByfromselenium.
webdriver
.support.uiimport
WebDriver
Waitfromselenium.webd
可樂Cola
·
2020-07-13 05:50
(七)通过 selenium 模拟浏览器爬取 JS 动态内容
这里用cssselecter定位>>>fromseleniumimport
webdriver
>>>driver=
webdriver
.PhantomJS()>>>d
广大人民
·
2020-07-13 04:58
selenium 动态登录,截取验证码登录
#-*-coding:utf-8-*-fromseleniumimport
webdriver
fromPythonHTTP调用示例.YDMHTTPimportYDMHttp#引用显示等待fromselenium.
webdriver
.support.uiimport
WebDriver
WaitfromPILimportImagedriver
chenkan0214
·
2020-07-13 03:09
python-selenium -- xpath定位方法详解
webdriver
提供了八种元素定位的方法:id,name,classname,tagname,linktext,partiallinktext,xpath,cssselector下面主要介绍一下xpath
a7916314
·
2020-07-13 02:51
selenium爬取电商网站
selenium爬取电商网站fromseleniumimport
webdriver
importrandomimporttimeimportcsvimportrefromselenium.
webdriver
.common.byimportByfromselenium.
webdriver
.supportimportexpected_conditionsasEC
金星python
·
2020-07-13 02:47
webdriver
的三种等待方式(强制等待、隐式等待、显示等待)
在自动化测试脚本的运行过程中,
webdriver
操作浏览器的时候,对于元素的定位是有一定的超时时间,大致应该在1-3秒的样子,如果这个时间内仍然定位不到元素,就会抛出异常,中止脚本执行。
ST_君华
·
2020-07-13 01:47
测试
自动化
爬虫中如何获取图片验证码
1.采用网站截图方式importrequestsimporttimefromseleniumimport
webdriver
fromPILimportImagedefpart_screenshot(driver
XIANWEN2014
·
2020-07-13 01:47
Selenium自动化测试框架
Webdriver
工作原理启动脚本时,
Webdriver
会启动一个新的线程去启动浏览器,这里启动浏览器有两种方式:带用户信息、不带用户信息。
Software_55White
·
2020-07-13 01:39
框架
Chrome 上传文件自动化
选择上传按钮后,谷歌浏览器会打开此窗口,可使用下面的代码选择文件路径#这里使用chromedriver71版本,稳定可使用driver=
webdriver
.Chrome(executable_path=
Maybe_ch
·
2020-07-13 00:03
python
爬虫--selenium爬取带验证码的豆瓣网
fromseleniumimport
webdriver
importtimeimportrequestsfromlxmlimportetreeimportbase64#操作浏览器driver=
webdriver
.Chrome
MR_HJY
·
2020-07-13 00:18
爬虫
【爬虫】利用selenium爬取淘宝并保存到mongodb数据库
第三:爬取产品搜索结果页面第四:解析具体的product第五:源码importpymongofromselenium.
webdriver
importChromefromselenium.w
Jesszen
·
2020-07-13 00:19
python
爬虫
selenium爬虫实战:如何在无内鬼中找到内鬼?
三、代码fromseleniumimport
webdriver
fromselenium.
webdriver
.common.
SAC_SHIKI
·
2020-07-13 00:49
由跳一跳外挂说起——初识 iOS 自动化测试框架
WebDriver
Agent
作为一只程序猿,对外挂的原理产生了强烈的好奇心,于是埋头研究了一阶段,注意到了
WebDriver
Agent这套Facebook出品的自动化测试框架。为了让大家产生兴趣,先从跳一跳外挂的实现说起。
ReinhardHuang
·
2020-07-13 00:18
python使用selenium模拟鼠标滚动获取更多加载内容
直接上代码:#coding=utf8fromseleniumimport
webdriver
fromselenium.webd
BlueCat2016
·
2020-07-13 00:40
爬虫登陆问题,selenium截取图片验证码
/usr/bin/python3#-*-coding:utf-8-*-fromseleniumimport
webdriver
fromPILimportImage#importpytesseractimporttimefromioimportBytesIObrowser
小脏辫儿
·
2020-07-12 23:50
爬虫
selenium爬取拉勾网数据并进行可视化分析
"""CreatedbyYoungon2019/1/2310:25"""importpymongofromseleniumimport
webdriver
fromlxmlimportetreefromselenium.common.exceptionsimportTimeoutExceptionfromselenium.
webdriver
.support.waitimport
WebDriver
Wai
喝杯牛奶丶
·
2020-07-12 22:33
python爬虫
selenium爬虫对验证码的识别(pytesseract识别验证码)
对页面中的验证码区域进行定位截取保存3、对验证码图片进行处理掉用pytesseract进行验证码识别4、判断验证码结果是否成功,未成功点击图片重新进行识别importtimefromseleniumimport
webdriver
fromPILimpo
至上_
·
2020-07-12 22:23
学习笔记
Python3、requests、BeautifulSoup、
webdriver
下载动态加载的网页图片(包含静态网页获取与动态加载的网页内容获取)
Python3获取京东商品列表信息,并根据列表信息地址提取信息详情页的相关图片(京东商品详情信息图片采用JS动态加载,需控制网页滚动至一定位置才能加载,初始的静态页面没有商品图片),因此本文采用两种方法加载网页:一种是加载商品列表页(如图1所示),并提取其中的商品列表地址;另一种是根据商品详情页的内容(如图2),控制滚动条滚动至页面底端,确保商品详情图片加载完毕,然后获取网页信息,提取图片地址,最
zz_z123
·
2020-07-12 21:47
Python3.x
python爬虫实战笔记——爬取图书信息(利用selenium库+chromedriver.exe插件)
准备:1、插件chromedriver.exe2、已经安装好谷歌浏览器Chrome编写代码frombs4importBeautifulSoupfromseleniumimport
webdriver
fromselenium.
webdriver
.support.uiimportSelect
白T
·
2020-07-12 21:06
Selenium
Webdriver
常见错误、异常解答
WebDriver
Exception:Message:UnexpectederrorlaunchingInternetExplorer.Browserzoomlevelwassetto94%.Itshouldbesetto100%
zhusongziye
·
2020-07-12 20:43
Selenium自动化测试
python3 selenium web自动化测试之excel参数化
简单举个例子,上代码:#coding=utf-8fromseleniumimport
webdriver
fromselenium.common.exceptionsimportNoSuchElementExceptionfromselenium.
webdriver
.co
zhusongziye
·
2020-07-12 20:43
Selenium自动化测试
webdriver
-使用自定义的firefox配置
一般启动firefoxdriver,使用如下代码
WebDriver
driver=newFirefoxDriver();这样启动的firefox,会是一个全新的driver,不带任何的插件。
JediStone
·
2020-07-12 20:02
selenium
firefox
测试
selenium+python+eclipse 之selenium常用函数用法摘要
参考虫师的资料http://www.cnblogs.com/fnng/p/3202299.html先加载
webdriver
browser=
webdriver
.Firefox()#不同的浏览器加载不同的驱动
lion_zhou
·
2020-07-12 20:31
python爬虫(switch_to.frame、find_elements_by_tag_name等方法)新手分享,经验证可用
序言实例是一个把QQ企业邮箱的发件箱转至收件箱的脚本,对中间一些自己刚学习到的方法进行分享包引用importtimefromseleniumimport
webdriver
登陆这个函数是进行登陆操作,中间的减速
zhouf00
·
2020-07-12 20:51
程序分享
python selenium弹出窗口提示处理
话不多说直接上原代码,应该能看懂吧,有问题可以一起讨论importos,timefromseleniumimport
webdriver
fromselenium.
webdriver
.support.waitimport
WebDriver
Waitfromselenium.
webdriver
.supportimportexpected_conditionsasECfromselenium.webdriv
zhouf00
·
2020-07-12 20:20
程序分享
appium创建session失败:selenium.common.exceptions.
WebDriver
Exception: Message: A new session could not be
记一个项目中遇到的坑,无法创建一个新的回话,因为启动的activity从来没有被启动具体的报错信息如下:selenium.common.exceptions.
WebDriver
Exception:Message
zhenzhendexiaoer
·
2020-07-12 20:36
selenium python基本使用
基本介绍Selenium2,又名
WebDriver
,它的主要新功能是集成了Selenium1.0(SeleniumRemoteControl)以及
WebDriver
,也就是说Selenium2是Selenium
zhangyonguu
·
2020-07-12 19:29
测试
selenium2.0关于python的常用函数 二
新建实例driver=
webdriver
.Chrome()1.获取当前页面的Url函数方法:current_url实例:driver.current_url2.获取元素坐标方法:location解释:首先查找到你要获取元素的
zhangxiaowenyihao
·
2020-07-12 19:20
java + httpClient +
WebDriver
实现验证码获取(爬虫自动登录)
接着上个博客进行的改进,上个博客也是实现自动登录,这个博客是本人做的第二种方式的尝试。主要是获取访问cookie,然后放入访问头里,将验证码图片下载本地,然后用tess4j工具进行验证码解析,最后模拟登陆操作就可以正常登陆了。直接马上代码:packagecom.zhaxd.web.utils;importjava.io.File;importjava.io.FileOutputStream;imp
zhangjiaqianghh
·
2020-07-12 19:21
最简便安装python+selenium-
webdriver
环境方法
很多同学在windows搞不定python+selenium-
webdriver
的安装环境,在这里给大家提供一种极速安装的方式。只需要2步就可以安装完毕。
Kevin_Zhang
·
2020-07-12 19:37
python
Selenium
selenium+python自动化测试(二)--使用
webdriver
操作浏览器
WebDriver
简介selenium从2.0开始集成了
webdriver
的API,提供了更简单,更简洁的编程接口。
zh175578809
·
2020-07-12 19:09
Python
java+selenium2 自动化测试框架
importorg.openqa.selenium.By;importorg.openqa.selenium.JavascriptExecutor;importorg.openqa.selenium.
WebDriver
zengshaotao
·
2020-07-12 19:11
java
自动化测试
selenium.common.exceptions.InvalidSessionIdException: Message: invalid session id
inbrowser.get('https://www.baidu.com')File"D:\zz\PycharmProjects\test\venv\lib\site-packages\selenium\
webdriver
zb0567
·
2020-07-12 19:38
python
0052读取EXCEL并把值写入到selenium定位中
#-*-coding:utf-8-*-fromseleniumimport
webdriver
fromtimeimportsleepimportxlrddriver=
webdriver
.Chrome()driver.get
z120270662
·
2020-07-12 19:06
python爬取豆瓣电影名称与评分进行分析
importtimeimportosimportnumpyasnpimportpandasaspdimportmatplotlib.pyplotaspltfromseleniumimport
webdriver
fromselenium.common.exceptionsimportNoSuchElementExce
风子杨yxf771
·
2020-07-12 19:25
技术
用Autoit处理window弹出窗口
在利用
webdriver
做自动化测试中,弹出窗口的处理一直是个很棘手的问题。用auoit能很好处理弹出窗口问题,以window自带安全验证窗口为例,其他窗口的处理和这个类似。
yxchen51
·
2020-07-12 19:25
webdriver
selenium截取当前窗口,并保存为图片
#-*-coding:utf-8-*-fromseleniumimport
webdriver
fromtimeimportsleepdriver=
webdriver
.Firefox()driver.get
路遥车慢
·
2020-07-12 18:49
python
Selenium启动带插件的火狐浏览器Firefox
Selenium
WebDriver
在启动火狐时,默认启动的是一个全新的没有安装任何插件的火狐浏览器,我们一般都是在这种情况下运行脚本的。
YOYO测试
·
2020-07-12 18:33
Selenium
启动不同的浏览器
2019 Selenium Chrome版本与chromedriver兼容版本对照表
Chrome浏览器的时候,是需要用到chromedirver的,两者之间的版本是需要匹配的,否则会出现下面类似的报错:Exceptioninthread"main"org.openqa.selenium.
WebDriver
Exception
YOYO测试
·
2020-07-12 18:32
Selenium
启动不同的浏览器
Selenium3
Java
(火狐)Selenium
WebDriver
测试 NotADirectoryError: [WinError 267] 目录名称无效。
驱动下载地址:https://github.com/mozilla/geckodriver/releases/tag/v0.26.0http://ftp.mozilla.org/pub/firefox/releases/查看版本号:火狐驱动提示:NotADirectoryError:[WinError267]目录名称无效。:'D:\tools\ProgramFiles\Driver\geckodr
you_you0329
·
2020-07-12 18:42
selenium
Python3+Beautiful Soup4+Selenium爬虫,爬取网站视频
importbs4importurllib.requestfromseleniumimport
webdriver
importos#需要导入的模块,如果没有请安装defconvert_link(raw_link
York1996
·
2020-07-12 18:36
爬虫
python
Python+selenium+
webdriver
之模块驱动、数据驱动调用
登录模块a.pyclasslogin()deflogin(self,driver):driver.find_element_by_name("username").clear()driver.find_element_by_name("username").send_keys("xxx")driver.find_element_by_password("password").clear()driv
缓和的劫持
·
2020-07-12 18:13
用FireFox的
webdriver
做自动化测试时,FireFox版本不宜过高
id=7819问题描述用FireFox
webdriver
做自动化测试,先前都是正常的,但是在(2015/03/02)将FF升级到最新的版本36.0之后,就不能在自动化测试中正常启动FF了,错误提示如下:
yasi_xi
·
2020-07-12 18:26
selenium爬取豆瓣
#coding:utf-8#__author__='wang'importtimefromseleniumimport
webdriver
fromselenium.
webdriver
.support.uiimport
WebDriver
Waiturl
y15518325965
·
2020-07-12 17:12
python+selenium—alert对话框(警告窗)处理_1.13
1、alert操作(浏览器弹出框)在
WebDriver
中要处理JS生成的alert、confirm以及prompt,需要switch_to.alert()来选取(定位)警告弹窗,在对弹窗进行关闭、输入等信息操作操作方法
艾力克金
·
2020-07-12 17:28
python+selenium
selenium截屏保存、截取特定区域的图片
browser=
webdriver
.Chrome()wait=
WebDriver
Wait(browser,10)browser.get('https://www.baidu.com')time.sleep
西门大盗
·
2020-07-12 17:16
WebDriver
Selenium eclipse环境搭建
WebDriver
环境搭建在eclipse环境下搭建
WebDriver
1.配置SeleniumRC下载selenium-server-standalone-3.3.1下载地址http://www.seleniumhq.org
xinyuehuixin
·
2020-07-12 17:39
测试学习
selenium 禁止加载图片 css js
fromselenium.
webdriver
.chrome.optionsimportOptionsoptions=Options()prefs={'profile.default_content_setting_values
njuclc
·
2020-07-12 17:00
python selenium 右键另存为 爬坑指南 (包含windows和linux)
不然会报如下的错:selenium.common.exceptions.
WebDriver
Exception:Messa
xiatiancc
·
2020-07-12 16:12
Selenium
Webdriver
弹出框的种种类型
转自:http://www.
webdriver
.org/article-32-1.html测试过程中,我们经常会遇到许多的弹出框去处理,比如登陆的用户名密码输入,或是页面的警告,还或者是新页面弹出,本文我们就来将这些分类下
xiaosongbk
·
2020-07-12 16:10
selenium
上一页
116
117
118
119
120
121
122
123
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他