What about using XPath and combining different attributes,e.g driver.findElement(By.xpath("//div[contains(@class,'menuTitle') and contains(.,'Register Menu')]"))
We are using it and are quite happy as it is panel/layout-structure independent. The performance is not as good as with By.id, but acceptable. Am Donnerstag, 24. Januar 2013 15:16:08 UTC+1 schrieb jacob....@gmail.com: > > Hi, > > I'm trying to setup Selenium unit testing for my project, and I'm > wondering if there is any equivalent to UiObject.ensureDebugId() for > elements in a CellTable, such as Column, Header, or any of the various Cell > types. What I have been doing is override the Column.render() method to > dynamically insert a div with an ID that I can find later, but this seems > very hacky and counter-intuitive. I can't seem to find any way to do this > for the Header element though. > > Using xpath to find elements in the table is not an option, as our unit > tests can't be tied to the structure of the GUI staying exactly the same. > For the same reasons, trying to find elements by text or tag name (etc. > etc.) wouldn't work either. > > Is there something I'm missing here, or do the CellTable elements not > provide this functionality? > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.