Thanks, it worked fine! Now the module looks like this:
ui.List(uid: "categoryList", clocator: [tag: "table", trailer:
"/tbody/tr/td"], separator: "div"){
Container(uid: "all", clocator: [tag: "a"]){
UrlLink(uid: "link", clocator: [:])
TextBox(uid: "text", clocator: [tag: "strong"])
}
}
I have removed the class bit, so it can be used for all catalogs, i.e. Cats
as well, and the link end text part allows me to read and click the elements
in the List. Is this the proper solution?
Now there is only one question left. I would like to get the length of this
list, because I would like to do the following code:
def length = getLength("categoryList")
def map = [:]
for (i in 1..length) {
map.put( getText("categoryList[${i}].text",i)
}
....
def clickCategory(name) {
click "categoryList[${map[name]}].link"
}
I could not find the reference of the API. I saw that table has the
getTableMaxRowNum(),
so I hope list has something similar, just I missed it somehow.
Zsolt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---