📜  'move_to_element' 未定义 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:41.832000             🧑  作者: Mango

代码示例1
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()