lynx has the record and playback flags -cmd_log and -cmd_script. For instance, if you're at the gnu.org homepage and press tab 4 times then hit enter, you go to the German version.
You can record this in Lynx with:
$ lynx -cmd_log=/tmp/gnu-log gnu.org
Looking up 'gnu.org' first
$ cat /tmp/gnu-log
# Command logfile created by Lynx 2.8.8pre.4 (04 Feb 2014)
# Arg0 = lynx
# Arg1 = -cmd_log=/tmp/gnu-log
# Arg2 = gnu.org
key Right Arrow
key Right Arrow
key Left Arrow
key <tab>
key <tab>
key <tab>
key <tab>
key ^J
key q
key <space>
In this script I entered q to quit out of lynx. So this this script will perform some action and then return to command line. On the other hand, if you want to be positioned in the lynx then just trim the last two lines from this /tmp/gnu-log file. Then you can invoke the trimmed file with:
$ lynx -cmd_script=/tmp/gnu-log gnu.org
Looking up 'gnu.org' first
... and you will be positioned on the German gnu.org page in lynx.
Finally, for scripting purposes, just include the lynx -cmd_script with the necessary arguments in a bash script.
There is a full discussion at:
http://blog.unixy.net/2009/06/script-to-automate-browsing-actions-using-lynx/
This solution doesn't allow interactive scripting. For instance, you can't programmatically evaluate a part of a webpage and then do branching operations based on the evaluation. However, it can be useful in a range of situations. You do get easy macro record and playback. Also, you can build up sequences of operations (and of course save webpages) and you can set up cron jobs.