Scenario:
I have been able to click the button using c# and a webbrowser, but now I want to add text inside a text field after the pop up has opened.
Imagine the Events Tab on Facebook.
When you make an event it pops up a little box where you can enter text (AJAX).
I am trying to get the text from my text boxes into those text fields, after it has popped up and fully loaded.
I have tried using the async and await keywords with no luck, I have tried scanning the page but the pop up happens using AJAX so I can't rescan the page(I don't think) to grab the right div id to enter text in?
Any idea's?
Thanks
Here is my code so far:
private void web_postFB(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
if (btnClicked == false)
{
var links = web.Document.GetElementsByTagName("a");
foreach (HtmlElement link in links)
{
if (link.GetAttribute("className") == "mrs mlm _42ft _4jy0 _4jy3 _517h")
{
link.InvokeMember("click");
}
if (web.Document.GetElementById("u_f4_3") != null)
{
Here is where I want it to wait for the pop up to be fully opened. Then do the method below to insert the text into the text fields.
inputText();
}
}
}
}