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

Key: WET-162
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Raghu Venkataramana
Reporter: Venugopal S Shenoy
Votes: 0
Watchers: 0
Operations

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

Cannot access a Frame Object contained within a IFrame

Created: 13/Aug/06 10:52 AM   Updated: 18/Jun/07 10:27 AM
Component/s: Native watir object model
Affects Version/s: 0.9.8_beta1
Fix Version/s: 1.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Browser("title:=Untitled Page").IFrame("index:=1").Frame("index:=1") returns the error
undefined method `Frame' for #<WET::WebIFrame:0x2d24578> (NoMethodError)

But in the Browser Tree of 0.9.8, the tree shows the frames within the IFrame, but the checkbox object within the Frame is shown as by giving the description only of the IFrame and not the Frame.

Browser("title:=Untitled Page").IFrame("id:=outer").Checkbox("label:=CheckBoxText").set()

though the checkbox is contained within the Frame, the Frame object is not shown

 All   Comments   Work Log   Change History      Sort Order:
Venugopal S Shenoy - 14/Aug/06 02:06 AM
# The following script is run by opening a browser, which has an IFrame and within the IFrame,
# the existence of the objects IFrame, Button, Checkbox, File, Image, Link, List, Radio,
# Textarea, TextField, Table, & Frame is checked using the following code.

require 'WET'
include WET

puts "IFrame ---> #{Browser("title:=Untitled Page").IFrame("index:=1").IFrame("index:=1").exists?()}"
puts "Button ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Button("index:=1").exists?()}"
puts "Checkbox ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Checkbox("index:=1").exists?()}"
puts "File ---> #{Browser("title:=Untitled Page").IFrame("index:=1").File("index:=1").exists?()}"
puts "Image ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Image("index:=1").exists?()}"
puts "Link ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Link("index:=1").exists?()}"
puts "List ---> #{Browser("title:=Untitled Page").IFrame("index:=1").List("index:=1").exists?()}"
puts "Radio ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Radio("index:=1").exists?()}"
puts "Textarea ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Textarea("index:=1").exists?()}"
puts "TextField ---> #{Browser("title:=Untitled Page").IFrame("index:=1").TextField("index:=1").exists?()}"
puts "Table ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Table("index:=1").exists?()}"
puts "Frame ---> #{Browser("title:=Untitled Page").IFrame("index:=1").Frame("index:=1").exists?()}"
#####################################################################################



############### The outputs obtained is as given below ####################
IFrame ---> false
Button ---> false
Checkbox ---> false
File ---> false
Image ---> false
Link ---> false
List ---> false
Radio ---> false
Textarea ---> false
TextField ---> false
Table ---> false
undefined method `Frame' for #<WET::WebIFrame:0x2cf4fc8> (NoMethodError)
####################################################################


Raghu Venkataramana - 21/Aug/06 12:58 PM
Frames, IFrames are better when less used. Frames inside IFrames is something that is important to fix but I would clasify as Major and will move it to 1.0

Venugopal S Shenoy - 20/Sep/06 07:52 AM
I have included the following function Frame(*props) in the "WebIFrame.rb" file at the location "....\ruby\lib\ruby\gems\1.8\gems\wet-web-0.9.1.361-mswin32\qantom\webobjects\.


def Frame(*props)
            return WebFrame.new(self, props)
end

Thereafter I was able to access the Frame Objects within the IFrame. As per my analysis this may NOT impact any other functionality. If no impact is observed, then include these changes in the next build.

Raghu Venkataramana - 18/Apr/07 11:03 PM
Frames within IFrames are are quite complex and are uncommon. Take this off the 1.0 list