I am using selenium driver in python. I am trying to find and click a link web element located inside a dropdown menu. I used ActionChains to click and expand the dropdown menu and it works. But i am unable to find the link element and click on it. Upon clicking it will trigger a mail. I have used all find_element_by methods but nothing works.
The code which i have used till now. It results in the No Element found error.
optionsmenu = driver.find_element_by_xpath('/html/body/div[3]/div[3]/div/div[2]/div[1]/div[3]/div[3]/table/tbody/tr/td[5]/a')
actions = ActionChains(driver)
actions.move_to_element(optionsmenu)
actions.click()
actions.perform()
print ('Options menu clicked')
driver.find_element_by_xpath('//*[@id="userOptionsMenu"]/td/ul/li[5]/a/span[2]').click()