Selenium Python Bindings
インストール
https://kurozumi.github.io/selenium-python/installation.html
$ pip install selenium
https://github.com/mozilla/geckodriver/releases
geckodriver-v0.26.0-macos.tar.gz をダウンロード
$ mv geckodriver /Volumes/Home/ynaito/opt/anaconda2/bin/
テスト
https://kurozumi.github.io/selenium-python/getting-started.html
code:python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()