# How do you select a dropdown option with marionette

**URL:** <https://racket.discourse.group/t/how-do-you-select-a-dropdown-option-with-marionette/621>\
**Category:** Questions & Answers\
**Created:** [January 25, 2022, 1:02am UTC](https://racket.discourse.group/t/how-do-you-select-a-dropdown-option-with-marionette/621 "2022-01-25T01:02:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![badkins](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/badkins/32/99_2.png) [@badkins](https://racket.discourse.group/u/badkins)\
**Post date:** [January 25, 2022, 1:02am UTC](https://racket.discourse.group/t/how-do-you-select-a-dropdown-option-with-marionette/621/1 "2022-01-25T01:02:37Z")

</div>

How do you select a dropdown option with `marionette`?

In some cases, I've been successful by using `element-type!` to type the value, but that doesn't work in some cases. In particular, if there are key handling listeners on the dropdown e.g. for an enhanced dropdown.

Is there a more direct way to select an option?

---

<div class="post-metadata">

**Author:** ![badkins](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/badkins/32/99_2.png) [@badkins](https://racket.discourse.group/u/badkins)\
**Post date:** [January 25, 2022, 1:21am UTC](https://racket.discourse.group/t/how-do-you-select-a-dropdown-option-with-marionette/621/2 "2022-01-25T01:21:27Z")

</div>

Ok, I think I found a way to do this. Use a css selector to target a particular `<option>` and click it:

```scheme
(element-click! (page-query-selector!
                 page
                 "#history_address__state option[value=\"NC\"]"))

```

I think part of my issue is the dynamic nature of some of the `<select>` elements I have i.e. fetching data from the server after another `<select>` is chosen.
