vb.netfacebookgeckogeckofx

Gecko could not fill facebook post text area by Setattribute


I am dealing with a weird situation when I could not fill the facebook post area with text by using:

GeckoWebBrowser1.Document.GetElementsById("xc_message").SetAttribute("value", "hello world")

Meanwhile this works fine with VB.NET default Webbrowser and the below code works fine for facebook Login:

GeckoWebBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
GeckoWebBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox2.Text)
GeckoWebBrowser1.Navigate("javascript:void(document.forms[0].submit())")

I thought it should be similar however an error occurs when compiling:

Compiling error image

This is how it looks like, however I can not set a status message still.

Element inspection Image


Solution

  • After a while sorting out by googling. This is what works out:

    Dim MyFBstatus As New GeckoTextAreaElement(GeckoWebBrowser1.Document.GetElementsByTagName("TEXTAREA")(0).DomObject) MyFBstatus.Value = "TESTING"