Page 1 of 1 1
Topic Options
#178141 - 2007-07-21 09:26 PM Problems facing with IE Navigate
green78 Offline
Fresh Scripter

Registered: 2007-05-02
Posts: 34
Hi folks,

I'm trying to automate login at this page:

https://online.bulbank.bg/page/default.aspx?xml_id=/bg-BG/.login

My code goes the following way:

 Code:
Break On

$URL = "https://online.bulbank.bg/page/default.aspx?xml_id=/bg-BG/.login"

$IE = CreateObject("InternetExplorer.Application")

$IE.Visible = 1

$IE.Navigate($URL)

While $IE.Busy and $IE.ReadyState <> 4 and @ERROR = 0 Loop

$IE.Document.getElementById("userName").Value = "myusernamehere"
$IE.Document.getElementById("pwd").Value = "mypasswordhere"


So far so good... but there is such option in the HTML that checks if button is pressed:
 Code:
<script>
varLoginOnSubmit = document.forms[0].onsubmit;
 
 document.forms[0].onsubmit = function ()
 {
   if(pressed==0)
   {
   alert(STR_EMPTY_LOGIN)
   return false;
   }
    
     if (null != varLoginOnSubmit) return varLoginOnSubmit();
      return true;
 }
</script>


How can I set this pressed == 0 to be pressed == 1 ?

And also if you can tell me which is the button I have to click in order to login ...... I couldn't find it in the page's source, I'm ashamed.

Many thanks in advance !

Top
#178142 - 2007-07-21 10:36 PM Re: Problems facing with IE Navigate [Re: green78]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I find it extremely dangerous to attempt to automate the login into what appears to be an online banking system.
_________________________
There are two types of vessels, submarines and targets.

Top
#178143 - 2007-07-21 10:55 PM Re: Problems facing with IE Navigate [Re: Sealeopard]
green78 Offline
Fresh Scripter

Registered: 2007-05-02
Posts: 34
 Originally Posted By: Sealeopard
I find it extremely dangerous to attempt to automate the login into what appears to be an online banking system.


True,

But this site is accessed via certificate. Without certificate you cannot do anything - only generate reports which is the target of this script.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1539 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.134 seconds in which 0.107 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org