Peroli Sivaprakasam
unread,Aug 11, 2010, 6:03:03 AM8/11/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to FuncUnit
Hi,
How to clear a textbox using FuncUnit? I have the following code:
HTML:
<input type="text" id="search" />
<input type="submit" value="Go" id="go" />
FuncUnit Test:
// Type "funcunit" in search box and hit "Go"
S('#search').type("funcunit", function(){
S('#go').click(function(){
//Assertions on the search result.
});
});
// Clear the search box and hit "Go"
S('#search').type("", function(){
S('#go').click(function(){
//Assertions on the search result.
});
});
The second one (clearing the text field with type("") doesn't
work.
Is there any other way, apart from doing type("\b\b\b\b\b\b\b\b")
many times?
I tried to use val(), like we use in jQuery, but I get the
following in test result.
waiting for val on #search_dialog_query !==
Thanks,
Peroli Sivaprakasam