摘要: maven install项目生成target文件时, 不会把Resource外的xml文件编译进去,此时需要自己把main/java中xml文件导入到target文件中,需要在pom.xml中加入: 阅读全文
posted @ 2018-02-02 19:05 wxjhappy 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 1、右键项目名称-properties-Java Build Path - Libraries- Maven Dependencies 查看导入的包会有报错信息 阅读全文
posted @ 2017-03-29 10:32 wxjhappy 阅读(3089) 评论(0) 推荐(0) 编辑
摘要: public class WriteExcel { private static final String EXCEL_XLS = "xls"; private static final String EXCEL_XLSX = "xlsx"; public static void main(Stri 阅读全文
posted @ 2017-03-14 14:01 wxjhappy 阅读(336) 评论(0) 推荐(0) 编辑
摘要: //下载文件方法 @Test public static void download_file() { System.setProperty("webdriver.firefox.bin", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe 阅读全文
posted @ 2017-03-13 16:25 wxjhappy 阅读(202) 评论(0) 推荐(0) 编辑
摘要: @Testpublic void dopost(){ String httpurl = "https://jin.caimao.com/api/user/loginSalt"; Map<String,String> params = new HashMap<String,String>(); par 阅读全文
posted @ 2017-01-16 11:51 wxjhappy 阅读(10284) 评论(0) 推荐(0) 编辑
摘要: 应用场景:对于web端接收手机验证码的处理方法:1、如果有权限可以通过查询数据库来获得手机验证码,方便快捷。2、如果后台系统保存了手机验证码,可以去后台获取验证码,然后填写到前台页面,此方法有两种处理方法 2.1 在前台发送验证码的页面,直接通过dr.get("http://www.xxx.com" 阅读全文
posted @ 2017-01-16 11:32 wxjhappy 阅读(3930) 评论(0) 推荐(0) 编辑
摘要: 1、1.直接传入Javascript代码,定位元素 js可以点击页面上不显示暂时隐藏(比如下拉列表),但是html文件中存在的属性 WebDriver driver = new FirefoxDriver(); JavascriptExecutor js = (JavascriptExecutor) 阅读全文
posted @ 2017-01-13 11:29 wxjhappy 阅读(2834) 评论(0) 推荐(0) 编辑