How can I select a value matching my input from a TypeAhead control using WWW::Mechanize?

Posted by kyoob on Stack Overflow See other posts from Stack Overflow or by kyoob
Published on 2012-09-09T15:16:30Z Indexed on 2012/09/09 15:38 UTC
Read the original article Hit count: 277

Filed under:
|

So ordinarily the element I want to pick from a list would be populated on a page and I'd just find it and pick it. But I'm dealing with a control that doesn't populate list elements until some input has been stuck into a text box, after which it gives me a list of recommendations.

For an example of the kind of list I'm talking about think of Facebook's "People, Places, and Things" search field.

I want to plug a string into this text box, select the same string from the list of recommendations, and submit the form. The issue I'm having right now is I can't seem to get Mechanize to even recognize the field is there. I examine a dump of $mech->find_all_inputs and it isn't listed. Is this kind of field just beyond Mechanize's jurisdiction?

© Stack Overflow or respective owner

Related posts about perl

Related posts about www-mechanize