这selenium
很容易处理-Select
类:
from selenium.webdriver.support.select import Select
select = Select(driver.find_element_by_id('FCenter'))
selected_option = select.first_selected_option
print selected_option.text
如何使用带有Python的Selenium WebDriver获得选择的选项?
这selenium
很容易处理-Select
类:
from selenium.webdriver.support.select import Select
select = Select(driver.find_element_by_id('FCenter'))
selected_option = select.first_selected_option
print selected_option.text