2010/10/1 Jagdish pyati <jagdi...@gmail.com>:
> Hi,
> This is a Listbox in the application and I wanted to verify the items that
> are displayed in that listbox. Right now I am just using a for loop and
> selecting each item using "Select From List" function to indirectly verify
> the items present in the list box. Is there a direct function to use to
> verify this. Iam using pybot.
You still didn't tell is this a Swing, Windows, or web GUI, or
something else. There are separate libraries for all these GUIs so
when you say `list` it's impossible to know what you mean.
Based on your other question regarding HTML tables, I assume you are
still in web world an use SeleniumLibrary. Apparently it doesn't have
`List Should Have Items` keyword nor related `List Should (Not) Have
Item` keywords. I think adding them would make sense and that should
also be relatively easy. Please submit an enhancement request about
this to SeleniumLibrary's issue tracker.
Finally, using for loop like you've done sounds like a good workaround
for this limitation. If you wrap that loop into a user keyword with a
good name, there's practically no difference compared to having `List
Should Have Items` keyword in the library.
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org