You have extra characters in your TelluriumConfig.groovy when you cut and
paste.

Please use the configuration files as I pointed out in the previous post.

Or use Tellurium Maven archetype to create a clean project,

http://code.google.com/p/aost/wiki/TelluriumMavenArchetypes

Thanks,

Jian

On Mon, Sep 7, 2009 at 9:42 AM, prasanna bhat <[email protected]>wrote:

>
> Hi Jian,
>
> I think there seems to be a problem with the project itself. I'm
> getting the error below whenever i run the test:
>
> Parse configuration file: TelluriumConfig.groovy
> Cannot open configuration file TelluriumConfig.groovy:
> startup failed:
> script1252330711970.groovy: 1: unexpected char: 0xBB @ line 1, column
> 2.
> 1 error
>
> Can you please throw light on this and help me point the error.
>
> Thanks,
> Prasanna
>
> On Sep 6, 12:21 pm, prasanna bhat <[email protected]> wrote:
> > hi jian,
> >
> > is there anything wrong in the TelluriumConfig.groovy or the JUnit
> > test case that i have sent you.
> >
> > thanks,
> > prasanna
> >
> > On Sep 3, 7:54 pm, Jian Fang <[email protected]> wrote:
> >
> > > That is really wired. Should work fine for the first two ways. Yes, the
> > > third one is a TestNG class. But JUnit also supports parametrized
> tests. For
> > > example, please read,
> >
> > >http://binkley.blogspot.com/2007/03/writing-junit-4-parameterized-tes.
> ..
> >
> > >http://ourcraft.wordpress.com/2008/08/27/writing-a-parameterized-juni.
> ..
> >
> > >http://isagoksu.com/2009/development/agile-development/test-driven-de.
> ..
> >
> > > Please send your TelluriumConfig.groovy and your sample test class to
> my
> > > email account. I will take a look.
> >
> > > Thanks,
> >
> > > Jian
> >
> > > On Thu, Sep 3, 2009 at 10:23 AM, prasanna bhat <
> [email protected]>wrote:
> >
> > > > 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_Individua...
> >
> > > >> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to