I want to give Click the button based on style and class name,because in my case there is no unique class name and id.
My html code is
<a class="x-btn x-unselectable rp-important-btn rp-btn-shadow x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon"
style="height: 24px; right: auto; top: 5px; margin: 0px; left: 118px;" hidefocus="on" unselectable="on" tabindex="0">
And i have tried
save_class=driver.find_element_by_xpath("//a[@class='x-btn x-unselectable rp-important-btn rp-btn-shadow x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon'
and style='height: 24px; right: auto; top: 5px; margin: 0px; left: 118px;']")
I am getting following error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[@class='x-btn x-unselectable rp-important-btn rp-btn-shadow x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon' and style='height: 24px; right: auto; top: 5px; margin: 0px; left: 118px;']"}