Hi Jamal,<div><br></div><div>I was able to reproduce your example without a TwillAssertionError, using twill version 0.9. I'm not sure what the problem is. Which version of Twill are you using?</div><div><br></div><div>
Jesse<br><br><div class="gmail_quote">On Fri, Feb 5, 2010 at 11:09 AM, Jamal Mazrui <span dir="ltr"><<a href="mailto:Jamal.Mazrui@fcc.gov">Jamal.Mazrui@fcc.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm trying to automate a Wikipedia search using Google to find the best<br>
matching article. I have things working in an interactive session with<br>
the twill shell, but for some reason, the code is not finding the Google<br>
search form -- I get the error "twill.errors.TwillAssertionError: no<br>
matching forms!"<br>
<br>
Here is the relevant code:<br>
<br>
sQuery = 'Python'<br>
sAddress = '<a href="http://google.com" target="_blank">http://google.com</a>'<br>
oBrowser = twill.get_browser()<br>
oBrowser.go(sAddress)<br>
twill.commands.formvalue(1, 'q', 'site:<a href="http://wikipedia.org" target="_blank">wikipedia.org</a> ' + sQuery<br>
twill.commands.submit()<br>
twill.commands.follow('<a href="http://en.wikipedia.org" target="_blank">en.wikipedia.org</a>')<br>
<br>
<br>
Jamal<br>
<br>
<br>
_______________________________________________<br>
twill mailing list<br>
<a href="mailto:twill@lists.idyll.org">twill@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/twill" target="_blank">http://lists.idyll.org/listinfo/twill</a><br>
</blockquote></div><br></div>