Ввод логина и пароля - C#
Формулировка задачи:
private void button5_Click(object sender, EventArgs e)
{
for (int i = 1; i < webBrowser1.Document.Links.Count; i++)
{
if (webBrowser1.Document.Links[i].InnerText == "Вход")
{
webBrowser1.Document.Links[i].InvokeMember("click");
break;
}
}
}<input type="text" class="post" name="username" size="25" maxlength="40" value=""/>
пароль -<input type="password" class="post" name="password" size="25" maxlength="32"/>
Решение задачи: «Ввод логина и пароля»
textual
Листинг программы
if (webBrowser1.Document != null)
foreach (HtmlElement pageElement in webBrowser1.Document.All)
if (pageElement.Name == "username")
pageElement.SetAttribute("value", "Имя пользователя");