Skip to content

Form Frenzy Problem


We found this cool form online at Practice Probs! They let you choose your favourite dog breed and everything! However, they foolishly only let you choose a single dog breed as a favourite. Little do they know, all dogs deserve your love! To make sure we don't leave out any good boys and girls, we need to submit the form once for each listed dog breed.

Your job is to:

  1. Go to the form.
  2. Extract all options from the Your favourite dog breed field.
  3. Submit the form once for each option, using the form details below for all other fields.
Form Details
Field Value
Name John Doe
Email j.doe@example.com
Message All dogs deserve to be loved!
Image dog_picture

Starter code

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://seleniumplayground.practiceprobs.com/contact/")
driver.implicitly_wait(5)
# Your Code here
A few tips
  1. Use XPath to collect all of the options for different dog breeds.
  2. XPath has a lot of neat tricks, which can be used to identify individual elements.
  3. You will have to reload the page after every submission, and refresh all elements you are referencing to (as the Selenium elements expire once the page reloads).

See the solution