3

Safari 12.0 ブラウザーで ActionChains を使用して要素への移動アクションを作成しようとしていますが、次のエラーが発生します。

selenium.common.exceptions.InvalidArgumentException: Message: Encountered key input source with invalid 'value' in payload: {
actions =     (
            {
        duration = 0;
        type = pause;
    }
);
id = key;
type = key;
}

同じテストは、どのブラウザー (Firefox、Chrome、Ie、Edge など) でも成功しますが、Safari では失敗します。

このアクションを作成するソース コード:

element_to_hover_over = driver.find_element_by_xpath('/html/body/div[7]/div[1]/header/div[1]/div/ul/li[1]/div[1]/span[1]')
hover = ActionChains(driver).move_to_element(element_to_hover_over)
hover.perform()
4

1 に答える 1