Unselect single option dropdown python webdriver
<p>I am having an issue unselecting a selected option after selecting it using webdriver. I keep getting error raise NotImplementedError("You may only deselect options of a multi-select")
NotImplementedError: You may only deselect options of a multi-select</p>

<p>How can a selected pull down menu item be unselected? My code is below.</p>

<p>HTML code:</p>

<pre><code>&lt;option selected="selected" value=""&gt;&lt;/option&gt;
&lt;option value="Item 1"&gt;Item 1&lt;/option&gt;
&lt;option value="Item 2 (1)"&gt;Item 2&lt;/option&gt;
&lt;option value="Item 3"&gt;Item 3&lt;/option&gt;
</code></pre>

<p>Python Webdriver:</p>

<pre><code>options = select.find_elements_by_tag_name("option") 
for x in range(1,len(options)): 
    option = options[x]  
    options_list.append(option.get_attribute("value"))
    item_selection = Select(select)
    item_selection.select_by_visible_text("Item 1")
time.sleep()
item_selection.deselect_by_visible_text("Item 1")
</code></pre>

<p>You could use <code>.select_by_index(0)</code> or possibly <code>.select_by_value("")</code>. The first one should work... I'm not sure about the second.</p>

python selenium