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 the XPATH I have found from inspecting the dropdown menu accordingly.
I have created an example form here for reference: https://forms.gle/prBMqgVVFNv5KWQQA
These did not help as it uses the Select class, please do not flag this question as a duplicate as such
How to select/get drop down option in Selenium 2
How to select a drop-down menu value with Selenium using Python?
Using a webdriverwait also did not seem to do the trick as detailed in this post: