Hi Prasanth -

>From the Python shell - I just did this:

---- START SNIP ----
[EMAIL PROTECTED] terryp :: python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from twill.commands import *
>>> go("http://sunsolve.sun.com";)
Following HTTP-EQUIV=REFRESH to /show.do?target=home
==> at http://sunsolve.sun.com/show.do?target=tous
'http://sunsolve.sun.com/show.do?target=tous'
>>> showforms()

Form name=search (#1)
## ## __Name__________________ __Type___ __ID________ __Value__________________
1     charset                  hidden    (None)       UTF-8
2     terms                    text      searchfield  Search
3     menu                     select    searchpull
['/search/advsearch.do?collection=al ...
4  1  None                     image     searchbttn    »Â
5     origin                   hidden    (None)       quick
6     wholewords               hidden    (None)       checked


Form name=tou (#2)
## ## __Name__________________ __Type___ __ID________ __Value__________________
1     accept                   hidden    (None)       N
2     touText                  textarea  (None)
SUNSOLVE LICENSE AGREEMENT

PLEA ...
3     Print                    button    (None)       None
4     None                     button    (None)       None
5     None                     button    (None)       None


Form name=survey (#3)
## ## __Name__________________ __Type___ __ID________ __Value__________________
1     Recommend                select    (None)       ['-1'] of ['-1',
'10', '9', '8', '7' ...
2     URL                      hidden    (None)
3  1  None                     submit    (None)       Â SubmitÂ

<generator object at 0x7c51c0>
>>>
---- END SNIP ----

Now looking @ the source of the page the element you want is this, I think:

<form name="tou" method="POST" action="/FRONTDOOR">
<input type="hidden" name="accept" value="N">

I figured you'd be able to say something like: fv(2, "accept", "Y")
and yet when you do that I get this from Twill:

>>> fv(2, "accept", "Y")
form field is read-only or ignorable; nothing done.
>>> fv(2, "accept", 1)
form field is read-only or ignorable; nothing done.
>>>

Titus? Anyone else?

Never had to tinker with hidden form fields.

t.



On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Send twill mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.idyll.org/listinfo/twill
> or, via email, send a message with subject or body 'help' to
>         [EMAIL PROTECTED]
>
> You can reach the person managing the list at
>         [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of twill digest..."
>
>
> Today's Topics:
>
>    1.  calling javascript function in twill (prasanth allada)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 15 Aug 2007 00:40:35 +0530
> From: "prasanth allada" <[EMAIL PROTECTED]>
> Subject: [twill] calling javascript function in twill
> To: [email protected]
> Message-ID:
>         <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> hi
>
> i want to access a site which contains a javascript using twill via python
> whenever i try to access the following site  http://sunsolve.sun.com
> i am redirected to a different page which contains a license agreement.
> this page contains a javascript which has a hidden button whose value is
> changed using the javascript. i hav to click on tat hidden button to proceed
> to my required url.
> unless i click on that button i cannot access the required information.
> does anyone have ne suggestions for this problem
>
> thanks and regards
> prasanth
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.idyll.org/pipermail/twill/attachments/20070815/dec51190/attachment.html
>
> ------------------------------
>
> _______________________________________________
> twill mailing list
> [email protected]
> http://lists.idyll.org/listinfo/twill
>
>
> End of twill Digest, Vol 25, Issue 3
> ************************************
>

_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill

Reply via email to