随笔分类 -  Java

Java
摘要:在工作过程中发现经常需要对某些字符串进行处理,所以就封装了加一些常用的 package com.dbyl.libarary.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Stri 阅读全文
posted @ 2016-02-21 17:26 to be crazy 阅读(705) 评论(0) 推荐(0) 编辑
摘要:1、 对input执行输入 直接设置value属性, 此方法主要应对输入框自动补全以及readonly属性的element,sendkeys不稳定 比如: 对此可以封装一个typeQuick的方法 去掉只读属性 2.对富文本框的操作 主要应对富文本框,可以封装获取富文本框内容和设置富文本路况内容的方 阅读全文
posted @ 2015-09-17 23:14 to be crazy 阅读(36485) 评论(2) 推荐(1) 编辑
摘要:Class.forName的使用Class.forName返回一个类,使用此方法可以获取类首先,创建一个Student类 1 /*** 2 * This Class is for Student bean 3 * @author Young 4 * 5 */ 6 public class S... 阅读全文
posted @ 2015-09-06 16:37 to be crazy 阅读(534) 评论(0) 推荐(0) 编辑
摘要:java 处理XML(dom4j-1.6.1)Java 处理xml有很多框架,今天使用主流框架dom4j-1.6.1下载地址:http://www.dom4j.org/dom4j-1.6.1/Dom4j,是一款开源的处理XML,XPath, and XSLT的框架,它容易使用,并且完全支持DOM, ... 阅读全文
posted @ 2015-07-21 00:04 to be crazy 阅读(2235) 评论(1) 推荐(1) 编辑
摘要:selenium sikuli 右键下载 webdriver 阅读全文
posted @ 2015-05-22 21:18 to be crazy 阅读(3494) 评论(0) 推荐(0) 编辑
摘要:arrayList 排序 Collections sort 阅读全文
posted @ 2015-05-21 22:34 to be crazy 阅读(2248) 评论(0) 推荐(1) 编辑
摘要:之前在一个项目组,写了两次粗浅的自动化方面的思考关于自动化测试的一些思考(一)http://www.cnblogs.com/tobecrazy/archive/2012/12/18/2824248.html关于自动化测试的一些思考(二)http://www.cnblogs.com/tobecrazy... 阅读全文
posted @ 2015-04-06 14:42 to be crazy 阅读(4259) 评论(3) 推荐(1) 编辑
摘要:一般的日期控件都是input标签下弹出来的,如果使用webdriver 去设置日期,1. 定位到该input2. 使用sendKeys 方法比如:但是,有的日期控件是readonly的比如12306的这个这个时候,没法调用WebElement的sendKeys()方案一:使用JS remove re... 阅读全文
posted @ 2015-01-07 23:46 to be crazy 阅读(27526) 评论(1) 推荐(0) 编辑
摘要:爬虫 另类 遍历页面内容 阅读全文
posted @ 2014-11-23 21:40 to be crazy 阅读(9891) 评论(0) 推荐(1) 编辑
摘要:public class ArgsTest { private List args; private ArgsTestCheckPoint checkPoint; public enum ArgsTestCheckPoint { IS_NAME_COR... 阅读全文
posted @ 2014-11-10 22:35 to be crazy 阅读(742) 评论(0) 推荐(0) 编辑
摘要:首先,html table是由 table 元素以及一个或多个 tr、th 或 td 元素组成。for example:这是一个简单的html table:源码如下:for selenium test table head: ... 阅读全文
posted @ 2014-10-26 15:50 to be crazy 阅读(16602) 评论(1) 推荐(0) 编辑
摘要:FF firebug 阅读全文
posted @ 2014-10-21 13:17 to be crazy 阅读(2687) 评论(1) 推荐(0) 编辑
摘要:WordPress 的 rich text采用js,先让selenium切换到iframe中driver.switchTo().frame("content_ifr");然后执行JSWebElement editor = driver.findElement(By.tagName("body"));... 阅读全文
posted @ 2014-08-30 23:10 to be crazy 阅读(4196) 评论(1) 推荐(0) 编辑
摘要:/* * this function will read from excel * and will return the items of excel */ public static String[][] readExcel(String config) ... 阅读全文
posted @ 2014-08-19 20:06 to be crazy 阅读(1208) 评论(0) 推荐(0) 编辑
摘要:package baidu; import java.io.File;import java.io.IOException; import java.util.List;import org.apache.commons.io.FileUtils; import org.openqa.seleniu... 阅读全文
posted @ 2014-08-19 20:05 to be crazy 阅读(1542) 评论(0) 推荐(0) 编辑
摘要:最近工作比较忙,没有时间思考和学习,再加上报了个驾校,准备科目三,落下许多。前一段时间去携程面试,曾经去过一次,不是有意黑携程,对携程的印象越来越差。1.办公环境,感觉比较拥挤,没有个人空间 台式机一大片,没有独立的cube,现在很少有公司开发部门用台式机吧。2.携程面试流程不够正式,不够尊重面试... 阅读全文
posted @ 2014-05-27 22:29 to be crazy 阅读(34451) 评论(3) 推荐(0) 编辑
摘要:首先为eclipse添加testng插件步骤如下:help->Install New SoftWare...2. 添加testng链接,该链接可以在这里找到For the Eclipse plug-in, we suggest using the update site:SelectHelp / Software updates / Find and Install.Search for new features to install.New remote site.For Eclipse 3.4 and above, enterhttp://beust.com/eclipse.For 阅读全文
posted @ 2014-03-15 23:10 to be crazy 阅读(2039) 评论(0) 推荐(0) 编辑
摘要:在验证某些关键步骤时,需要截个图来记录一下当时的情况Webdriver截图时,需要引入import java.io.File;import java.io.IOException;import org.apache.commons.io.FileUtils;import org.openqa.sel... 阅读全文
posted @ 2014-03-13 23:18 to be crazy 阅读(36873) 评论(2) 推荐(1) 编辑
摘要:package baidu; import java.io.File;import java.io.IOException;import junit.framework.TestCase;import org.apache.commons.io.FileUtils;import org.junit.Test;import org.openqa.selenium.By;import org.openqa.selenium.OutputType;import org.openqa.selenium.TakesScreenshot;import org.openqa.selenium.WebDri. 阅读全文
posted @ 2014-03-07 00:25 to be crazy 阅读(3278) 评论(0) 推荐(0) 编辑
摘要:1.通过数组名进行赋值,其实质是引用比如数组array1和数组array2若执行array2=array1,实际上将array1的引用传递给array2,array1和array2 最后都指向同一个数组,array2原来引用的数组被回收。例如: int [] array1={1,2,3}; int [] array2=new int[10]; array2=array1; for(int i=0;i<array2.length;i++) { System.out.prin... 阅读全文
posted @ 2014-02-13 21:38 to be crazy 阅读(3341) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示