上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 1.获取所有class,找到有注解的class,实例化成一个object放进map里面 2.在需要实例化的class,定义一个变量(null),上面加上注解 3.用反射把第一步object加进入变量中(以变量上面的注解做索引) 实例化成功 阅读全文
posted @ 2016-03-28 22:18 q55091 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 浏览器 1.用户访问,服务器回一个html文件,解析html构建dom树 2.渲染css ,执行js display:non 3.下载资源,遇到img标签,下载图,文字 4.最后等到</html> 问题: 1.上传图片没设置长宽高可能影响页面样式 2.页面未加载完成去操作重要功能, 因js加载顺序问 阅读全文
posted @ 2016-03-28 22:15 q55091 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 200 OK //客户端请求成功 400 Bad Request //客户端请求有语法错误,不能被服务器所理解 401 Unauthorized //请求未经授权,这个状态代码必须和WWW-Authenticate报头域一起使用 403 Forbidden //服务器收到请求,但是拒绝提供服务 40 阅读全文
posted @ 2016-03-28 22:12 q55091 阅读(144) 评论(0) 推荐(0) 编辑
摘要: map,list,set 阅读全文
posted @ 2016-03-28 22:08 q55091 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Cookie manage: 1. 把user data add进去chromeoptions里面 2. 先登录,然后 driver.manage().getCookies(); GetName,getvalue,getDomain,getPath,getExpiry,getSecure 然后再 C 阅读全文
posted @ 2016-03-28 22:05 q55091 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1. 修改任意html的属性 2. 操作滚动栏/滚动到执行高度或element "document.documentElement.scrollTop=" + height; WebElement target = driver.findElement(by); js.executeScript(" 阅读全文
posted @ 2016-03-28 22:04 q55091 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 原理: driver可以理解为remoteserver。我们代码就是客户端。通过http交互信息。 如启动浏览器,代码和remoteserver建立连接生成一个seession用于交互, driver用的是webdriver wire协议,把客户端代码转化成浏览器能识别的操作指令,相当于翻译器,从而 阅读全文
posted @ 2016-03-28 22:03 q55091 阅读(335) 评论(0) 推荐(0) 编辑
摘要: se 个人 ee 企业 me移动 jvm jre环境 jdk工具包 StreamBroswer s=new StreamBroswer() s.FinishProcess("Firefox.exe") Driver 1.new FirefoxDriver(p) FirefoxProflie p=ne 阅读全文
posted @ 2016-03-28 22:00 q55091 阅读(221) 评论(0) 推荐(0) 编辑
摘要: js滚动条 String js1 = "return document.documentElement.scrollHeight;"; // 滑动条的位置值 String js2 = "scroll(0,10000);"; ((JavascriptExecutor)webDriver).execut 阅读全文
posted @ 2016-03-28 21:55 q55091 阅读(234) 评论(0) 推荐(0) 编辑
摘要: xpath: a'a @title=\"a'a\ //a[contains(text(),'product_08')]/ancestor::tr//input[@class='live-tv-overview-delete'] WebElement delConfirmBut = driver.fi 阅读全文
posted @ 2016-03-28 21:54 q55091 阅读(377) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页