Auto login website in GeckoFX [C#]

1.7k views Asked by At

I want some code source to login automatically in website

example:

WebBrowser1.Document.GetElementById("username").SetAttribute("Value", textBox2.Text);
WebBrowser1.Document.GetElementById("password").SetAttribute("Value", textBox3.Text);
WebBrowser1.Document.GetElementById("login").Invokemember("Click");

I want To Gecko

1

There are 1 answers

0
user3301187 On
        GeckoInputElement Username = new GeckoInputElement(geckoWebBrowser1.Document.GetElementsByName("username")[0].DomObject);
        Username.Value = textBox2.Text;
        GeckoInputElement Password = new GeckoInputElement(geckoWebBrowser1.Document.GetElementsByName("password")[0].DomObject);
        Password.Value = textBox3.Text;
        GeckoInputElement login = new GeckoInputElement(geckoWebBrowser1.Document.GetElementsByName("login")[0].DomObject);
        login.Click();