Jump to content

Help finding a form on a complicated website


Recommended Posts

Hi there,

I am fairly new to scripting so maybe this is a more basic question, but I have been able to successfully manipulate many other websites. This one is giving me trouble: https://www.putnam.com/individual/ I would like to have my code enter in a ssn and password and login to this website. Can someone please take a look and tell me how to reach the form, I think its name is "login". Thanks - Jeff

Link to comment
Share on other sites

Hi there,

I am fairly new to scripting so maybe this is a more basic question, but I have been able to successfully manipulate many other websites. This one is giving me trouble: https://www.putnam.com/individual/

Look for framesets -- use a browser like firefox or maxthon that has a more robust "View Source" capability, or install Fiddler for IE. Someone has recommended a DOM Inspector tool (plugin for firefox?) that would likely show you exactly what you need to know.

Or, you can get access to the frame collection object, and enumberate it until it gives up its secrets.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

Look for framesets -- use a browser like firefox or maxthon that has a more robust "View Source" capability, or install Fiddler for IE. Someone has recommended a DOM Inspector tool (plugin for firefox?) that would likely show you exactly what you need to know.

Or, you can get access to the frame collection object, and enumberate it until it gives up its secrets.

Thanks for the advice... I looked at the "view source" in a firefox window as opposed to internet explorer and it looked much different. There is one frame on this website, "EfsPortalFrameset" and I tried to view all of its elements but I couldnt get any... So I am still a little lost. I looked into your Fiddler thing, and don't think that I want to try to understand that, it looks like it's more of a logging tool than anything. Thanks again - Jeff

Link to comment
Share on other sites

Yes, Fiddler is a HTTP/HTTPS monitoring tool. It lets you see the raw HTTP traffic on port 80. It would be a pain in the neck to seperate the code from the request/response headers.

A DOM inspector would probably be optimal for this situation. The IE Developer Toolbar is a toolbar (duh...) for IE (double duh...) that would let you home right in on the section of code you want to pick apart. You can find it here:

http://www.microsoft.com/downloads/details...;displaylang=en

;~ AutoIt rules

Link to comment
Share on other sites

Hi I am having trouble hooking these objects too . This is the code I got so far

#include <IE.au3>
$oIE = _IECreate("https://www.putnam.com/individual/")
$oFrame = _IEFrameGetObjByName ($oIE, "EfsPortalFrameset")
$form = _IEFormGetCollection($oFrame,"login")
$login = _IEFormGetObjByName($form,"logon")
$pass = _IEFormGetObjByName($form,"password")
_IEFormElementSetValue($login,"name")
_IEFormElementSetValue($pass,"pass")

THe Dom of each item is:

document.all.EfsPortalFrameset.all.ACMEBottom.forms.login.logon

document.all.EfsPortalFrameset.all.ACMEBottom.forms.login.password

So logon and password are the textbox's contained in the frameset of EfsPortalFrameset..... but not sure what ACMEBottom is..

Edited by Hasher

Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Link to comment
Share on other sites

Hi I am having trouble hooking these objects too . This is the code I got so far

#include <IE.au3>
$oIE = _IECreate("https://www.putnam.com/individual/")
$oFrame = _IEFrameGetObjByName ($oIE, "EfsPortalFrameset")
$form = _IEFormGetCollection($oFrame,"login")
$login = _IEFormGetObjByName($form,"logon")
$pass = _IEFormGetObjByName($form,"password")
_IEFormElementSetValue($login,"name")
_IEFormElementSetValue($pass,"pass")

THe Dom of each item is:

document.all.EfsPortalFrameset.all.ACMEBottom.forms.login.logon

document.all.EfsPortalFrameset.all.ACMEBottom.forms.login.password

So logon and password are the textbox's contained in the frameset of EfsPortalFrameset..... but not sure what ACMEBottom is..

Hi,

Thanks everyone for your replies, we are definitely getting closer, still have yet to get the code exactly right to put something in those fields... I have tried similar code to what you have above, and I am almost positive that the:

$oFrame = _IEFrameGetObjByName ($oIE, "EfsPortalFrameset")

line of code executes properly, but I don't think you can skip down and set the form in your next statement because in between there's that "ACMEBottom" frame... I tried other lines of code like:

$oFram = _IEFrameGetObjByName ($oFrame, "ACMEBottom")

and got errors... Any more help would be greatly appreciated

P.S. That DOM toolbar thing for IE is really helpful, thanks!

Link to comment
Share on other sites

  • 4 weeks later...

This may not be the best way but it worked for me

#include <IE.au3>
 Global $oIE
Global $AFrames
Global $CountFrames
Global $AFrame
Global $BFrames
Global $BFrame

 $oIE = _IECreate("https://www.putnam.com/individual/")
$AFrames = _IEFrameGetCollection ($oIE)
$CountFrames = @extended
MsgBox(0, "FramesA " & $CountFrames, "see above")
For $i = 0 to ($CountFrames - 1)
 $AFrame = _IEFrameGetCollection ($oIE, $i) 
 MsgBox(0, "Frame Info for Frame " & $i, _IEPropertyGet ( $AFrame, "locationurl"))
Next
 
$BFrames = _IEFrameGetCollection ($AFrame)
$CountFrames = @extended
MsgBox(0, "FramesB " & $CountFrames, "see above")
For $i = 0 to ($CountFrames - 1)
 $BFrame = _IEFrameGetCollection ($AFrame, $i)  
 MsgBox(0, "Frame Info for Frame " & $i, _IEPropertyGet ( $BFrame, "locationurl"))
Next
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$MainFrame = _IEFrameGetCollection ($oIE, 0)
$UpperFrame = _IEFrameGetCollection ($AFrame, 0)    
$LowerFrame = _IEFrameGetCollection ($AFrame, 1)    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$oTable = _IETableGetCollection ($LowerFrame)
$iNumTables = @extended
MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")
$oForm = _IEFormGetObjByName ($LowerFrame, "login")
$Uid = "111111"
$oQuery = _IEFormElementGetObjByName ($oForm, "logon")
_IEFormElementSetValue ($oQuery, $Uid)
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...