I am a python newbie having an issue scraping the the text from a drop down table
here is where the issue is:
from selenium import webdriver
from time import sleep
from selenium.webdriver.support.ui import Select
driver = webdriver.Chrome()
driver.get("https://www.ehail.ca/quotes/?1590984761655")
desired_data =
Select(driver.find_element_by_xpath("/html/body/div[1]/div[2]/form[2]/table[1]/tbody/tr/td/table/tbody[1]/tr[2]/td[10]/select"))
desired_data.select_by_index(1)
print(desired_data.text))
and get the resulting error:
AttributeError: 'Select' object has no attribute 'get_attribute'
I have also tried print(desired_data.text)
but had no luck there.
Can I do this with selenium or will I need another library like beautiful soup?
Thank you for reading
edit1: I have filled in the required fields and still get same error. I am able to select the element but when try to print I get <selenium.webdriver.support.select.Select object at 0x087810B8>