Question

I am new to web browser control geckoFx. I want to login to a webpage using it. So how can i do it in vb.net

I tried navigating to the webpage using navigate method.

InitializeComponent()
Xpcom.Initialize("D:\xulrunner")
myBrowser = New GeckoWebBrowser()
myBrowser.Parent = Me
myBrowser.Dock = DockStyle.Fill
myBrowser.Navigate("www.google.com")

But how can i login to website? I tried searching for few examples of using gecko.But i didn't get. So where i can get examples related to using gecko?

Was it helpful?

Solution

There are a number of different ways to do this. After you have navigate to the page and it has finished loading:

  1. execute some javascript to fill in the fields and click the submit button.

C# javascript execute examples

  1. use C# (or vb.net) to get the required DOM fields, modify them with the required values, then get the DOM submit button and call the click api.

Examples of GetElementById

GeckoInputElement class that has a click method

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top