}
@DataProvider public Object[][] provideGoodSamples() {
return new Object[][]{
test("http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory())),
test("selenium firefox http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory())),
test("selenium chrome http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory(SeleniumBrowserFactory.CHROME))),
test("selenium ie http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory(SeleniumBrowserFactory.IE))),
test("selenium whatever_other_browser http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory("whatever_other_browser"))),
test("Selenium Chrome http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory(SeleniumBrowserFactory.CHROME))),
test("SELENIUM CHROME http://example.org 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumBrowserFactory(SeleniumBrowserFactory.CHROME))),
test("selenium grid http://mygrid:8080/wd/hub --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub"))),
test("selenium grid http://mygrid:8080/wd/hub --browser chrome --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub")
.withBrowser("chrome"))),
test("selenium grid http://mygrid:8080/wd/hub --browser chrome --version 21.1 --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub")
.withBrowser("chrome")
.withBrowserVersion("21.1"))),
test("selenium grid http://mygrid:8080/wd/hub --browser chrome --version 21.1 --platform XP --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub")
.withBrowser("chrome")
.withBrowserVersion("21.1")
.withPlatform(Platform.XP))),
test("selenium grid http://mygrid:8080/wd/hub --browser chrome --version 21.1 --platform WIN8 --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub")
.withBrowser("chrome")
.withBrowserVersion("21.1")
.withPlatform(Platform.WIN8))),
test("selenium grid http://mygrid:8080/wd/hub --dc.device-orientation portrait --dc.platform \"OS X 10.0\" --page http://example.org --size 640x480", new GalenPageTest()
.withUrl("http://example.org")
.withSize(640, 480)
.withBrowserFactory(new SeleniumGridBrowserFactory("http://mygrid:8080/wd/hub")
.withDesiredCapability("device-orientation", "portrait")
.withDesiredCapability("platform", "OS X 10.0"))),
test("jsfactory script.js http://example.com 640x480", new GalenPageTest()
.withBrowserFactory(new JsBrowserFactory("script.js", new String[]{"http://example.com", "640x480"})))
};
}