首页 > 解决方案 > Selecting div class options in selenium python

问题描述

website code I am trying to auto made on

dots= driver.find_element_by_xpath('//*[@id="yDmH0d"]/div[1]/div/div/div[12]').click()
dup=Select(driver.find_element_by_xpath('/html/body/div[5]'))

dup.select_by_visible_text("Duplicate site")

Hello, I am very new to selenium and automation. I am trying to select an option from a 3 dot menu and can't get it to work. All the tags within it are div classes and if I try to just .click() it says that it is not interactable. I have tried select feature as well as you can see above but that doesn't seem to work either and tells be that select only works on elements not div. Any recommendations will be greatly appreciated. Thanks.

标签: pythonseleniumdrop-down-menuautomation

解决方案


推荐阅读