This is a follow up to this question - Want to create a form filler - is java, jsp, html enough?. I am repeatedly filling a form on a website (Eg. private dentist reservation).
1 - For loop. For each iteration, all data is same except the value of a "dropdown box - state".
eg. "Text box - name", "text box - age" remain the same in each iteration. But, the state drop down changes to NY, TX, CA in an iteration.
2 - Perform an action (send mail) if certain text occurs in the final page.
How do I make selenium do all this ? Do I have to create a script for each state or there is a for loop ? Can Selenium do step 2 ?