java - How to select an option from drop down in selenium webdriver. The element is not a 'select' element -


<svg viewbox="0 0 24 24" style="display: inline-block; fill: rgb(224, 224, 224); height: 24px; width: 24px; transition: 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; position: absolute; right: 0px; top: 22px; -webkit-user-select: none;"><path d="m7 10l5 5 5-5z"></path></svg>  <path d="m7 10l5 5 5-5z"></path> 

i've attempted, using container, using action class hover over, using select class none seem working.

if element not select element it's still webelement. display options , find xpath option , if need select particular one, use find text follows. may need have wait in place wait option display.

example: 1. click on drop down element display list of items. 2. use following find option , select

webelement yourelement = driver.findelement(by.xpath("//*[contains(text(),'the option text youre looking for')]")); yourelement.click(); 

Comments