I'm running Watir 1.4.1 (from Windows Installer) and Ruby 1.8.4-16 on my main machine.

I copied your iframe_nested.html files into my "C:\Scripts\1.4.1\unittests\html" folder, and renamed your rb file to "frame_test_Ethan.rb" and placed it in my unittests folder.

To begin with, I re-ran the standard 'frame-test.rb' file and it ran without error. (as expected)
Then I ran your rb file and I got several Failures, but no UnknownObjectExceptions errors.  I got four very specific test failures:

(1) test_normal_frame_text_link_clicks(TC_NestedIFrames) : Link in normal Frame using text failed to click.
(2) test_normal_frame_id_link_clicks(TC_NestedIFrames) : Link in normal Frame using id failed to click.
(3) test_nested_iframe_text_link_clicks(TC_NestedIFrames) : Link in nested iFrame using text failed to click.
(4) test_nested_iframe_id_link_clicks(TC_NestedIFrames) : Link in nested iFrame using id failed to click.

I found these errors weird, because if I use IRB, I can interact with these links without error.  So I decided to try a variation of your script code to see what happens.

I copied your tests and took out the assert part.  That is, there are now test pairs like this:

    # Test to click the link
    def test_nested_iframe_text_link_clicks1
            $ie.frame("testFrame1").frame("linksFrame").link(:text, "test1").click
    end
   
    # Test that expected nested iFrame contains link using text.
    def test_nested_iframe_text_link_clicks2
            assert($ie.frame("testFrame1").frame("linksFrame").link(:text, "test1").click, "Link in nested iFrame using text failed to click.")
    end

--> Now when I run the script again, the first test passes but the second one fails with the following error:

  2) Failure:
test_nested_iframe_text_link_clicks2(TC_NestedIFrames) [frame_test_Ethan.rb:172]:
Link in nested iFrame using text failed to click.
<nil> is not true.

--> I would suggest a different assert command, but either way I'm not getting the same errors you are.  I am able to work with links in frames and nested frames as I would expect to.

Paul C.


On 24/10/06, Ethan Jewett <[EMAIL PROTECTED]> wrote:
Bug submitted, but the situation gets curiouser and curiouser.  My
unit test seem to indicate that I can't .click links in any frame.  I
can't imagine that no one else has had this problem, so I have to
assume that it's relatively unique to my setup.

The bug report is bug 113, link: http://jira.openqa.org/browse/WTR-113

I've attached a modified frame_test.rb and the necessary .html files,
so if someone feels like taking a minute to test, that would be
appreciated.

I will continue investigate further and attempt to determine whether
this shows up in Watir 1.5.

Ethan

On 10/23/06, Bret Pettichord <[EMAIL PROTECTED] > wrote:
> Ethan Jewett wrote:
> > These commands fail with the UnknownObjectExceptions:
> > $ie.frame("buttonFrame").frame("linksFrame").link(:text, "test1").click
> > $ie.frame("buttonFrame").frame("linksFrame").link(:id, "link_id").click
> >
> > Is this a known issue?  I don't see it in the OpenQA database as far
> > as I can tell.  I'll clean up my tests and send a modified frames unit
> > test and the necessary HTML files if that is desired.
> >
> This sounds like a new problem. Please open a new bug report for it.
> Does this happen in Watir 1.5?

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to