I’m trying to make a register program :
For example:
Button1 click event:
WebBrowser wb = new WebBrowser();
wb.Navigate("register site");
wb.Document.GetElementById("passwort").SetAttribute("value", textBox1.Text);
wb.Document.GetElementById("register").InvokeMember("click");
Here is the register page html code ( From view source ) :
<td><h5>Password:<br><input type="password" name="passwort"></td>
<td> <input type="submit" name="register" value="Registri"></td>
Is there any chance to get the element by his name?because it has no ID .
You can’t access the elements directly by name, but you could access it by finding the input tags first, and indexing into the result to find the tags by name.
wb.Document.GetElementsByTagName("input")["passwort"]