On 8/6/06, Cagatay Civici <[EMAIL PROTECTED]> wrote:
I got an email from a user asking how to use selenium for stuff like jscook menu, tree2. I wonder the results also.
I'm not quite sure yet. :) We want to test the behavior (does the tree expand and display the correct nodes) and not necessarily the generated HTML. For example, on Firefox you can check that one of the nodes on the Tree 2 nonav example is there with: || assertText || //html/body/form/span/table[3]/tbody/tr/td[3]/span || Requires Foo || But that test fails in IE, even though the tree renders okay. (The component renders different HTML in Firefox vs. IE?) Selecting items by id works in both browsers, except that I'm only able to look for the folder icons, and then a couple of those don't have ids. Here's a screen shot of the no-nav Tree 2, partially expanded, with the id and class displayed (by the Firefox Web Developer extension): http://people.apache.org/~wsmoak/myfaces/selenium/myfaces-tree2-nonav.jpg The 'Requires Foo' and 'Requires Foo Recommendation' nodes do not have ids. I assume this is because they have no children, so there is no link involved. What I really need is a unique ID for every element, including the spans that contain the text for the nodes. Can that be done? (It will be interesting to see how fragile these tests are. How likely is it that the generated ids will change?) -- Wendy
