[jboss-user] [JBoss Seam] - is it possible to access JSF UI components from seam testng

_polly do-not-reply at jboss.com
Mon Sep 17 06:33:18 EDT 2007


I'm wondering if there is any way of getting a handle on the jsf component model from a seam testng test script - so I can see if components are there, if they are rendered etc.

i tried this in my Seam test class:

  | 			protected void renderResponse() {
  | 				log.info("examining view root for components");
  | 				List<UIComponent> components = getFacesContext().getViewRoot().getChildren();
  | 				for (UIComponent comp : components) {
  | 					log.info("found component: "+comp.getId());
  | 				}
  | 				log.info("child count: "+getFacesContext().getViewRoot().getChildCount());
  | 			}

but I just get this output:

11:25:50,122  INFO  [TestClass] examining view root for components
  | 11:25:50,122  INFO  [TestClass] child count: 0

am wondering if this sort of thing is possible, or maybe I am getting a bit carried away and it is outside the scope of what integration tests were intended to be used for? :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084965#4084965

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084965

More information about the jboss-user mailing list