On website https://opensource-demo.orangehrmlive.com/ I am trying to open the Admin box then the UserManagment and then click on Users. I do not understand where is my mistake. It gives me error AttributeError: move_to requires a WebElement. I have read other related questions like mine but still I can't get the job done.
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
import time
driver=webdriver.Chrome(executable_path="D:\ChromeDriverExtracted\chromedriver")
driver.get("https://opensource-demo.orangehrmlive.com/")
driver.maximize_window()
time.sleep(2)
driver.find_element_by_id("txtUsername").send_keys("Admin")
driver.find_element_by_id("txtPassword").send_keys("admin123")
driver.find_element(By.ID, "btnLogin").click()
admin=driver.find_elements_by_xpath("//*[@id='menu_admin_viewAdminModule']/b")
userManagment=driver.find_elements_by_xpath("//*[@id='menu_admin_UserManagement']")
users=driver.find_elements_by_xpath("//*[@id='menu_admin_viewSystemUsers']")
time.sleep(1)
actions=ActionChains(driver)
actions.move_to_element(admin).move_to_element(userManagment).move_to_element(users).click().perform()