I don't know why ActionChains move_to_element()
is not working with chromedriver >74.
(But it works on chromedriver 74 and geckodriver.)
Even though I add these three line before ActionChains, it still failed to move to element.
WebDriverWait(driver, 60).until(EC.presence_of_element_located((By.XPATH, xxxxx)))
WebDriverWait(driver, 60).until(EC.visibility_of_element_located((By.XPATH, xxxxx))
drvier.execute_script("arguments[0].scrollIntoView();", element)
ActionChains(driver).move_to_element(element).click().perform()
And throw error as below:
selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds (Session info: chrome=79.0.3945.117)
I also try to use move_to_element_with_offset mentioned in Selenium MoveTargetOutOfBoundsException even after scrolling to element, it still not working:
ActionChains(driver).move_to_element_with_offset(element, 5, 5).click().perform()
Below is my setting of chromedriver. Is there any settings impact to ActionChains?
options = webdriver.ChromeOptions()
options.add_argument('--no-sandbox')
options.add_argument('log-level=3')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--no-proxy-server')
options.add_argument('--disable-extensions')
options.add_argument('--disable-infobars')
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(executable_path=chromedriver_path, chrome_options=options)