Mechanize - Click a table row to navigate to detail page

Brian D briandenzer at gmail.com
Sat Dec 26 22:46:05 EST 2009


On Dec 25, 4:36 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> Brian D schrieb:
>
> > A search form returns a list of records embedded in a table.
>
> > The user has to click on a table row to call a Javascript call that
> > opens up the detail page.
>
> > It's the detail page, of course, that really contains the useful
> > information.
>
> > How can I use Mechanize to click a row?
>
> You can't, if there is javascript involved. You can try & use Firebug to
> see what the javascript eventually calls, with which parameters. Then
> construct that url based on the parameters in the table row's javascript
> (which of course you have to parse yourself out of the code)
>
> Diez

Thanks Diez.

You were correct. Fiddler provided the clue I needed. As you
described, the Javascript call constructed a URL containing the index
value of the table row. I was able to request that URL to obtain the
detail page.

Thank you very much for the help.

Brian



More information about the Python-list mailing list