No subject


Sun Aug 5 16:03:59 PDT 2007


---- START SNIP ----
[terryp at Macintosh] 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=3DREFRESH to /show.do?target=3Dhome
=3D=3D> at http://sunsolve.sun.com/show.do?target=3Dtous
'http://sunsolve.sun.com/show.do?target=3Dtous'
>>> showforms()

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


Form name=3Dtou (#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=3Dsurvey (#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)       =C2 Submit=C2

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

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

<form name=3D"tou" method=3D"POST" action=3D"/FRONTDOOR">
<input type=3D"hidden" name=3D"accept" value=3D"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, twill-request at lists.idyll.org <twill-request at lists.idyll.org> w=
rote:
> Send twill mailing list submissions to
>         twill at lists.idyll.org
>
> 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
>         twill-request at lists.idyll.org
>
> You can reach the person managing the list at
>         twill-owner at lists.idyll.org
>
> 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" <prasanth.allada at gmail.com>
> Subject: [twill] calling javascript function in twill
> To: twill at lists.idyll.org
> Message-ID:
>         <a07dd2c70708141210u470fb652s2c25757399801dc9 at mail.gmail.com>
> Content-Type: text/plain; charset=3D"iso-8859-1"
>
> hi
>
> i want to access a site which contains a javascript using twill via pytho=
n
> 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 proc=
eed
> 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
> twill at lists.idyll.org
> http://lists.idyll.org/listinfo/twill
>
>
> End of twill Digest, Vol 25, Issue 3
> ************************************
>



More information about the twill mailing list