Thanks for sharing this.

On Tue, Feb 16, 2010 at 12:28 AM, Kunal Kumar <[email protected]> wrote:

> Hello,
>
> I had posted my question regarding XPath Support in frame in this group
> before
> (
> http://groups.google.com/group/watir-general/browse_thread/thread/947df24fa1b27f85/e23489b0cd281220?lnk=gst&q=xpath#e23489b0cd281220).
>
>
> The webapps for which I am trying to write watir test scripts contains
> frames and It was critical for me to have xpath support in frame ( as
> elements in frame have generated ids).
>
> I tried my hand in fixing frame class to solve the issue by referring to IE
> class. The solution which I took from IE works pretty well in frame as well
> if the domain of Frame and IE are same ( what I mean is that frame is
> loading content from the same domain ). If the frame domain is different, it
> simply throws up "Access Denied" error.
>
> Few things about the changes
>
> 1) Modified locate function to make this_frame as member variable.
>

I'm confused about this. I don't see any references to it in your code
outside of the method that defines it.


> 2) Added functions html_source, tokenize_tagline, all_tag_attributes,
> element_by_xpath, elements_by_xpath, rexml_document_object,
> create_rexml_document_object, output_rexml_document, xml_escape,
> element_by_absolute_xpath from ie-class and modified accordingly
>
> Probably It would be good to inherit IE class by Frame since most of the
> functionality are same . What do you guys think?
>

The PageContainer module was created as a place to store functionality that
was common to both IE and Frame.

In general, I read your code as a monkey patch, rather than as code changes.
Is this your intention?

Bret

-- 
Bret Pettichord
Lead Developer, Watir, www.watir.com

Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to