Here is a better wiki link http://wiki.openqa.org/display/WTR/XPath Apparently it does not work:
In my case, this works fine: level1 = ie.frame(:id, "contentFrame") level2 = level1.frame(:id, "frameHeader") myselect = level2.select_list(:id, "c_ddlCategory") myselect.flash This does NOT work: myselect2 = ie.select_list(:xpath, "//sele...@id='c_ddlCategory']") myselect2.flash > Unable to locate element, using :xpath This also does NOT work: myselect2 = level2.select_list(:xpath, "//sele...@id='c_ddlCategory']") myselect2.flash > undefined method `element_by_xpath' :( 2009/3/17 Mark Lehky <mark.le...@aclaro.com>: > With respect to XPath, the best I have been able to Google so far is > this document: > http://svn.openqa.org/fisheye/browse/~raw,r=897/watir/trunk/watir/doc/Support%20for%20XPATH%20in%20Watir.doc > which suggests that XPath in Watir is supported _except_ for FRAMES? > Is this still the case? > > TIA. > > > 2009/3/17 Mark Lehky <mark.le...@aclaro.com>: >> For anyone following this thread: >> Yes, you can traverse the frames as I indicated below, and it works! :D >> >> Now, can I do the same using XPath ... >> >> >> 2009/3/17 Mark Lehky <mark.le...@aclaro.com>: >>> I think the answer is somewhere in your suggestion. >>> The element(s) that I am looking for is quite deep in several nested >>> FRAMESET/FRAME/FRAMESET/FRAME/... >>> Is there a way in Watir/Ruby to say "in any frame, no matter how deep"? >>> If not, how do I traverse them? Can I do something like: >>> ie = Watir::IE.new >>> frame1 = ie.frame(:id, "contentFrame") >>> frame2 = frame1.frame(:id, "frameTop") >>> ...etc. >>> >>> Thank You all for the help so far. >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---