How would I select an option in a select menu?

Viewed 28

I was wondering how I would request a website, and then change the option on a dropdown menu, as if it were a human selecting an option on the website in the select menu, but using just python code.

for example, if the below was my website, how would I select one of these in the code?

<!DOCTYPE html>
<html>
    <select class="location-selector">
        <option value="0">Set My Suburb</option>
        <option value="1234">Location 1</option>
        <option value="5678">location 2</option>
        <option value="9101">Location 3</option>
    </select>
</html>

thanks for any help!

0 Answers
Related