Is there an existing way in Selenium WebDriver to wait until an element gains or loses a class? For example, the HTML for my select looks like this:
<select id="select-1" class="selectBox ui-state-error" row-index="0" tabindex="-1" aria-hidden="true">
...
</select>
The class in question is ui-state-error
. This basically displays a red highlight on my drop down. Basically, I want to set up an explicit wait until my select element gains the class ui-state-error
or loses the class ui-state-error
.
I'm not sure if this is even possible.
Python version: 3.4.3. Python bindings for Selenium: 2.46.0