728x90
๋ฐ์ํ
์์ธ
๋ธ๋ผ์ฐ์ ๊ฐ ํด๋ฆญํด์ผ ํ๋ ์์๋ฅผ ๋ณด์ด์ง ์๋ ๊ณณ์ ์๊ธฐ ๋๋ฌธ์(์คํฌ๋กค์ด ๊ธธ๋ค๋๊ฐ ๋ฑ) ๋ฐ์ํ๋ ์์ธ
ํด๊ฒฐ ๋ฐฉ๋ฒ
from selenium.webdriver.common.action_chains import ActionChains
element = driver.find_element_by_id("my-id")
actions = ActionChains(driver)
actions.move_to_element(element).perform()
# actions.move_to_element(element).click().perform() # Click
๋ธ๋ผ์ฐ์ ๋ฅผ ์กฐ์ํ๋ ActionsChains์ผ๋ก ๋ธ๋ผ์ฐ์ ๊ฐ ์์๊ฐ ์๋ ๊ณณ์ผ๋ก ์ด๋์ํฌ ์ ์๋ค.
์ฐธ๊ณ :
https://stackoverflow.com/questions/41744368/scrolling-to-element-using-webdriver
728x90
๋ฐ์ํ