Chcę kliknąć przycisk, który jest widoczny po zawisnięciu. Jego html jest:Jak kliknąć element widoczny po zawisnięciu za pomocą selenu?
<span class="info"></span>
Użyłem tego kodu:
import selenium.webdriver as webdriver
from selenium.webdriver.common.action_chains import ActionChains
url = "http://example.com"
driver = webdriver.Firefox()
driver.get(url)
element = driver.find_element_by_class_name("info")
hov = ActionChains(driver).move_to_element(element)
hov.perform()
element.click()
to nie działa choć. Dostałem błąd związany z ostatniej linii kodu element.click():
selenium.common.exceptions.ElementNotVisibleException: Message: \
u'Element is not currently visible and so may not be interacted with'
Wszelkie sugestie proszę?
Błędy są dokładnie tym, co? – Arran
@ Arran, zredagowałem pytanie. – nutship