Esempio n. 1
0
        public virtual bool SubmitForm(string url = null, HtmlElement clickedElement = null)
        {
            XElement formElem = this.Element.GetAncestorCI("form");

            if (formElem != null)
            {
                FormElement form = this.OwningBrowser.CreateHtmlElement <FormElement>(formElem);
                return(form.SubmitForm(url, clickedElement));
            }
            return(false);
        }
Esempio n. 2
0
        public virtual bool SubmitForm(string url = null, HtmlElement clickedElement = null)
        {
            XElement formElement = null;

            if (this.Element.HasAttributeCI("form"))
            {
                formElement = this.Element.Document.Descendants().Where(e => e.HasAttributeCI("id") && e.GetAttributeCI("id").Equals(this.Element.GetAttributeCI("form"))).First();
            }
            else
            {
                formElement = this.Element.GetAncestorCI("form");
            }

            if (formElement != null)
            {
                FormElement form = this.OwningBrowser.CreateHtmlElement <FormElement>(formElement);
                return(form.SubmitForm(url, clickedElement));
            }
            return(false);
        }