资 源 简 介
browserspy is a cross browser automation test tool based on selenium 2.0, namely webdriver, selenium grid 2.0, testng and image compare.
How to use it:
1. setup selenium grid 2.0 env
a. setup selenium grid hub, run following command in CMD.
java -jar selenium-server-standalone-2.20.0.jar -role hub
b. setup selenium grid node, ie,ff etc, pls run following command in CMD.
java -jar selenium-server-standalone-2.20.0.jar -role webdriver -hub http://localhost:4444/grid/register -browser browserName=iexplore,platform=WINDOWS
java -jar selenium-server-standalone-2.20.0.jar -role webdriver -hub http://localhost:4444/grid/register -browser browserName=firefox,platform=WINDOWS
c. for more info, pls visit selenium grid website.
2. write selenium test case and use BrowserSpy API.
a. following is the sample code to do search use BAIDU.
public class BaiduRemoteWebDriverTest {
> public WebDriver driver;
> public BrowserSpy spy;
> @Parameters({ "browser" })
> @BeforeClass
> public void setup(Str