I’m using mechanize to fill form on a website and now I run into a problem with dynamically-filled drop-down lists that are dependent on a previous selection.I have four drop-downs in a form which are dynamically populated and then user can submit the form.
Drop-down are :
Continent
-- Country #depends on continent
-- state #depends on Country
--city #depends on state
How can I select values from these drop-downs using python?
If values are dynamically filled, you can’t do that since mechanize won’t take care of runnig the javascript code as it will happen when displaying the page in a web browser.
You have some alternatives: