0

Im a beginner in python and selenium, Ive been trying to make selenium click on the dropdown menu. Ive tried alot of solutions but none worked.

picture

This is my code

driver.get('chrome://settings/content/siteDetails?site=https%3A%2F%2Fmeet.google.com%3A443')
time.sleep(3)
microphone = driver.find_element_by_xpath("//select[@aria-label='Microphone']")

This is the error

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate 
element: {"method":"xpath","selector":"//select[@aria-label='Microphone']"}

Is there anything i did wrong?

Wayne Gan
  • 29
  • 2

1 Answers1

0

This element is located inside multiple shadow-roots.
See here for more details how to deal with shadow DOM.

Prophet
  • 21,440
  • 13
  • 47
  • 64