I am working with RoboBrowser on Python and I am trying to fill up a form on a website (here). Now the thing is that the form is dynamic. If you open up the link, you'll see a row for 'Country', 'State/District', 'City' and 'Location'.
The State/District row depends on which Country you select out of the drop down menu, City depends on State/District and Location depends on City. I want to be able to extract for example 'values' of State/District for a particular value of the country. For example when I write the following code:
>>> import re
>>> from robobrowser import RoboBrowser
>>> browser = RoboBrowser()
>>> browser.open('http://http://www.kidzee.com/admissions-at-kidzee/')
>>> form = browser.get_form()
>>> form
<RoboForm siteid=, adunit=, fname=, lname=, email=, mobile=,country=,state=,
city=, location=0, 6_letters_code=, admission_submit=Submit>
>>> form['country'].options
['','1','2'] #The options presented are India and Nepal.
>>>form['country'].value = '1'
>>>form['state'].options
['']
Now what I want to do it get all the possible values for form['state'].value
with form['country'].value = '1'
(because the list of states depends on the value of country). How do I go about doing that?
Thanks for reading my question.