Re: WicketTester and Palette component

2010-08-03 Thread loic

It seems good but i would really like to be able to test Palette without a
new framework 

Is it really impossible to test Palette with wicket-tester?

Regards
Loic
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-Palette-component-tp2306743p2312048.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester and Palette component

2010-08-02 Thread loic

Hi Kent, thanks a lot i will take a look a this

Regards,
Loic
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-Palette-component-tp2306743p2310424.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketTester and Palette component

2010-07-31 Thread Kent Tong

Hi Loic,

If you use wicket page test (http://wicketpagetest.sourceforge.net), you
can test it like:

  DefaultSelenium selenium = WebPageTestContext.getSelenium();
  WicketSelenium ws = new WicketSelenium(selenium);
  ws.openBookmarkablePage(PalettePage.class);
  String[] allProducts = selenium.getSelectOptions("wicket=//choices");
  assert allProducts.length == 3;
  assert allProducts[0].equals("ball pen");
  assert allProducts[1].equals("eraser");
  assert allProducts[2].equals("paper clip");
  selenium.select("wicket=//choices", "eraser");
  selenium.click("wicket=//addButton");
  ...

There is a full example at 
http://wicketpagetest.sourceforge.net/examples.html


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketTester and Palette component

2010-07-29 Thread loic

Hello,
i'm trying to test a form with a Palette component, with WicketTester.

I don't know how to make a selection into the palette.
I did all the stuff i need to fill the Palette with some values, so it
should not be empty.

If i do 

formTester.selectMultiple("myPalette", new int[] {0});

I get a "palette cannot be cast to FormComponent" error.

Palette contains a "recorder" component, which is a FormComponent (it
extends TextField)

if i try 

formTester.select("myPalette:recorder", 0 );

or 
formTester.selectMultiple("myPalette:recorder", new int[] {0});

I get a "Trying to select on null component" error ...

Thanks for your help!

Loic


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-and-Palette-component-tp2306743p2306743.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org