Package net.sf.sahi.rhino

Examples of net.sf.sahi.rhino.ScriptRunner


        session.setIsReadyForDriver(false); // will be toggled in Driver_initialized
        return proxyAutoResponse(startUrl, session.id());
    }

    public void setRetries(final HttpRequest request) {
      ScriptRunner scriptRunner = request.session().getScriptRunner();
      if (scriptRunner != null)
      scriptRunner.setBrowserRetries(Integer.parseInt(request.getParameter("retries")));
    }
View Full Code Here


      if (scriptRunner != null)
      scriptRunner.setBrowserRetries(Integer.parseInt(request.getParameter("retries")));
    }

    public HttpResponse getRetries(final HttpRequest request) {
      ScriptRunner scriptRunner = request.session().getScriptRunner();
      return new SimpleHttpResponse(scriptRunner != null ? "" + scriptRunner.getBrowserRetries() : "-1");
    }
View Full Code Here

      ScriptRunner scriptRunner = request.session().getScriptRunner();
      return new SimpleHttpResponse(scriptRunner != null ? "" + scriptRunner.getBrowserRetries() : "-1");
    }

    public HttpResponse hasErrors(final HttpRequest request) {
      ScriptRunner scriptRunner = request.session().getScriptRunner();
      return new SimpleHttpResponse("" + scriptRunner.hasErrors());
    }
View Full Code Here

        if (Utils.isBlankOrNull(waitTime)) {
            waitTime = "-1";
        }
        props.setProperty("waitConditionTime", "" + waitTime);
        props.setProperty("stabilityIndex", "" + Configuration.getStabilityIndex());
        ScriptRunner scriptRunner = session.getScriptRunner();
        if (scriptRunner != null && scriptRunner.getScript() != null){
      props.setProperty("scriptPath", Utils.escapeDoubleQuotesAndBackSlashes(Utils.escapeDoubleQuotesAndBackSlashes(scriptRunner.getScript().getFilePath())));
          props.setProperty("scriptName", scriptRunner.getScriptName());
        }else{
      props.setProperty("scriptPath", "");
          props.setProperty("scriptName", "");
        }
View Full Code Here

          && status != Status.INITIAL
          && now - lastActiveTime > inactivityLimit) {
        String message = "*** Forcefully terminating script. \nNo response from browser within expected time ("
            + inactivityLimit / 1000 + " seconds).";
        System.out.println(message);
        ScriptRunner scriptRunner = session.getScriptRunner();
        scriptRunner.setStatus(Status.FAILURE);
        Report report = scriptRunner.getReport();
        if (report != null) {
          report.addResult(message, "ERROR", "", "");
        }
      }
    }
View Full Code Here

TOP

Related Classes of net.sf.sahi.rhino.ScriptRunner

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.