'Selenium dynamic drop down

So basically I have a dynamic dropdown list which content changes based on my input. I want to extract the list of possible elements I get from some input of mine. To do that I need to find the tag in html that is the same for all of them. The problem is the tag is following <li class="opt hidden"> for all the elements. When I type into the input box for the results the tag(for found ones) goes from mentioned above to <li class="opt">. Any ideas on how to get only those tags that are <li class="opt"> and not <li class="opt hidden">.

Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source