There is a properly way to submit a web form using GeckoFX
library?
This is what I'm doing to fill a web form and submit the form, but...well, I'm not submitting, I'm just clicking on the last button of the page and I think that can't be the properly way to do it...
Framework's WebBrowser
control has a method to submit a web form but I can't find any similar method to properly submit a web form on a GeckWebBrowser
.
Dim doc = GeckoWebBrowser1.Document
doc.GetElementById("id_username").
SetAttribute("value", CStr(MyUsername))
doc.GetElementById("id_password").
SetAttribute("value", CStr(MyPassword))
doc.GetElementsByTagName("input").
Last.Click()
The GeckoFormElement has a submit method.
So something like this:
(GetElementByTagName("form").First() as GeckoFormElement).submit()