Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
【Python】Seleniumを使ってセレクトボックスを操作する方法
# coding: utf-8
from selenium import webdriver
from selenium.webdriver.support.select import Select
driver.get("http://www.amazon.co.jp/s?node=4083271")
element = WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.CSS_SELECTOR, "select#sort"))
)
Select(element).select_by_value("date-desc-rank")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.