I wish to click on New Test. The HTML code looks something like this. I'm new here and beginning to learn automation using selenium-python.
<li id="testing">
<ul class="dd">
<li><a href="javascript:toolsPopup('/abc/xyz/text.html');"><span>New Test</span></a></li>
<li><a href="javascript:toolsPopup('/abc/xyz/list.html');"><span>Test List</span></a></li>
</ul>
</li>
The code that I'm trying to use
element=driver.find_element_by_id('testing')
drp=Select(element)
drp.select_by_visible_text('New Test')
But getting the error
selenium.common.exceptions.UnexpectedTagNameException: Message: Select only works on <select> elements, not on <li>
Any help would be highly appreciated. Thanks!