码迷,mamicode.com
首页 >  
搜索关键字:webdriver    ( 2418个结果
python +selenium 实现图片对比功能
#encoding=utf-8 from selenium import webdriver import unittest, time from PIL import Image class ImageCompare(object): ''' 本类实现了对两张图片通过像素比对的算法,获取文件的像素 ...
分类:编程语言   时间:2020-04-05 13:37:51    阅读次数:214
python selenium自动化屏蔽chrome“正受到自动化测试软件的控制”、“开发者模式”、“保存密码提示”
from selenium import webdriver option = webdriver.ChromeOptions() #屏蔽自动化受控提示 && 开发者提示 option.add_experimental_option("excludeSwitches", ['enable-autom ...
分类:编程语言   时间:2020-04-04 18:54:27    阅读次数:207
添加cookie绕过登陆
添加cookie绕过登陆 #!/usr/bin/env python # -*- coding: utf-8 -*- from selenium import webdriver import time import pickle class SkipLogin(object): def __ini ...
分类:其他好文   时间:2020-04-03 16:29:34    阅读次数:79
Python+Selenium练习(五)-利用partial link text定位元素
partial link text 和 link text 有些相似,partial link text就是选择这个元素的link text中的一部分字段。 练习场景: # coding=utf-8 from selenium import webdriver driver = webdriver. ...
分类:编程语言   时间:2020-04-02 17:41:48    阅读次数:88
Python+Selenium练习(六)-利用class name定位元素
很多时候,我们查看元素的XPath信息,发现没有可以用来定位的id信息,这个时候我们就要考虑其他的可用的来定位元素。 练习场景:百度首页的搜索输入框 脚本如下: # coding=utf-8 from selenium import webdriver driver = webdriver.Chro ...
分类:编程语言   时间:2020-04-02 17:36:25    阅读次数:95
selenium+python学习——webdriver总结
1、学习自动化前,需先了解html和python的基础语法 2、安装环境 1)安装python+pycharm安装方法 可参考:微信公众号:软件安装管家(其中含有安装包以及安装方法) 2)安装selenium 可参考博文:https://www.cnblogs.com/yuer02/p/119056 ...
分类:编程语言   时间:2020-04-02 17:34:42    阅读次数:79
selenium 定位标签
from selenium import webdriverfrom lxml import etreeimport time a = webdriver.Chrome(executable_path=r'D:\python学习\其他\chromedriver.exe')url = 'https:/ ...
分类:其他好文   时间:2020-04-01 14:41:25    阅读次数:64
selenium 无头浏览器
from selenium import webdriverfrom selenium.webdriver.chrome.options import Options # 创建一个参数对象,来控制 chrome 浏览器无界面打开chrome_options = Options()chrome_opt ...
分类:其他好文   时间:2020-04-01 14:37:03    阅读次数:289
selenium 隐藏访问
from selenium import webdriverfrom selenium.webdriver import ChromeOptions options = ChromeOptions()options.add_experimental_option('excludeSwitches', ...
分类:其他好文   时间:2020-04-01 14:35:44    阅读次数:61
selenium 网页截图并保存
from selenium import webdriverfrom PIL import Imagefrom time import sleep login_12306 = webdriver.Chrome(executable_path=r'D:\python学习\其他\chromedriver ...
分类:Web程序   时间:2020-04-01 14:32:33    阅读次数:82
2418条   上一页 1 ... 23 24 25 26 27 ... 242 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!