First off, what does 'does not work' mean. what happens? do you get an error message? if so what is it?
Second, That's an un-ordered list. it's not settable or clear-able. The.clear method is for things like INPUT type tags such as checkboxes Third, The example doesn't match your code attempt.. the code is looking for a <ul> with id="x-auto-8964. But the sample HTML has id="x-auto-648" so even if it was possible to use .clear the code would fail because the id value in your code doesn't match the id value in the html Last, since an unordered list in html doesn't have any kind of 'clear' function associated with it, I suspect that there is a bunch of Javascript behind all this that you're not showing us. The javascript is probably reacting to events like mouseover and click and such, on specific elements in the list. ON the website, when interacting manually how would you 'clear' items from the list? And what happens when you 'clear' an item manually? can you give us a URL to the site with this code on it, so we can have a better look at what's going on? On Aug 13, 11:30 am, carmen3lia <eliaol...@gmail.com> wrote: > I need to clear the elements all elements in a list, UL, I have the > following code > > b.div(:id, "x-auto-8963").ul(:id, "x-auto-8964").clear > > but it does not work > > This the HTML code and i want to delete all the li elements > > <ul class="token-input-list-facebook x-component" id="x-auto-648"> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-token-facebook"><p title="email">user name</ > p><span>x</span></li> > <li class="token-input-input-token-facebook"><input type="text" > tabindex="1" class="gwt-SuggestBox" style="outline: medium none;" > id="suggestion_box"></li></ul> -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com