Package net.sf.sahi.playback

Examples of net.sf.sahi.playback.ScriptFactory


      String scriptPath = session.getVariable("sahi_scriptPath");
      stop(request);
      setScript(session, scriptPath);
    }
    private void setScript(Session session, String scriptPath){
        SahiScript script = new ScriptFactory().getScript(scriptPath);
        RhinoScriptRunner scriptRunner = new RhinoScriptRunner(script);
    session.setScriptRunner(scriptRunner);
        startPlayback(session, true, "1");
    }
View Full Code Here


    this.execute(session, true, true);
  }
 
  public void execute(Session session, boolean async, boolean setDefaultReporters) throws Exception {
    System.out.println("#### Running Script: " + scriptName);
        scriptRunner = new RhinoScriptRunner(new ScriptFactory().getScript(scriptName), session.getSuite(), this, setDefaultReporters);
    session.setScriptRunner(scriptRunner);
        if (!isSingleSession) {
          launchBrowser();
        }
    if (async) scriptRunner.execute();
View Full Code Here

    }

    public HttpResponse getBrowserScript(final HttpRequest request) {
        HttpResponse httpResponse;
        String scriptPath = request.getParameter("href");
        SahiScript script = new ScriptFactory().getScript(scriptPath);
    if (script != null) {
            httpResponse = new SimpleHttpResponse(LogViewer.highlight(script.getBrowserJSWithLineNumbers(), getLineNumber(request)));
        } else {
            httpResponse = new SimpleHttpResponse(
                    "No Script has been set for playback.");
View Full Code Here

TOP

Related Classes of net.sf.sahi.playback.ScriptFactory

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.