How can I wait until an element has a certain value?
For example, some button on a page changes the value of an input field from "No Value" to "Value X". The problem is, I don't know how much time will it take so page.waitFor() is not an option.
I thought I could use page.waitForSelector(input:contains('No Value')); but that does not work as far as I understand.
Possibly page.waitForFunction() should work, but I am not sure what function to write there. Would I use a page.evaluate that returns the value of the input maybe?