Selenium Python AttributeError: 'WebElement' object has no attribute 'select_by_visible_text'
<p>I am selecting a value from a drop down field in Selenium Python.  I am getting the error:</p>

<pre><code>AttributeError: 'WebElement' object has no attribute 'select_by_visible_text'
</code></pre>

<p>My method to select the drop down is:</p>

<pre><code>def select_dataset_from_dataset_dropdown(self):
    dataset_drop_down_element = WebDriverWait(self.driver, 20).until(EC.element_to_be_clickable((By.ID, 'search_variables_lb_datasets')))
    dataset_drop_down_element.select_by_visible_text(str("Query (Query)"))
</code></pre>

<p>The HTML is:</p>

<pre><code>    &lt;select id="search_variables_lb_datasets" class="gwt-ListBox marginbelow" style="display: inline;"&gt;
&lt;option value="-"&gt;-&lt;/option&gt;
&lt;option value="CRM"&gt;CRM&lt;/option&gt;
&lt;option value="ESCR"&gt;ESCR&lt;/option&gt;
&lt;option value="ORCHARD"&gt;ORCHARD&lt;/option&gt;
&lt;option value="Edit_test"&gt;Edit_test&lt;/option&gt;
&lt;option value="Query (Query)"&gt;Query (Query)&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I would like to select the value "Query (Query)"</p>

<p>Can i select this value?</p>

<p>The error trace is:</p>

<pre><code>Traceback (most recent call last):
  File "C:\Webdriver\ClearCore Regression Test\ClearCore - Regression Test\TestCases\StructuredSearch_TestCase.py", line 54, in test_00001_create_search_query_dataset_for_search_and_check_search_variables_dm_query_variables_are_displayed
    search_variables_dm_query_page.select_datamap_and_dataset_from_the_dropdown()
  File "C:\Webdriver\ClearCore Regression Test\ClearCore - Regression Test\Pages\Structured_Search\search_dm_query_page.py", line 90, in select_datamap_and_dataset_from_the_dropdown
    self.select_dataset_from_dataset_dropdown()
  File "C:\Webdriver\ClearCore Regression Test\ClearCore - Regression Test\Pages\Structured_Search\search_dm_query_page.py", line 79, in select_dataset_from_dataset_dropdown
    dataset_drop_down_element.select_by_visible_text(str("Query (Query)"))
AttributeError: 'WebElement' object has no attribute 'select_by_visible_text'
</code></pre>

<p>Thanks, Riaz</p>