From wayne at larsen.st Sun Feb 25 12:34:25 2007 From: wayne at larsen.st (Wayne Larsen) Date: Sun, 25 Feb 2007 12:34:25 -0500 Subject: [SafariWatir-general] Image support Message-ID: <1F2246A1-12B3-4DC5-A3C9-BC5C2F9DE04C@larsen.st> Hi, I wanted to query for an image to key off of to test for ajax completion, and found that Image wasn't implemented. I hacked in the following 6 lines, that at least lets me key on an image by id, which is sufficient. It would be nice to have support for :src elements though. Since that actually required me understanding how the classes are put together, I punted on it. class Image < ContentElement def tag; "IMG"; end end def image(how, what) Image.new(scripter, how, what) end For what it's worth, I have a set of tests that runs on both safari and internet explorer, so thanks for safariwatir! Cheers, Wayne --- http://waynelarsen.com http://nanoware.com From dave at obtiva.com Mon Feb 26 16:02:38 2007 From: dave at obtiva.com (Dave Hoover) Date: Mon, 26 Feb 2007 15:02:38 -0600 Subject: [SafariWatir-general] Image support In-Reply-To: <1F2246A1-12B3-4DC5-A3C9-BC5C2F9DE04C@larsen.st> References: <1F2246A1-12B3-4DC5-A3C9-BC5C2F9DE04C@larsen.st> Message-ID: <11c8704e0702261302g51a8acb9pbf55303b08dde8f2@mail.gmail.com> Thanks Wayne. I'll incorporate your code and add support for :src lookup ASAP. On 2/25/07, Wayne Larsen wrote: > Hi, > > I wanted to query for an image to key off of to test for ajax > completion, and found that Image wasn't implemented. I hacked in the > following 6 lines, that at least lets me key on an image by id, which > is sufficient. It would be nice to have support for :src elements > though. Since that actually required me understanding how the > classes are put together, I punted on it. > > class Image < ContentElement > def tag; "IMG"; end > end > > def image(how, what) > Image.new(scripter, how, what) > end > > For what it's worth, I have a set of tests that runs on both safari > and internet explorer, so thanks for safariwatir! > > Cheers, > Wayne > > --- > http://waynelarsen.com > http://nanoware.com > > > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > From dave at obtiva.com Tue Feb 27 00:12:10 2007 From: dave at obtiva.com (Dave Hoover) Date: Mon, 26 Feb 2007 23:12:10 -0600 Subject: [SafariWatir-general] Image support In-Reply-To: <11c8704e0702261302g51a8acb9pbf55303b08dde8f2@mail.gmail.com> References: <1F2246A1-12B3-4DC5-A3C9-BC5C2F9DE04C@larsen.st> <11c8704e0702261302g51a8acb9pbf55303b08dde8f2@mail.gmail.com> Message-ID: <11c8704e0702262112n48476f95pbdeec9436567b555@mail.gmail.com> I've just released 0.2.3 with Wayne's code + :src lookup. It should work just like WinWatir ... you either need to provide :src, "http://fully.qualified/image.path" or :src, /justa.snippet/. http://rubyforge.org/frs/?group_id=1912&release_id=9982 Enjoy! --Dave