I have been trying to find a way to select a dropdown option from google forms through selenium and python but have thus far been unsuccessful.
I tried several ways including the Select class (which does not work due to the dropdown form not using the select tag). As well as XPATH. But have only got so far as to click on the dropdown but not being able to select the options within the said dropdown list. Any help would be greatly appreciated!
I need to be able to specify which dropdown option to choose based on the text/value in the various options.
CODE:
browser.find_element_by_xpath("//div[@class='quantumWizMenuPaperselectOptionList']").click()
browser.find_element_by_xpath("//div[@class='freebirdThemedSelectOptionDarkerDisabled']/div[@class='quantumWizMenuPaperselectOption'][@data-value='1.05pm - 3.55pm']").click()
The error I get is that no such element is found even though this is XPATH I have found from inspecting the dropdown menu accordingly.
This did not help as it uses the Select class How to select/get drop down option in Selenium 2