from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
options = ChromeOptions()
options.add_argument('--headless')
driver = Chrome(options=options,
executable_path='.\chromedriver.exe')
driver.get('https://soundoftext.com/')
elem_t = driver.find_element_by_class_name("field__textarea")
elem_t.send_keys('こんにちは')
elem_c = driver.find_element_by_class_name("field__select")
elem_c_s = Select(elem_c)
elem_c_s.select_by_value("ja-JP")
a = driver.find_element_by_xpath('//[@id="app"]/div[1]/div/form/div[2]/select').text
print(a)
とすると、
Afrikaans
Albanian
Arabic
Armenian
Bengali (Bangladesh)
Bengali (India)
…と出力されますが,現在選択されているコンボボックスの値を取得するにはどうすればよいでしょうか?