I'm trying automating a website and I'm trying to access a menu > submenu and perform a click on the item in submenu. After a lot of search I learned that mouseover is a better option for me as the submenu only appear if I hover the mouse on the menu. I have tried many instances but the mouse just won't hover on the main menu and to submenu. The code is:
policymngmt = driver.find_element_by_xpath('/html/body/app-root/div/div/main/site-header/div[1]/div[1]/div[2]/div/div/div/div/div[2]/ul/li[2]/a')
issuance = driver.find_element_by_xpath('/html/body/app-root/div/div/main/site-header/div[3]/div/div[1]/nx-link/a')
actions = ActionChains(driver)
actions.move_to_element(policymngmt).move_to_element(issuance).click().perform()