ITeye博客

2012 年文章归档

共 3 篇文章

webdriver 自动化测试

Selenium 是最流行的自动化测试工具,提供一整套的解决方案,其中webdriver remote方式比较灵活,浏览器可以指定本地或远程。部署也简单,在浏览器端运行java服务,客户端测试用例可以用 Java、Ruby、PHP、Python 编写。 测试服务器: 下载地址: http://selenium.googlecode.com/files/selenium-server-standalone-2.20.0.jar java -jar selenium-server-standalone-2.20.0.jar Ruby: Ruby使用watir-webdriver接口。 测试代码:…

2012-04-01 16:21 · Other

charset和URL编码关系

名词解释 charset: GBK、UTF-8、EUC-KR、Shift-JIS 等 URL编码:HTML form提交、JS里的encodeURIComponent函数 测试环境: 服务器:本地安装Apache,www根目录下放2个HTML页面(gbk.html和utf8.html),用Fiddler查看HTTP请求,或者tail -f access_log。 操作系统:Windows XP 浏览器版本:IE8、Firefox 10、Chrome 17、Opeara 11 form提交和encodeURIComponent的区别 form提交(application/x-www-form-…

2012-03-07 12:02 · JavaScript

IE6重复加载图片BUG

首先CSS背景图重复加载有解决方案,大家都知道。 解决方案: if (IE6) { try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} } 通过JavaScript代码插入多个SRC相同的IMG元素。 解决方案: <script> window.onload = function() { var div = document.getElementById('J_test'); var html = [ '<img src="space.gif" />', '<img src="spa…

2012-02-22 16:25 · JavaScript