Good question. You could use the openUrlWithBrowserParameters()
methods to change browser settings for
different test cases in the same test class,
public static void openUrlWithBrowserParameters(String url, String
serverHost, int serverPort, String baseUrl, String browser, String
browserOptions)
public static void openUrlWithBrowserParameters(String url, String
serverHost, int serverPort, String browser, String browserOptions)
public static void openUrlWithBrowserParameters(String url, String
serverHost, int serverPort, String browser)
For example,
public class GoogleStartPageTestNGTestCase extends
TelluriumTestNGTestCase {
protected static NewGoogleStartPage ngsp;
@BeforeClass
public static void initUi() {
ngsp = new NewGoogleStartPage();
ngsp.defineUi();
}
@DataProvider(name = "browser-provider")
public Object[][] browserParameters() {
return new Object[][]{new Object[] {"localhost", 4444,
"*chrome"},
new Object[] {"localhost", 4444, "*firefox"}};
}
@Test(dataProvider = "browser-provider")
@Parameters({"serverHost", "serverPort", "browser"})
public void testGoogleSearch(String serverHost, int serverPort,
String browser){
openUrlWithBrowserParameters("http://www.google.com",
serverHost, serverPort, browser);
ngsp.doGoogleSearch("tellurium selenium Groovy Test");
disconnectSeleniumServer();
}
@Test(dataProvider = "browser-provider")
@Parameters({"serverHost", "serverPort", "browser"})
public void testGoogleSearchFeelingLucky(String serverHost, int
serverPort, String browser){
openUrlWithBrowserParameters("http://www.google.com",
serverHost, serverPort, browser);
ngsp.doImFeelingLucky("tellurium selenium DSL Testing");
disconnectSeleniumServer();
}
}
Thanks,
Jian
On Sep 28, 6:42 am, WinWin <[email protected]> wrote:
> Hi I am new to Tellurium, my question might sound funny, but I'm just
> thinking whether is it possible to implement in such a way, whereby a
> tester run a set of test case once, and then two different browsers
> namely, IE & Firefox are call up and run the test concurrently?
>
> Or if I will need to run the same set of test cases in two different
> browsers, IE & firefox, what is the best way to do this?
> Please advice. Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---