'move_to_element' is not defined code example

Example: 'move_to_element' is not defined

from time import sleep
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

browser = webdriver.Chrome ('/Users/kiran/Downloads/chromedriver')

browser.get ('http://www.brix.de/computer/web_html_php_et_al/formular-test_smm_01.html')

inputs = browser.find_element_by_xpath(
    '/html/body/form[1]/table')

ActionChains(browser)\
.move_to_element(input[name]).click()\
.send_keys('name')\
.move_to_element(input[vorname]).click()\
.send_keys('Surname')\
.perform()

Tags:

Misc Example