码迷,mamicode.com
首页 >  
搜索关键字:Selenium    ( 6249个结果
python_30期自动化【艺龙酒店】
from selenium import webdriverimport time #导入时间#打开谷歌浏览器driver = webdriver.Chrome()#打开艺龙网站driver.get("http://www.elong.com/")time.sleep(1)#选择热门城市“成都”Te ...
分类:编程语言   时间:2020-05-24 00:19:23    阅读次数:56
利用 selenium 爬取糗事百科
需要: 最近看到了selenium介绍,说是可以模拟人类自动打开网页 很有兴趣,于是学习了下, 果然:兴趣是最好的老师。 说明: 选取糗事百科,因为没有设置爬虫robots,所以用来练手, 请不要恶意爬取。 代码如下: #!/usr/bin/env python #-*- coding:utf-8 ...
分类:其他好文   时间:2020-05-23 12:51:48    阅读次数:51
【selenium学习 -16】对比两个截图的相似度
前面有说过在测试过程中可以截图,截图后,我们可以通过对比截图的相似度,来进行断言 本文介绍两个可以对比截图相似度的方法 方法一: from PIL import Image import math import operator from functools import reduce def im ...
分类:其他好文   时间:2020-05-22 21:38:40    阅读次数:110
selenium 下拉到页面最底端
selenium操控浏览器下拉到页面最底端: https://www.cnblogs.com/TTyb/p/7662430.html #!/usr/bin/env python # -*- coding: utf-8 -*- from selenium import webdriver import ...
分类:其他好文   时间:2020-05-22 17:37:37    阅读次数:143
python selenium 下载滑块验证码
#_save_url 保存路径 def image_cj(driver, _save_url): try: _file_name = random.randint(0, 100000) _file_url_drop = _save_url + str(_file_name) + '背景.png' # ...
分类:编程语言   时间:2020-05-22 09:56:31    阅读次数:59
【selenium】打开浏览器闪退并报错
问题现象: 使用selenium打开浏览器,浏览器闪退,程序报错 问题原因: 浏览器驱动版本低了 解决方法: 更新浏览器驱动 Chromedriver谷歌驱动: http://npm.taobao.org/mirrors/chromedriver/ Geckodriver火狐驱动: https:// ...
分类:其他好文   时间:2020-05-22 09:31:42    阅读次数:243
使用selenium 连接到一个已经打开的浏览器
我们有时希望对一个已经打开的浏览器进行测试。 1.使用Debug 方式启动浏览器 Process proc = new Process(); proc.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\ch ...
分类:其他好文   时间:2020-05-21 16:30:13    阅读次数:446
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
背景 运行时代码报错: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error ...
分类:移动开发   时间:2020-05-20 12:36:57    阅读次数:127
python+selenium处理chrom显示通知弹框
使用chrome打开weibo.com会出现以下界面的弹出框: 这东西不属于页面alert弹框,而是属于浏览器的设置项。 要关掉它,需要对浏览器进行属于配置。具体见下面脚本: from selenium import webdriver import time options = webdriver ...
分类:编程语言   时间:2020-05-20 12:16:05    阅读次数:162
Python+Selenium自动化测试框架--鼠标事件(单击、右击、双击、鼠标悬停、鼠标拖动)
1 # coding=utf-8 2 from selenium import webdriver 3 from selenium.webdriver.common.action_chains import ActionChains 4 import time 5 6 driver = webdri ...
分类:编程语言   时间:2020-05-19 20:53:12    阅读次数:101
6249条   上一页 1 ... 42 43 44 45 46 ... 625 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!