I can't get Python to select "Buy" from the drop down menu:
<a href="" role="button" aria-pressed="false" class="td-wb-dropdown__item-content" data-ng-click="tdWbDropdownItemController.select()" data-td-wb-transclude=""> <span data-ng-bind="'trading.order.common.ACTION_' + item | translate">Buy</span> </a>
My code:
select = Select(browser.find_element_by_class_name('td-wb-dropdown__item-content'))
select.select_by_index(1)
select.select_by_visible_text("Buy")
My error:
Select only works on
<select>
elements, not on<a>
Also, I'm able to click on a drop down itself. However, I'm just unsure how to select my option.
Tsymbol = browser.find_element_by_class_name('td-wb-dropdown__placeholder') # Clicking on BUY/SELL
Tsymbol.click()