ホバリング後に表示されるボタンをクリックします。そのHTMLは次のとおりです。セレンでホバリングした後に表示される要素をクリックする方法は?
<span class="info"></span>
私はこのコードを使用:
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()
これは、しかし働いていません。私はelement.click():
selenium.common.exceptions.ElementNotVisibleException: Message: \
u'Element is not currently visible and so may not be interacted with'
任意の提案をしてくださいコードの最後の行に接続エラーが発生しましたか?
エラーは正確に何ですか? – Arran
@Arran、私は質問を編集しました。 – nutship