Hi Jian,
I tried the first two methods and it still uses Firefox as default Browser.(
IE is the default browser in my machine)
the third method is not very clear to me ( i think its written in TestNG ).
I tried changing both TelluriumConfig.groovy ( its in my project's root
directory ) and using setCustomConfig:
//server port number the client needs to connect
port = "4444"
//base URL
baseUrl = "http://localhost:8080"
//Browser setting, valid options are
// *firefox [absolute path]
// *iexplore [absolute path]
// *chrome
// *iehta
1) i set browser to following values
browser = "*iexplore"
browser= "C:/Program Files/Internet Explorer/iexplore.exe"
browser= "C:\Program Files\Internet Explorer\iexplore.exe"
browser = "*iexplore [C:\Program Files\Internet
Explorer\iexplore.exe]"
2) static{
setCustomConfig(true, 4444, "*iexplore", true,"localhost");
}
static{
setCustomConfig(true, 4444, "C:\Program Files\Internet
Explorer\iexplore.exe", true,"localhost");
}
None of them worked
help me out with this,
Thanks,
Prasanna
On Mon, Aug 31, 2009 at 8:30 PM, Jian Fang <[email protected]> wrote:
> What do you mean "its not firing IE"?
>
> There are three ways to change browsers for a test case
>
> 1) Change the browser parameter in TelluriumConfig.groovy, which is a
> global setting file for the whole project.
>
> Have you tried the following?
>
> browser = "*iexplore"
>
> Usually, I am on Linux system, but I did run the tests successfully with
> the above parameter in Windows system.
>
> 2) use the "setCustomConfig" static block in your test class to change the
> settings for a test class.
>
>
> http://code.google.com/p/aost/wiki/UserGuide?tm=6#Customize_Individual_Test_settings_Using_setCustomConfig
>
> 3) Use 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 Mon, Aug 31, 2009 at 10:39 AM, prasanna bhat
> <[email protected]>wrote:
>
>>
>> hi all,
>>
>> by default firefox browser is fired whenever i execute a tests. I want
>> to change it to IE, i tried it by altering TelluriumConfig.groovy in
>> this way but its not firing IE.
>>
>> browser = "*iexplore C:/Program Files/Internet Explorer/iexplore.exe"
>>
>> Please let me know how can i test across different browsers or how do
>> i change default browser settings.
>>
>> Thanks,
>> Prasanna.
>>
>>
>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---