Created
March 12, 2018 20:03
-
-
Save aaltat/a7f71e960d1bc3c6f90bfebb216162f0 to your computer and use it in GitHub Desktop.
Firefox move_to_element bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.common.action_chains import ActionChains | |
driver = webdriver.Firefox() | |
driver.get('https://github.com/robotframework/SeleniumLibrary') | |
xpath = '//*[@id="user-content-history"]' | |
while not driver.find_elements_by_xpath(xpath): | |
print('Sleep 1') | |
time.sleep(1) | |
element = driver.find_element_by_xpath(xpath) | |
ActionChains(driver).move_to_element(element).perform() | |
time.sleep(5) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment