Automate Dropdown Menu In Selenium Without Select
I'm trying to select an element from a dropdown using Selenium. I'm already able to select the dropdown, but I don't know how to select the specific elements from the dropdown, sin
Solution 1:
You can try this:
from selenium.webdriver.support import expected_conditions as EC
element = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//content[contains(., 'BlainSupply')]")))
element.click()
as alternative you can try this xPath
:
//content[contains(., 'BlainSupply')]/parent::div
because I'm not sure that content
tag is clickable
Post a Comment for "Automate Dropdown Menu In Selenium Without Select"