I'm pretty new to using python in selenium.
I have been trying to select a button on my web page. Here is the piece of HTML that appears after inspecting the element of the button:
<a class="btn col-xs-3 nav-btns" ui-sref="salt.dashboard.reports.minions" href="/dashboard/reports/minions/">
<span class="ssIcons-icon_reports salt-icon-3x ng-scope active" bs-tooltip="" data-title="Reports" container="body" placement="bottom" animation="none" data-trigger="hover" ng-class="{'active': state.current.name =='salt.dashboard.reports' … || state.current.name =='salt.dashboard.reports.minions'}">
::before
</span>
</a>
I have tried everything I can think of. Here are some of the things that I have tried:
element = driver.find_element_by_class_name("btncol-xs-3")
element = driver.find_element_by_name("Reports")
element = driver.find_element_by_id("Reports")
the error that I keep getting is:
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"class name","selector":"salt.dashboard.reports"} Stacktrace: at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpoRPJXA/extensions/[email protected]/components/driver-component.js:10299) at FirefoxDriver.prototype.findElement (file:///tmp/tmpoRPJXA/extensions/[email protected]/components/driver-component.js:10308) at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpoRPJXA/extensions/[email protected]/components/command-processor.js:12282) at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpoRPJXA/extensions/[email protected]/components/command-processor.js:12287) at DelayedCommand.prototype.execute/< (file:///tmp/tmpoRPJXA/extensions/[email protected]/components/command-processor.js:12229) root@chris-salt:/home/chris/Documents/projects/python-selenium#