I am trying to locate Add button mentioned in the below HTML
using
driver.find_element_by_css_selector("span.fa fa-plus").click()
<a id="ToolTables_datagrid_0" class="DTTT_button btn-primary">
<span><span class="fa fa-plus"></span> Add</span>
</a>
It is displaying following error:
Traceback (most recent call last):
File "/home/vijay/PycharmProjects/practice/Menu.py", line 27, in <module>
driver.find_element_by_css_selector(span.fa fa-plus).click()
NameError: name 'span' is not defined
I have also tried other methods of locating the element (an Add button) but it doesn't work.