selenium 和webdriver_入门实践
上一篇 / 下一篇 2012-04-27 10:08:38 / 个人分类:Selenium
|2Kb[?2Yr0
watir设计理念和selenium有很大差异。watir便于测试工程师快速上手,对ie支持非常好;而selenium擅长浏览器兼容性。51Testing软件测试网hf+`1o]hK]
参考:
a Wd/j&zJJ [0http://code.google.com/p/meimei/wiki/SeleniumUsage51Testing软件测试网U#v$y/S#_R4?
http://blog.csdn.net/shendl/archive/2009/03/08/3969750.aspx
"]s"R,rpMDDE0http://blog.csdn.net/shendl/archive/2009/03/08/3969750.aspx51Testing软件测试网.P8mx'`.h ppW
http://www.ibm.com/developerworks/cn/java/j-lo-selenium/
)i.e/W)NM z#i3u0http://www.onlymarshall.com/tag/selenium/51Testing软件测试网:XZ3k#v a(R!t
扩展http://xace.javaeye.com/blog/57972251Testing软件测试网a,wx Ch3{|5Jo
s8w:Y(E-t0
从http://code.google.com/p/selenium/downloads/list下载selenium-server-standalone-2.0a2.jar,selenium-server-standalone-2.0a2.jar
S/Q9\F]F a0%RNqhydcY5E!zaZ/C0
Webdriver是对selenium的一个封装,更加友好。Selenium2.0已经把webdriver合并进去。
+x(J(EU,~"o0执行http://code.google.com/p/selenium/wiki/GettingStarted代码出错。
0J-P9h{E/d#n01 webdriver错误:51Testing软件测试网0yc^eax8o2B-@ i
Exception in thread "main"org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed.
9~V8h g2d2|E%dUO"c0解决办法:指定firefox执行文件入系统属性。
Kcc%I5o-~4\,?0System.setProperty("webdriver.firefox.bin","D:/Program Files/Mozilla Firefox/firefox.exe");51Testing软件测试网 P*T7[yS h
WebDriver driver =newFirefoxDriver();
2h3{Up9Tq.O)kL0
k9L
{3`.vl1K051Testing软件测试网V.JLS
fGQ1Gv
2 解决selenium错误:51Testing软件测试网T,i!vE$PC$O