Most of the solutions for this issue represenred as this
drowpdown = driver.find_element(:id, 'option1') option = Selenium::WebDriver::Select::Support.new(dropdown) option.select_by(:value, "x")
But in my case website that i'm testing doesn't have regular "dropdown" and "options". what i'm facing here
<div class="sk-select"><input maxlength="" type="text" value="" class="sk-select__typing-input"> <!----> <span class="sk-select__value" title="Select a language">Select a language</span> <span class="sk-select__arrow"></span> <!----></div>
Before click on the dropdown section
<div class="sk-select"><input maxlength="" type="text" class="sk-select__typing-input"> <!----> <span class="sk-select__value" title="Select a language">Select a language</span> <span class="sk-select__arrow"></span> <!----></div> <span class="sk-select__value" title="Select a language">Select a language</span>
After click on the dropdown
<div class="sk-select is-opened"><input maxlength="" type="text" value="" class="sk-select__typing-input"> <!----> <!----> <span class="sk-select__arrow"></span> <ul class="sk-select__list"><li class="sk-select__list-item js-list-item">Afrikaans<span class="sk-select__sub-value">The language is not listed in the National Interpreter Register</span> <span class="sk-select__arrow"></span>
gif
, update the question with the relevant text based HTML of the element before and after clicking on the dropdown element.