I’m trying to write a test case for Selenium and I’m having a little trouble finding elements. I believe its because my site uses a HTML frame set.
If I open up Firebug, and try to simply select all links:
//a
… I get no results (although the ‘menu’ frame contains about 15+ links).
If I right-click in the menu frame and choose to “Show Only This Frame”, and then select all links in Firebug, I get all 15+ links returned.
This leads me to believe X-Path cannot iterate through elements within a specific frame. Is that true?
When the site is showing all frames, I can select the specific frame:
//frame[@name='menu']
…but trying to drill down to the links starting with that X-Path does not work:
//frame[@name='menu']//a
//frame[@name='menu']@@@//a <-- Special '@@@' syntax I read about somewhere to try.
Any help trying to solve this with X-Paths is appreciated. If a CSS selector will work, I could use some pointers there as well. Thanks!
jg
How about you first select the relevant iframe, and then work with the xpaths within that frame.
Sample code in Ruby
this should help, unless I got the question wrong.