I'm starting with funcunit and I get this message (running the test in chrome browser): " You can't run getters after actions and waits. Please put your getters in a callback or at the beginning of the test. " I'm unsure how to fix this. Basically I want to load a page and wait for an element to be there, then starts checking some stuff. So this look like:
equal(S("h2").visible().size(),2,"2 headers"); //got the above message
equal(S("h2").size(),2,"2 heades"); //fails because the page isn't loaded yet
Apparently the call to size() is not waiting at all. I don't want to add S.wait(1000) everywhere to make the test pass. What can I do ?