Hey,
I've written a test for a page which contains an "AjaxTabbedPanel".
Right now I'm testing the click on the second tab like this:
AjaxTabbedPanel tabbedPanel = (AjaxTabbedPanel)
tester.getComponentFromLastRenderedPage("panel:tabPanel");
WebMarkupContainer tabs = (WebMarkupContainer)
tabbedPanel.get("tabs-container:tabs");
WebMarkupContainer siteTab = (WebMarkupContainer) tabs.get("1");
AjaxFallbackLink sitesTabLink = (AjaxFallbackLink) siteTab.get("link");
tester.clickLink(sitesTabLink.getPageRelativePath(), true);
This works quite good. But I'm having problems with using too much
"internal knowledge" (e.g. the tabs-container id) of the AjaxTabbedPanel.
Sure, this is more an academically problem. But I'd like to know if
there's a better approach.
Thanks in advance!
Sven
--
subshell GmbH
Sven Schliesing
Margaretenstraße 43a t +49.40.431 362-23
20357 Hamburg f +49.40.431 362-29
http://www.subshell.com [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]