in reply to Re: Login to website (uses JS, I think)
in thread Login to website (uses JS, I think)

I was able to grab Win32-IEAutomation, and it will fill in the form for me. Unfortunately, I can't get it to submit the values! I think I've covered all my bases. Any other ideas, or is it just not gonna do it?

use Win32::IEAutomation; my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1); $ie->gotoURL('http://app001.us1.darkfallonline.com/sf/fwd'); $ie->getTextBox('name:', "username")->SetValue('username'); $ie->getTextBox('name:', "password")->SetValue('password'); my @alllinks = $ie->getAllLinks(); foreach $l (@alllinks) { $l->Click(); } my @allimages = $ie->getAllImages; foreach $i (@allimages) { $i->Click(); } my @alltables = $ie->getAllTables; foreach $t (@alltables) { $t->Click(); }

Replies are listed 'Best First'.
Re^3: Login to website (uses JS, I think)
by paxprobellum (Initiate) on May 19, 2010 at 01:52 UTC
    I think I need to click on a cell in the table (there's only 1), but I can't use any of the methods on my table! For example, "rows" and "tableCells" return a "Can't locate object method..." error. Any ideas what the problem is?
Re^3: Login to website (uses JS, I think)
by Anonymous Monk on May 19, 2010 at 02:16 UTC
    Unfortunately, I can't get it to submit the values!

    What line of your program do you think that should happen?

      Once the values are in, I click every element I can get ahold of (all links, images, and tables) with the Click() function. If one of those was the submit button, it would submit (presumably). Seems I'm missing it, and my guess is that I need to click a cell (not the whole table). Unfortunately, all of the functions to actually get ahold of the cell aren't functioning. /bang_head_on_wall
        I click every element I can get ahold of.If one of those was the submit button,

        Are you serious? Don't do that!

        Also, what do you mean if one was the submit button? Why don't you 1) find out what you actually actually clicked 2) find out what happened after you clicked it. Or, better still, find the right thing to click , and click that instead. You can even forgo clicking , and use the submit() DOM function.