I want to click a button which is visible after hovering. Its html is:
<span class="info"></span>
I used this code:
import selenium.webdriver as webdriver from selenium.webdriver.common.action_chains import ActionChains url = "http://example.com" driver = webdriver.Firefox() driver.get(url) element = driver.find_element_by_class_name("info") hov = ActionChains(driver).move_to_element(element) hov.perform() element.click()
It's not working though. I got a an error connected with the last line of code element.click():
selenium.common.exceptions.ElementNotVisibleException: Message: \ u'Element is not currently visible and so may not be interacted with'
Any suggestions please?