摘要: selenium2中的等待 分两种 Explicit Waits Implicit Waits Explicit Waits(显示等待) 等待一个指定的条件发生后,再去执行后续代码。比较差的应用就是Thread.sleep()(指定一个固定的时间去等待) WebDriverWait 和 expect 阅读全文
posted @ 2017-09-12 17:05 项磊磊 阅读(175) 评论(0) 推荐(0)
摘要: 一、Firefox 使用最新版本firefox 55.0.3 selenium版本 selenium 3.5.0 selenium取消了默认支持firefox浏览器,需要使用第三方geckodriver.exe调用(类似selenium2时使用的chromedriver.exe) geckodriv 阅读全文
posted @ 2017-09-12 16:19 项磊磊 阅读(243) 评论(0) 推荐(0)
摘要: org.apache.maven.plugins maven-compiler-plugin 2.1 1.8 ... 阅读全文
posted @ 2017-09-07 16:44 项磊磊 阅读(164) 评论(0) 推荐(0)
摘要: 1 awk --re-interval '/([0-9]{1,3}\.){3}/{count[$1]++};BEGIN{printf "%-20s%5s\n","IP","times"};END{for(i in count){printf "%-20s%5d\n",i,count[i]}}' 阅读全文
posted @ 2017-08-24 09:29 项磊磊 阅读(1681) 评论(0) 推荐(0)
摘要: JDK代理是基于接口的,只有代理实现接口的类 Cglib代理是基于类的,通过继承该类,重写覆盖增强父类的方法,故final类不能代理 阅读全文
posted @ 2016-04-06 15:43 项磊磊 阅读(294) 评论(0) 推荐(0)
摘要: public interface Buy { void buy(String name); } public class Person implements Buy{ @Override public void buy(String name) { System.out.println(this.getClass().getName() + ... 阅读全文
posted @ 2016-04-06 15:17 项磊磊 阅读(133) 评论(0) 推荐(0)
摘要: #!/usr/bi/env python # -*- coding:utf-8 -*- import urllib import urllib2 import re class Turtle(object): def __init__(self): self.pageIndex = 1 self.stories = [] self.ena... 阅读全文
posted @ 2016-03-18 13:08 项磊磊 阅读(197) 评论(0) 推荐(0)
摘要: 1、构建MAVEN JAVA工程 2、修改pom.xml,添加依赖包 1 <dependency> 2 <groupId>junit</groupId> 3 <artifactId>junit</artifactId> 4 <version>4.8.1</version> 5 </dependenc 阅读全文
posted @ 2016-03-10 16:17 项磊磊 阅读(1039) 评论(0) 推荐(0)