WebBrowser I can not play my text in the text box

0

I have a system running on a client and now it has asked me for a feature that I'm breaking head and can not do.

He needs the application to post on his facebook groups at certain times some publications of the academy, I managed to do this however using the url of the mobile version of facebook.

Using the standard version I can not find the element on the page to do the publication, as in the mobile version I can not get the image that is generated on the mural did not serve the client.

For posting to the M.FACEBOOK.COM url I'm using the following code.

HtmlElementCollection elements = browser.Document.GetElementsByTagName("input");
foreach (HtmlElement currentElement in elements)
{

    if ((currentElement.GetAttribute("type") == "submit") && (currentElement.Name == "view_post"))
    {
        string postagem = txtPublicacao1.Text;
        HtmlElement elea = browser.Document.GetElementById("u_0_0");
        if (elea != null) elea.SetAttribute("value", TextoPublicacao);
        {

            await Task.Delay(1000);
            currentElement.InvokeMember("click");
            txtStatus.Invoke((MethodInvoker)(() => txtStatus.Text += "*HORA Postado: " + DateTime.Now.ToString("G") + " ID -> " + qtdpostGrupo.ToString() + " LINK ->  " + e.Url.ToString() + "\r\n"));

        }
    }
}
    
asked by anonymous 21.06.2016 / 00:57

0 answers