I have been using selenium with an application that makes heavy use of IFrame, and the way we have gotten around the issue is by using a custom locator that knows how to recourse over a frame hierarchy looking for an element. We use this locator in tandem with two custom commands, waitForElementPresent and waitForText. This combination allows to simulate Selenium "click and wait" behavior, but on two steps. If you are interested Drew, I can mail you my User extensions file with the locator and commands in it
Ramon Davila -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 3:27 AM To: selenium-users@lists.public.thoughtworks.org Subject: Selenium-users Digest, Vol 10, Issue 2 Send Selenium-users mailing list submissions to selenium-users@lists.public.thoughtworks.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Selenium-users digest..." Today's Topics: 1. Re: Frames(ets) (Drew Cox) 2. cruise control (Jamie Orchard-Hays) 3. Re: cruise control (Greg Fodor) 4. Re: cruise control ([EMAIL PROTECTED]) ---------------------------------------------------------------------- Message: 1 Date: Tue, 2 Aug 2005 15:16:56 -0400 From: Drew Cox <[EMAIL PROTECTED]> Subject: Re: [Selenium-users] Frames(ets) To: selenium-users@lists.public.thoughtworks.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Thanks for the explanation, Jason - that helps a lot. We'll see if we can get something working with that angle. I'll post back to the list if we make any progress. Drew On 8/2/05, Jason R Huggins <[EMAIL PROTECTED]> wrote: > > Hi, Drew, > > Selenium adds "event listeners" on page load events so it knows when > to continue running a test after waiting for a new page to load. > > Selenium would need to add an page load event listener on all nested > frames for this functionality to work. It's not impossible, but it > would take work to dynamically inspect all the frames of a given > application and "tag" them appropriately. > > The same goes for how Selenium finds elements in your application for > clicking, typing into, or verifying.... It expects a document to > manipulate, not a frameset, or mulitple frames to search for elements... > > If code was added to fix the page load event listener issue and the > element location searching issue... Selenium could support frames. > > - Jason > > Drew Cox wrote on 08/02/2005 10:43:33 AM: > > > Does anyone know if there *are* other issues to using frames that > > might not be immediately obvious? Anything that would make it > > particularly difficult? > > > > I'm going to be attempting frame testing today, so I'm guessing > I'll > probably have a better feel for what the challenge is very shortly. > > Any insights would be most appreciated though ;-) > > ------------------------------ Message: 2 Date: Tue, 2 Aug 2005 21:02:23 -0400 From: Jamie Orchard-Hays <[EMAIL PROTECTED]> Subject: [Selenium-users] cruise control To: selenium-users@lists.public.thoughtworks.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I'm curious how any of you have integrated Selenium tests into Cruise Control. regards, Jamie ------------------------------ Message: 3 Date: Tue, 02 Aug 2005 21:48:38 -0400 From: Greg Fodor <[EMAIL PROTECTED]> Subject: Re: [Selenium-users] cruise control To: selenium-users@lists.public.thoughtworks.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed We've done it. It was a little rocky getting it to not freeze up etc (we use the .NET driver with NUnit.) Now that it's all fixed up though, we've had no problems with it and it really helps us catch regressions regularly. To save you some headaches, here's some stuff I suggest you do if you are running it in driven mode off of CC.NET: - Set the browser process priority to below normal in the SetUp of each test, this makes it so your unit test still gets some CPU since selenium pushes the browser up to 99% when it's in its message loop. XPath, etc seem to run faster overall if you do this as well. - Use Browser.Close() at the end of each test to minimize the changes of a rogue test leaving the context of the test in the wrong window, etc. We also had problems when using Browser.Launch(), so make sure you use Browser.Open() instead. - In your build script, make sure you kill any instances of firefox/IE/your browser for Selenium before running the tests, so there is a fresh slate each time. (We use a small program we found on the internet to kill it from the command line) - We've found that a good way to get back exception data, stack traces, etc from Selenium if the web site throws an error is to encode it into the IDs of a few input controls on the page and pull it out and decode it using GetAllFields. This seems to be the only reasonable way to do Browser->Driver communication (as opposed to the normal Driver->Browser communication.) There are a few gotchas, you need to make sure you encode the IDs in such a way that they don't include bad characters such as : and # and you need to break it up until bitesize chunks so selenium can get it back. - Make sure you have a reasonable timeout in cruise control, since often times a failing Selenium test fails because someone forgot to switch the context back from a popup, or there was a bug in their commands being sent. When this happens, the driver will just hang there indefinitely, so you need to be sure you'll get a Build Failed message ASAP. We've never gotten it working with IE, we Selenium test exclusively with FireFox. Hope this helps, -Greg Jamie Orchard-Hays wrote: > I'm curious how any of you have integrated Selenium tests into Cruise > Control. > > regards, > > Jamie > _______________________________________________ > Selenium-users mailing list > Selenium-users@lists.public.thoughtworks.org > http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users > > ------------------------------ Message: 4 Date: Wed, 3 Aug 2005 08:38:10 +0100 From: [EMAIL PROTECTED] Subject: Re: [Selenium-users] cruise control To: selenium-users@lists.public.thoughtworks.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 12980 bytes Desc: not available Url : http://lists.public.thoughtworks.org/pipermail/selenium-users/attachment s/20050803/96e978c6/attachment.jpg -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 118 bytes Desc: not available Url : http://lists.public.thoughtworks.org/pipermail/selenium-users/attachment s/20050803/96e978c6/attachment.gif ------------------------------ _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users End of Selenium-users Digest, Vol 10, Issue 2 ********************************************* _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users