History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-66
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: David Schmidt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

IE#Frame.show_frames doesn't work

Created: 15/May/06 01:41 PM   Updated: 14/Oct/07 02:37 PM
Component/s: Frame
Affects Version/s: 1.5.0/1.5.1
Fix Version/s: 1.6.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Watir 1.5.0.993 on Branch: modal_dialog


 Description  « Hide
Frame.show_frames no longer works. Since frames may contain sub-frames, the "show_frames" method (and probably other "show" methods) should be in module Container rather than class IE:

irb(main):101:0> ie.frame('Main').show_all_frames
NoMethodError: undefined method `show_all_frames' for #<Watir::Frame:0x2ec5d08>
        from (irb):101
        from ♥:0

After moving show methods to module Container it works fine:

irb(main):004:0> ie.frame('Main').show_frames
there are 6 frames
frame index: 1 name: navigator
frame index: 2 name: cookies
frame index: 3 name: Header
frame index: 4 name: workarea
frame index: 5 name: IFSCommArea
frame index: 6 name: toolbar

 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 19/May/06 11:56 PM
I'm confused by the report. I'm not aware that Frames#show_frames was ever implemented. Did you see this working in a previous version? Which one?

In any case, we have stopped maintaining the various show_* methods and instead are urging use of the ElementCollections#show methods. E.g use ie.links.show instead of ie.show_links.

That means that the preferred solution is to create a collections class for Frames. This may not be able to be a simple subclass of ElementCollections like the others, however, since frames are different in many ways.

One advantage of these show methods is that they have standard interfaces for configuring their format. Also, because they use well-tested collections objects, they tend to be more reliable. (Many of our show_* methods throw exceptions under particular circumstances.)