I have done a lot of searching but can't seem to make Selenium wait for an id to NOT have a certain value. Some things I have tried:
This times out:
wait.until(EC.text_to_be_present_in_element_value((By.ID, "price"), not " $0.00"))
This throws TypeError: 'bool' object is not callable
:
wait.until(not EC.text_to_be_present_in_element_value((By.ID, "price"), " $0.00"))
This throws TypeError: coercing to Unicode: need string or buffer, bool found
:
wait.until(EC.text_to_be_present_in_element((By.ID, "price"), not " $0.00"))
Note:
This it the only value in the price ID
wait = WebDriverWait(browser, 10)
Bonus Answer:
The entire issue is that the price starts at " $0.00" then changes to multiple elements which displays a loading gif. Finally, it would display the actual price. To finish my task I used the accepted answer below (until_not) to check that the 0 has become the gif, and an until with a custom function to check the regex not to match "$0". I used the function from here with the regex pattern of "\$(?!0)\w".