摘要: 要把ChromeDriver放到代码中的文件夹中c://*******Application public static WebDriver WebDriverRun(WebDriver driver){// System.setProperty(Dom4jXml.getValue("chromeD 阅读全文
posted @ 2016-12-14 14:42 "花田李氏 阅读(4734) 评论(0) 推荐(0) 编辑
摘要: 我们通常把代码放到git sever中,(scm manager)中,上传,下载代码, 可是通常工程的代码改动会有图标提示,改动过的,或者新增的,那么需要在eclipse的工程中做一下简单配置 1,工程右键-team-share project ,选择相应的项目,完成即可, 如果不配置此项,不影响上 阅读全文
posted @ 2016-12-14 11:33 "花田李氏 阅读(141) 评论(0) 推荐(0) 编辑
摘要: public static JavascriptExecutor jse; 声明一个js public LogoutWebElements(WebDriver driver){ LogoutWebElements.driver = driver; jse = (JavascriptExecutor) 阅读全文
posted @ 2016-12-14 11:09 "花田李氏 阅读(241) 评论(0) 推荐(0) 编辑
摘要: /**对比图片进行校验是否成功**/package com.allin.pc;import java.awt.image.BufferedImage;import java.awt.image.DataBuffer;import java.io.File;import java.io.IOExcep 阅读全文
posted @ 2016-12-12 17:14 "花田李氏 阅读(2134) 评论(0) 推荐(0) 编辑
摘要: 测试网址:http://www.w3school.com.cn/tiy/loadtext.asp?f=html5_video_simplepackage com.allin.pc;import java.io.File;import org.openqa.selenium.By;import org 阅读全文
posted @ 2016-12-12 17:13 "花田李氏 阅读(1435) 评论(0) 推荐(0) 编辑
摘要: package com.allin.pc;import java.util.List;import org.openqa.selenium.WebElement;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptEx 阅读全文
posted @ 2016-12-12 17:12 "花田李氏 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: /*** 滚动条滚到最下方,和滚到指定位置*/@Test(priority =1 ) public void scrollingToBottomo(){ //使用JavaScript的scrollTo函数和document.body.scrollheihgt参数 //将页面的滚动条滑到页面的最下方 阅读全文
posted @ 2016-12-12 17:12 "花田李氏 阅读(843) 评论(0) 推荐(0) 编辑
摘要: package com.allin.pc;import java.util.List;import org.openqa.selenium.WebElement;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptEx 阅读全文
posted @ 2016-12-12 17:11 "花田李氏 阅读(561) 评论(0) 推荐(0) 编辑
摘要: package com.allin.pc;import java.util.NoSuchElementException;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptExecutor;import org.op 阅读全文
posted @ 2016-12-12 17:10 "花田李氏 阅读(2982) 评论(0) 推荐(0) 编辑
摘要: /** * 操作浏览器的cookie */ @Test public void testCookie()throws Exception{ driver.get("http://allinmd.com"); //得到当前页面下所有cookies,并输出他们所在域,name,value,有效日期和路径 阅读全文
posted @ 2016-12-12 17:09 "花田李氏 阅读(778) 评论(0) 推荐(0) 编辑