Jump to content

How to login? Can´t submit, can´t "push" Button!


Recommended Posts

Hello,

I´m trying to log in into Gondal World automatically, but I can´t push the Login-Button!

Name and Pass were set correctly, but not the submit func.

How do I click on the submit button?

This is what I have already:

#include <IE.au3>

Local $oUser, $oPass, $oSubmit
Local $sUser = "xxx"
Local $sPass = "xxxxx"
Local $url = "http://gondalworld.com/signups/login"
Local $oIE = _IECreate($url, 1)

_IELoadWait($oIE)

$oInputs = _IETagNameGetCollection($oIE, "input")
for $oInput in $oInputs
    if $oInput.type = "text" And $oInput.name = "data[Signup][mail]" Then $oUser = $oInput
    if $oInput.type = "password" And $oInput.name = "data[Signup][pass]" Then $oPass = $oInput
    if isObj($oUser) And isObj($oPass) then exitloop
Next

$oUser.value = $sUser
$oPass.value = $sPass

_IEAction($oSubmit, "click")

_IELoadWait($oIE)

In HTML Source it´s the following line wich needs to be processed:

<a tabIndex="3" class="button_login" onclick="$('#loginform').submit();return false;"/>

Does anyone have a clou for me, or a nice workaround?

Thanx!

Link to comment
Share on other sites

I should NOT respond to this because its a game connected thread buuuuuuut :)

A way to goaround this one can be just to check what exacly data is send to the serwer (WpePro will help here, check youtube for tutorial for it) and send it with TCP commands. But you have to remember to also check, receive and send cookies, session id and decode the response, but there is a UDF for that on autoit forum. Thats my idea for it. Good luck.

p.s-as I see in the source code the for is sending the data to "http://gondalworld.com/signups/login"

my result from WpePro

POST /signups/login HTTP/1.1..Host: gondalworld.com..User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0..Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8..Accept-Language: pl,en-us;q=0.7,en;q=0.3..Accept-Encoding: gzip, deflate..Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7..Keep-Alive: 115..Connection: keep-alive..Referer: http://gondalworld.com/signups/login..Cookie: session=0e1712647016c69a9a286a3ad6f0836d; __utma=132601880.768482227.1301956819.1301956819.1301956819.1; __utmb=132601880.6.10.1301956819; __utmc=132601880; __utmz=132601880.1301956819.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)..Content-Type: application/x-www-form-urlencoded..Content-Length: 84....data%5BSignup%5D%5Bmail%5D=email%40poczta.pl&data%5BSignup%5D%5Bpass%5D=haslo
Link to comment
Share on other sites

Check out _IELinkClickByIndex

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...