Exemple #1
0
        private string SendRequest(HttpStatusCode?expectedStatusCode, string method, string url, Action <HttpWebRequest> writeRequest)
        {
            _currentPage = null;
            UpdateCurrentUrl(url);
            var request = CreateRequest(method);

            writeRequest(request);
            return(SendRequest(expectedStatusCode, request));
        }
Exemple #2
0
        public void Submit(string formId)
        {
            var form = GetForm(formId);

            _currentPage = new HtmlPage(SendRequest(HttpStatusCode.OK, form.Method, form.Action, r => WriteRequest(r, form.FormVariables, form.FileVariables)));
        }