===============셀레늄은 Firefox에서 작동하지 않는 요소로 마우스 커서를 옮깁니다.
OS : Win7에
셀레늄 : 2.33.0
파이어 폭스 : 22.0
파이썬 : 2.7.4
=================== =============
o 메소드 "move_to_element"로 마우스 커서를 "input"요소로 이동 시키지만 할 수는 없습니다.
누구에게이 문제가 있습니까?
================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from selenium.webdriver.common.by import By
import selenium.webdriver as webdriver
import time
firefox = webdriver.Firefox()
firefox.get("http://www.baidu.com")
input = firefox.find_element_by_id("kw")
action = webdriver.ActionChains(firefox)
action.send_keys_to_element(input, "testvalue")
action.perform()
#This step (move mouse to "input" element) NOT work! :(
action = webdriver.ActionChains(firefox)
action.move_to_element(input)
action.perform()
time.sleep(3)
firefox.quit()
과제를 해결한다. move_to_element() 메서드는 실제 마우스 커서를 객체로 이동해야한다고 생각했습니다. 그러나 셀레늄은 실제 마우스 커서를 움직이지 않고 마우스를 움직입니다. 감사.
작동 나던 방법 : 여기
은 예입니다? –감사! 그것은 내 잘못이야. 마우스 커서를 움직여야한다고 생각했습니다. 이제 괜찮아. :) –