I have a simple program that i can open a webpage and i paste the user name and password from textbox1
then do something inside, after that a want to re-login with another account
i can do it for tow or three accounts put i want to deal with an open number of usernames
i want to take usernames from a Multiline textbox
the code to paste only the first line and the pass word and click ok is:
TextReader read = new StringReader(textBox2.Text);
int rows = 500;
string[] text1 = new string[rows];
for (int r = 1; r < rows; r++)
{
text1[r] = read.ReadLine();
// textBox3.Text = text1[r];
HtmlElement ele = webBrowser1.Document.GetElementById("name"); if (ele != null)
ele.InnerText = text1[r];
ele = webBrowser1.Document.GetElementById("password"); if (ele != null)
ele.InnerText = text1[r] + "5";
ele = webBrowser1.Document.GetElementById("s1"); if (ele != null)
ele.InvokeMember("click");
text1[r] means that it will take the just the first line
now the program is inside then logout with this code
webbrowser1.navigate("http://example.com/logout.php");
then i want to re login and do the same put with the second line (another account) then the third etc. How can i do it?