I am trying to perform mouse over operation in python selenium binding, but I am getting error while using ActionChains.perform()
I have tried this
def test_mouse_over():
driver =webdriver.Firefox()
driver.get("https://www.flipkart.com/")
actions = ActionChains(driver)
val1 = driver.find_element_by_xpath('//span[text()="Men"]')
actions.move_to_element(val1)
val2 = driver.find_element_by_xpath('//span[text()="Shirts"]')
actions.click(val2)
actions.perform()
I am getting error at last line actions.perform()
actions =Action Chains(driver). Please show the error message.