Main Area and Open Discussion > General Software Discussion
How to easily program/play a "web navigation session"
cettolox:
Hi,
every day I need to go to a specific site, send my credential, navigate 2 or 3 pages, make some decisions, submitting some forms and then get some results.
I was thinking to automate all the session with a kind of program to "play" a web session and get results, like this:
get_this_page_to_variable a="http://myurl.com", username=stefano, password=stefano
if a contains "to authorize" then
get_this_page_to_variable b="http://myurl.com/auth_page", var1=val1, var2=val2
endif
get...
post...
I saw that AutoHotKey has the url_download_to_file but it is not enough. I tried java or c# but I did not want a complex programming language or interface.
Does anyone know if there is a tool/scripting language/anything to automate web sessions (maybe keeping track of cookies?)
Bye,
/Stefano
Carol Haynes:
Not sure but you may be able to do something like this in website watcher.
Otherwise how about a macro scripting language?
cettolox:
A macro scripting language is what I am searching for... but I don't know which is the one to use...
I just came across wget and curl, and I am studying them (trying at first to understand the difference...)
/Stefano
app103:
According to this page, it can be done with a VBScript...but chances are it would have to be written specifically for your situation.
http://www.mjtnet.com/webrecorder.htm
cettolox:
OK I'll show how I did it: I used wget within a batch file like this:
@echo off
wget --keep-session-cookies --save-cookies cuc --post-data "username=xxxxxxx&Password=yyyyyyy&URL=&B1=Login" http://mysite/formLogin/frmLogin.asp
wget --load-cookies cuc --post-data "D3=01&nome=2006&Area2=12&nome2=2006&D11=TUTTI&b1=OK" "http://mysite/post.asp"
and then I parsed the resulting page (which has the information I need) to get my result.
/Stefano
Navigation
[0] Message Index
[#] Next page
Go to full version