move_to_element()
ActionChainsが chromedriver >74 で動作しない理由がわかりません。
(ただし、chromedriver 74 と geckodriver では動作します。)
この 3 行を ActionChains の前に追加しても、要素に移動できませんでした。
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()
そして、以下のようにエラーをスローします:
selenium.common.exceptions.MoveTargetOutOfBoundsException: メッセージ: ターゲットを範囲外に移動します (セッション情報: chrome=79.0.3945.117)
また、要素までスクロールした後でも、Selenium MoveTargetOutOfBoundsExceptionに記載されている move_to_element_with_offset を使用しようとしましたが、まだ機能していません:
ActionChains(driver).move_to_element_with_offset(element, 5, 5).click().perform()
以下は私のchromedriverの設定です。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)