包含标签 selenium articles

chrome报错ssl_client_socket_impl.cc报错解决

背景 帮公司的一个爬虫项目安装完成了google chrome headless,其在使用selenium + chrome爬取内部的一个合作厂家的站点信息时,出现了无法获取内容的情况,同时也没有明显的报错信息。使用内部httpd服务搭建的测试页,可以正常获取。 解决方法 帮其分析后,直接使用chrom……

Continue reading

python+selenium+Chrome Headless套装

使用python比较多的一个应用场景就是数据采集,采集一些比较蛋疼的页面时,会检测用户是否是通过浏览器打开的页面,还有一些会通过js加载后才会回显内容。这个时候可能用的比较多的方案就是python + Headless + 浏览器,其会自动打开浏览器,并输入相应的页面地址后,并可以抓取返回的结果。 不过……

Continue reading

selenium之webdriver页面元素定位

进行Web页面自动化测试,对页面上的元素进行定位,继而再进行click操作或数据提交。可以跟据页面上有各种属性进行定位,比如元素名字,元素id,元素属性(class属性,name属性)等等。webdriver就是利用元素的这些属性来进行定位的。可以用于定位的常用的元素属性: id、……

Continue reading

win+python+selenium实现窗口和tab切换

这篇总结主要是关于两方面的需求:其一,在浏览器不同tab标签页之间按时间切换(同事用来不停刷新grid crontol 监控页面);其二,实现开启多个窗口,并将窗口缩放到一定范围,并齐占满整个桌面,按不同的时间间隔刷新几个页面。 一、标签页之间切换 之前这个通过找了一个浏览器插件tab-rotato……

Continue reading

Python+selenium启动浏览器Firefox\Chrome\IE

在写一功能的时候,本来准备使用webbroswer模块实现,不过发现其只能实现简单的打开,而且打开tab页面发现并不能实现。所以决能通过selenium模块实现,这里列下几个selenium操作不同浏览器的定义的函数。 一、webbroswer模块 该模块的非常简单,如下: 1import webbrowser 2c = webbrowser.get('firefox')……

Continue reading

python+selenium报错geckodriver的解决方法

在安装完python及selenium模块后,默认执行启动firefox浏览器,并执行的时候,遇到报错:geckodriver executable needs to be in path ,具体见下图: <img src="https://blog.361way.com/wp-content/uploads/2016/08/firefox-geckodriver.png" title="firefox-geckodriver" alt="firefox-geckodriver" width="647" height="259" /> 经查询发现,主机上没有安装firefox使用的驱动文件geckodriver,该程序可以从:<a href="https://github.com/mozilla/geckodriver/releases" target="_blank" rel="noopener">https://github.com/mozilla/geckodriver/releases</a> 页面下……

Continue reading

selenium常用函数

1、浏览器中加载url 方法:get(url) 实例:driver.get(“http//:www.baidu.com”) 2、向前 方法:forward() 实例:driver.forward() 3、返回当前会话中的cookies 方法:get_cookies() 实例:driver.get……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI AWS Ansible Atlassian Azure BMC Blockchain Brocade CDH5 CL210 Cobbler Confd C语言 DDOS DISTINCT DNS Duckdb EKS ELK GCP Ghost Git Glusterfs Go Godaddy Grafana HBA HCIE Hotspot HttpWatch IBM IIS IOS InfluxDB Ingress InnoDB JavaScript Jinja2 KVM Keepalived Mplayer MySQLdb Netlify OpenResty PM PostgreSQL QoS RH318 RH442 RHCA RHCE RHEV RSA SRE SecureCRT Statuscode SublimeText2 TC Telecom Tencentcloud VBA aira2 alpine android anpic apache apm apparmor appfog apr apt-get aria2 array atop audit awk awstats axel backdoor backup bamboo bash bat benchmark bigdata bin bind bitwise book bootstrap bsd c1000 cache capistrano catlog centos centos7 chatops chattr check_mk checkinstall cisco clearall clickhouse cloud-desktop cmdb cms collectd comm compress conver corosync cpu crontab crunchbang css curl date decode dell desktop devops df dhcp diff diskpart django docker dos2unix dpkg drupal etcd excel fail2ban fastcgi fdisk fiddler find firewalld flask flvtool ftp function fuser geek gin github gitlab glances golang google gooupadd graphviz gravatra grep grub2 hadoop haproxy hardware heartbeat helm hexdump hhvm history html http/html/web httplogs https huawei huaweicloud hugo icmp iconv ifconfig inotify iopp ipmitool iptables iredmail iscsi isito it-news java jdk jenkins jira join joomla k3s k8s kdump kernel kingate lamp last leetcode lib light-http linux linux高级篇 ln ls lsi lsof lvm lvs mac mail man mark markdown matplotlib maven memcached microservice mimikatz mkdocs mkpasswd mmonit mod_jk mongodb monit monitor mono moodle mosh mount mpm mrtg mtr my.cnf mysql mysqlbinlog mysqld_multi mysqldump mysqlhotcopy nagios nc nethogs nexus nfs nginx nmon nocatlog node.js nrpe ntfs ntop ntp obs ocr open-falcon openbox opencv openldap openssl openstack oracle oswatch paas pacemaker pam pandas parted pcp pcre pdf percona perl pexpect pgrep php php-fpm ping plsql develope postfix powershell prettify proc prometheus puppeteer pushd pwgen pxe pyecharts python python模块 radmin raid rdesktop read redhat redis redmine regex rh134 rhel7 rhel8 rm rman rootkit route rpm rpmforge rrdtool rsync rsyslog safe saltstack samba scapy screen sed selenium selinux seo seq session set shc sheepdog shell shopt sitemap skydns smokeping snffier snmp socket soft sort spider sql sqlserver squid ss ssh sshpass strace strings su sudo suse svn sysbench syslog-ng sysstat systemd t tar tcpcopy tcpdump tech telnet tengine test testlink threads time tmux tomcat touch tr tsar twisted ubuntu udev ulimit unix unixbench user-agent useradd varnish vbs vercel vi vim visudo vmstat vmware vnc voice vpn vscode vsftp vsftpd vue watchdog web webcam webistrano wget wiki windows wol wordpress workshop wsl x-windows xampp xcache xmllint xtrabackup yule yum zabbix zeromq zip zonetime zookeeper 下载工具 云主机 云原生 代理 加密 古意 吐槽 圈里圈外 娱乐 字符串函数 安全 平台架构 意林 推理 提权 故事汇 故障案例 数据结构 每日看点 民国史 生活 科学记录 站长管理工具 算法 管理 网站架构 翻墙 股票 行业 诗韵 负载均衡 远程管理 面试题

Links

Meta