You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pablo dos Reis <pa...@gmail.com> on 2010/07/24 23:31:55 UTC
SeleniumTestCase context uninitialized
When I run my test class that extends SeleniumTestCase
in the following method all calls to context.getAttribute return nul.
It's necessary any configuration to work well?
@BeforeClass
public void setup(ITestContext context)
{
this.testContext = context;
delegate = (Selenium)
context.getAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE);
baseURL = (String)
context.getAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE);
errorReporter = (ErrorReporter)
context.getAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE);
}
--
Pablo Henrique dos Reis
Re: SeleniumTestCase context uninitialized
Posted by Pablo dos Reis <pa...@gmail.com>.
Thanks for the tip Josh,
I created my own base class like TapestryCoreTestCase that stayed in one of
the tapestry core apps.
2010/7/25 Josh Canfield <jo...@gmail.com>
> Take a look at
> http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/test/SeleniumLauncher.html
>
> I've run into the same problem. It makes running your test cases from your
> IDE very inconvenient.
>
> You could create your own base class that calls the launcher methods
> without having to include them in the testng configuration.
>
> That doesn't help if your trying to run tapestry core tests though.
>
>
> -- Josh
>
> On Jul 24, 2010, at 2:31 PM, Pablo dos Reis <pa...@gmail.com>
> wrote:
>
> > When I run my test class that extends SeleniumTestCase
> > in the following method all calls to context.getAttribute return nul.
> >
> >
> > It's necessary any configuration to work well?
> >
> >
> > @BeforeClass
> > public void setup(ITestContext context)
> > {
> > this.testContext = context;
> >
> > delegate = (Selenium)
> > context.getAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE);
> > baseURL = (String)
> > context.getAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE);
> > errorReporter = (ErrorReporter)
> > context.getAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE);
> > }
> >
> >
> >
> > --
> > Pablo Henrique dos Reis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Pablo Henrique dos Reis
Re: SeleniumTestCase context uninitialized
Posted by Josh Canfield <jo...@gmail.com>.
Take a look at http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/test/SeleniumLauncher.html
I've run into the same problem. It makes running your test cases from your IDE very inconvenient.
You could create your own base class that calls the launcher methods without having to include them in the testng configuration.
That doesn't help if your trying to run tapestry core tests though.
-- Josh
On Jul 24, 2010, at 2:31 PM, Pablo dos Reis <pa...@gmail.com> wrote:
> When I run my test class that extends SeleniumTestCase
> in the following method all calls to context.getAttribute return nul.
>
>
> It's necessary any configuration to work well?
>
>
> @BeforeClass
> public void setup(ITestContext context)
> {
> this.testContext = context;
>
> delegate = (Selenium)
> context.getAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE);
> baseURL = (String)
> context.getAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE);
> errorReporter = (ErrorReporter)
> context.getAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE);
> }
>
>
>
> --
> Pablo Henrique dos Reis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org