public void Visit(bool showPh, int timeOut, string url, Action action) { if (url.ToUpper().StartsWith("HTTPS:")) throw new Exception("Request to Https protocol is not working yet."); using (_ph = new PhantomjsWrapper()) { _ph.Run(timeOut, showPh, "--web-security=no", 1234, url, action); } }
public HttpServer(Action action, string url, PhantomjsWrapper wrapper) { _listener = new HttpListener(); Scripts = new ScriptSet(); _commands = new PhEventSet { new OnLoadPhEvent(action, wrapper), new MainHtmlPhEvent(), new JQueryPhEvent(), new ScriptPhEvent(Scripts), new CallbackPhEvent(Scripts) }; }