How can I select a value matching my input from a TypeAhead control using WWW::Mechanize?
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?
But you can find (with Firefox's HTTPFox extension for example) what request your browser sends to the target site than you get "recommendations" and make the same request (I'm sure this is POST) from your WWW::Mechanize object.