Selenium-IDE是firefox下的一个addon,可以非常方便的生成SeleniumRC的各种代码,比如python代码。和SeleniumRC配合使用后,简直是网页自动化的神器。安装使用参照这个:http://seleniumhq.org/docs/02_selenium_ide.html这里记录一些使用技巧。trick 1:最好配合firebug用。trick2:不要用自动记录下来的代码。用firebug找到你要操作的元素。只要做网页的前端,不太混蛋,基本上总能够用一层一层的ID来准确定位到任意元素。举个简单的例子:click //form[@id='form2' Read More
posted @ 2011-05-24 15:37 hjtc Views(498) Comments(0) Diggs(0) Edit
以操作百度地图的一个case为例子, 查询两个地址之间的公交路线,并且使用python驱动Selenium RC。 前置知识:http://seleniumhq.org/docs/05_selenium_rc.html#learning-the-api -》Selenium RC结构,安装各种语言的sdkhttp://seleniumhq.org/docs/ -> Selenium IDE 用法... Read More
posted @ 2011-05-24 15:16 hjtc Views(733) Comments(0) Diggs(0) Edit