/// <summary> /// Called when a OnSubmit event is raised. /// </summary> /// <param name="sender"> The sender object.</param> /// <param name="e"> The FormConvertionEventArgs.</param> private void navForm_FormConvertionEvent(object sender, FormConvertionArgs e) { FormConverter converter = new FormConverter(); HtmlFormTag form = converter.ConvertToHtmlFormTag(e.FormElement, e.SiteUri); form = converter.AddPostDataValues(form, e.PostData); // Just post RequestPostEventArgs postArgs = new RequestPostEventArgs(); postArgs.InspectorRequestAction = InspectorAction.WebBrowserPost; postArgs.Form = form; postArgs.Method = form.Method; postArgs.PostData = Encoding.UTF8.GetBytes(e.PostData); postArgs.CurrentUri = e.SiteUri; this.InspectorStartPostEvent(this, postArgs); // Add Quick Test options //this.RunQuickTests(postArgs); }
/// <summary> /// Occurs when post data is called by javascript. /// </summary> /// <param name="form"></param> /// <param name="htmlDoc"></param> /// <param name="postData"></param> private void OnPost(HTMLFormElementClass form, IHTMLDocument2 htmlDoc, byte[] postData) { FormConvertionArgs args = new FormConvertionArgs(); args.FormElement = form; args.SiteUri = new Uri(this.web.LocationURL); args.PostData = System.Text.Encoding.UTF8.GetString((byte[])postData); // MessageBox.Show(args.PostData); FormConvertionEvent(this, args); }