Hi

What i do is create a main test page say "TestIndex"

Now say I have a page PageNeedingContext and it needs a context, I add this
to my TestIndex page

<t:pagelink t:page='PageNeedingContext' t:id='mycontext'
id='PageNeedingContext'>Page Needing Context</t:pagelink>


Now my test will be something like

   @BeforeClass
   public void init() {
      pageTester = new PageTester("mypackage", "TestApp",
            "src/test/webapp", new Class<?>[] { MyModule.class });
   }

   @Test
   public void testPageNeedingContext(){
      //Render the first page
      Document doc = pageTester.renderPage("testIndex");

      //Get the page link you want to test
      Element element =
doc.getRootElement().getElementById("PageNeedingContext");

      //Click and test the page
      pageTester.clickLink(element);
   }


So your page may have any injected services, it will work


Hope it helps
regards
taha


On Sun, Jan 23, 2011 at 2:37 PM, Angelo C. <angelochen...@gmail.com> wrote:

>
> if the page contains some injected services, how to use PageTester with
> this
> kind of page? thanks.
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-test-ActivationRequestParameter-using-PageTester-tp3353447p3353466.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to