Package org.jboss.arquillian.ajocado.framework

Examples of org.jboss.arquillian.ajocado.framework.AjaxSelenium


    private RequestTypeGuardFactory() {
    }

    private static AjaxSelenium guard(AjaxSelenium selenium, RequestType requestExpected, boolean interlayed) {
        AjaxSelenium copy;
        try {
            copy = selenium.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(e);
        }
        copy.getInterceptionProxy().unregisterInterceptorType(RequestTypeGuard.class);
        copy.getInterceptionProxy().registerInterceptor(new RequestTypeGuard(requestExpected, interlayed));
        return copy;
    }
View Full Code Here


    * org.jboss.arquillian.selenium.spi.Instantiator#createInstance(java.lang
    * .Object)
    */
   public AjaxSelenium createInstance(ArquillianAjocadoConfiguration configuration)
   {
      AjaxSelenium selenium = new AjaxSeleniumImpl(configuration.getSeleniumHost(), configuration.getSeleniumPort(), configuration.getBrowser(), configuration.getContextRoot());
      AjaxSeleniumContext.set(selenium);

      selenium.enableNetworkTrafficCapturing(configuration.isSeleniumNetworkTrafficEnabled());
      selenium.start();

      loadCustomLocationStrategies(selenium);
      initializeExtensions(selenium);

      selenium.setSpeed(configuration.getSeleniumSpeed());

      if (configuration.isSeleniumMaximize())
      {
         selenium.windowFocus();
         selenium.windowMaximize();
      }

      return selenium;
   }
View Full Code Here

    public static AjaxSelenium guard(AjaxSelenium selenium, RequestType requestExpected) {
        if (requestExpected == null) {
            return selenium;
        }

        AjaxSelenium copy = selenium.clone();
        copy.getCommandInterceptionProxy().unregisterInterceptorType(RequestGuardInterceptor.class);
        copy.getCommandInterceptionProxy().registerInterceptor(new RequestGuardInterceptor(requestExpected, false));
        return copy;
    }
View Full Code Here

     * @param requestExpected
     *            the request type to be guarded
     * @return the selenium guarded to use XMLHttpRequest
     */
    public static AjaxSelenium guardInterlayed(AjaxSelenium selenium, RequestType requestExpected) {
        AjaxSelenium copy = selenium.clone();
        copy.getCommandInterceptionProxy().unregisterInterceptorType(RequestGuardInterceptor.class);
        copy.getCommandInterceptionProxy().registerInterceptor(new RequestGuardInterceptor(requestExpected, true));
        return copy;
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.ajocado.framework.AjaxSelenium

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.