I am writing FuncUnit for my application. I am browsing the application in Google Chrome. I have a textbox which is initially hidden. I need to make it visible and then clear the text already present in that textbox. I have the following code which makes the box visible but fails to clear the text in it.
S('#search').visible().clearText();
Can anyone tell what is wrong here?
I don't know if you're still waiting for an answer. I think you're not using
visible()
in the correct way.In FuncUnit (see docs here), among other things, you can distinguish between "actions" and "waits".
visible()
is a wait, and should be used to wait for an element to become visible, like this: