Pergunta

Como automatizar a apresentação de formulário HTML, com valores de texto aleatórios usando vbscript?

Foi útil?

Solução

Você pode usar o "Microsoft.XMLHTTP" para automatizar a forma de submissão. Por favor, veja abaixo:

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

Ou dar uma olhada nestes grandes mensagens:

http://www.4guysfromrolla.com/webtech/110100-1.2.shtml

http://www.4guysfromrolla.com/webtech/110100-1.shtml

http://support.microsoft.com/kb/290591

Outras dicas

Você pode querer usar Selenium ( http://seleniumhq.org/ ) ou Waitr ( http://wtr.rubyforge.org/ ), como eles lhe permitirá melhor controle e são construídos para fazer o que você está procurando 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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top