element1 = browser.link(:id, 'menu9373847813') element2 = element1.parent.parent element3 = element2.parent element4 = browser.div(:after? => element2)
wesley chen wrote: > Please watch the pic: question.jpg at first; > When I locate the element A, how can I locate the element close to A > with node(child node, father node) or directory attributes? > > In fact, I ask the question because: > The elements on the page are all dynamic, only one id can be fixed, so > I would like to locate the elements close to the id with child node or > father node or directory attributes. > > Use index may be a method, but not good. > > > Any suggestion would be appreciated. > > Thanks. > Wesley. > --:) > Man should be hard to himself, but tolerant to others. > > > > > ------------------------------------------------------------------------ > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
