topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 1:14 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to easily program/play a "web navigation session"  (Read 7460 times)

cettolox

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
How to easily program/play a "web navigation session"
« on: June 06, 2006, 05:52 AM »
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

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #1 on: June 06, 2006, 06:39 AM »
Not sure but you may be able to do something like this in website watcher.

Otherwise how about a macro scripting language?

cettolox

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #2 on: June 06, 2006, 06:45 AM »
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

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #3 on: June 06, 2006, 06:52 AM »
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

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #4 on: June 08, 2006, 06:49 AM »
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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #5 on: June 08, 2006, 06:56 AM »
ah yes, i should have thought of wget!  but i had no idea it was so powerful..
thanks for letting us know how you did it.

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 632
    • View Profile
    • Donate to Member
Re: How to easily program/play a "web navigation session"
« Reply #6 on: June 08, 2006, 08:37 AM »
wget is very cool.  I use a similar technique to check my router for my current IP address.  If it has changed, I launch an update script that updates all of my DDNS records. 

wget is  :Thmbsup:
Insert Brilliant Sig line here