Automatizar Formulario de envío
-
21-08-2019 - |
Pregunta
Cómo automatizar la presentación del formulario HTML, con valores de texto al azar usando VBScript?
Solución
Puede utilizar el "Microsoft.XMLHTTP" para automatizar el envío de formularios. Vea a continuación:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Notice the two changes in the next two lines:
xml.Open "POST", "http://www.imdb.com/Find", False
xml.Send "select=All&for=The Usual Suspects"
wscript.echo xml.responseText
O echar un vistazo a estos grandes mensajes:
http://www.4guysfromrolla.com/webtech/110100-1.2.shtml
Otros consejos
Es posible que desee utilizar selenio ( http://seleniumhq.org/ ) o Waitr ( http://wtr.rubyforge.org/ ), ya que le permitirá un mejor control y están construidos para hacer lo que busca para.
<html>
<form action='http://127.0.0.1/file.php' method='POST' id=1>
<input type=hidden name="var" value="val">
<input type=submit>
</form>
</html>
<script>
document.getElementById(1).submit();
</script>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow