I am currently using a WebBrowser function in a c# application to automate a login and get information. The problem is when I set a textbox's value by ID, it does not work, it remains as it was (I checked by getting the console to write its value). Here is my code
br.Document.GetElementById("username").SetAttribute("Value", username);
br.Document.GetElementById("password").SetAttribute("Value", password);
br.Document.GetElementById("LoginBtn").InvokeMember("click");
//authcode
Thread.Sleep(5000);
Console.WriteLine(br.Document.GetElementById("username").InnerText) // This does not retrieve the data.
Any and all help is appreciated.