Package org.jboss.jsfunit.framework

Examples of org.jboss.jsfunit.framework.WebClientSpec


    *
    * @throws IOException If there is an error calling the JSF app
    */
   public JSFSession(String initialPage) throws IOException
   {
      this(new WebClientSpec(initialPage));
   }
View Full Code Here


      return makeSession(initialPage, BrowserVersion.getDefault());
   }
  
   public static JSFSession makeSession(String initialPage, BrowserVersion browserVersion) throws IOException
   {
      return makeSession(new WebClientSpec(initialPage, browserVersion));
   }
View Full Code Here

   */
  public void setUp() throws IOException {
    isJBoss4 = Package.getPackage("org.jboss.system.server").getImplementationVersion().startsWith("4");

    // Initial JSF request
    WebClientSpec wcSpec = new WebClientSpec("/", BrowserVersion.FIREFOX_3);

    // This is temporary because embedded Jopr can't find /js/rhq.js
    wcSpec.getWebClient().setThrowExceptionOnFailingStatusCode(false);

    // Always press OK for confirm dialogs
    wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));

    wcSpec.setInitialRequestStrategy(new JoprLoginStrategy()); // logs in

    JSFSession jsfSession = new JSFSession(wcSpec);
    this.client = jsfSession.getJSFClientSession();
    this.server = jsfSession.getJSFServerSession();
  }
View Full Code Here

    /** Creates new JSF session, using JoprLoginStrategy. */
    public SessionInstance(String user, String pass) throws IOException {

      // Code taken from EmbJoprTestCase.java.
      // Initial JSF request
      WebClientSpec wcSpec = new WebClientSpec("/", BrowserVersion.FIREFOX_3);
      wcSpec.getWebClient().setThrowExceptionOnFailingStatusCode(false);
      wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));
      wcSpec.setInitialRequestStrategy(new JoprLoginStrategy(user, pass)); // logs in
      this.jsfSession = new JSFSession(wcSpec);
      this.client_ = jsfSession.getJSFClientSession();
      this.server_ = jsfSession.getJSFServerSession();
    }
View Full Code Here


       
       
        // Initial JSF request
        WebClientSpec wcSpec = new WebClientSpec("/", browserVersion);


        // This is temporary because embedded Jopr can't find /js/rhq.js
        wcSpec.getWebClient().setThrowExceptionOnFailingStatusCode(true);

        // Always press OK for confirm dialogs
        wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));

        wcSpec.setInitialRequestStrategy(new JoprLoginStrategy( this.getLoginUser(), this.getLoginPass())); // logs in

        this.webClient = wcSpec.getWebClient();
       
        JSFSession jsfSession = new JSFSession(wcSpec);
        this.client = jsfSession.getJSFClientSession();
        this.server = jsfSession.getJSFServerSession();
View Full Code Here

TOP

Related Classes of org.jboss.jsfunit.framework.WebClientSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.