Este es el código html (resumido):
Código:
<form method="post" action="login.phtml" name="login" style="display:inline"><div style="float:left;">
<div style="float:left;">
<div style="float:left;line-height:8px;"><div class="icon mi mi_manager" style="float:left;"></div><p style="float:left;margin:0;padding:0;line-height:8px;padding-top:1px;">Usuario: </p><br /></div>
<div style="float:left;">
<input type="text" name="login" size="10" maxlength="10" class="userlogin" tabindex="1" style="margin-left:5px;margin-top:4px;" />
</div>
</div>
<div style="float:left;">
<div style="float:left;line-height:8px;"><div class="icon i_lock" style="float:left; margin-left:5px; margin-right:4px;"></div><p style="float:left;margin:0;padding:0;line-height:10px;padding-top:1px;">Contraseña: </p><br /></div>
<div style="float:left;">
<input type="password" name="pass" size="10" maxlength="8" style="width:80px;margin-left:5px;margin-top:4px;" tabindex="2" onkeypress="checkEnter(event, 'login')" class="userlogin" />
</div>
</div><input type="hidden" name="action" value="login" />
Y este es mi código en VB6:
Código:
Private Sub Form_Load()
WebBrowser1.Navigate "http://miweb.com/login"
End Sub
Private Sub Command1_Click()
WebBrowser1.Document.All("login").Value = "pepito" 'aquí falla
WebBrowser1.Document.All("pass").Value = "12345" 'funciona ok
WebBrowser1.Document.parentWindow.execScript "submitForm('login','Login')", "javascript" 'funciona ok
End Sub