For my website automation using Selenium, I encountered a challenging dropdown that was not the standard native one but a custom-designed version. To tackle this issue, I needed to set its CSS class to hidden in order to access the native functionality smoothly.
Here is the dropdown before clicking on it:
And here is how it appeared after setting the CSS class to hidden:
Now, my question is how can I achieve this automatically with JavaScript? I attempted the following approach without success:
var js:JavascriptExecutor = driver.asInstanceOf[JavascriptExecutor]
js.executeScript("$('.selectpicker select').removeClass('bs-select-hidden')")
I would appreciate any help or suggestions on this matter. Thank you.