Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-11-01 Thread Alister Scott
I've written a blog post on this: http://watirmelon.com/2010/10/31/dismissing-pesky-javascript-dialogs-with-watir/ and updated the wiki: http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Cheers, Alister On Sat, Oct 30, 2010 at 7:52 AM, Alister Scott wrote: > Any ideas why my code won't wor

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Alister Scott
Any ideas why my code won't work in FireWatir? Cheers, Alister. On 30/10/2010, at 6:47 AM, Jari Bakken wrote: watir-webdriver has a decent Ruby API for this as an optional require: http://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/alerts.rb Feel free to use it

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Jari Bakken
watir-webdriver has a decent Ruby API for this as an optional require: http://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/alerts.rb Feel free to use it in Watir. I might change it when WebDriver provides its own solution though. Den 29. okt. 2010 kl. 21:23 skrev B

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Jarmo
Why not add those working methods to that wikipage also? I'd vote to clean up that wikipage since it has a lot of complex and ugly code there. Also, i'm in favor of using the solutions provided by Jari, since javascript dialogs are usually pointless and if you really need to test the existence of

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Bret Pettichord
You can add the technique to this page: http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Bret On Thu, Oct 28, 2010 at 11:42 PM, Alister Scott wrote: > I forgot to mention, I can't get this working in Firefox, only IE at the > moment. > > Cheers, > Alister > > > On Fri, Oct 29, 2010 at 12:1

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Bret Pettichord
Yes, this is what Selenium has done from day one (which is why ThoughtWorkers know about it). It, in fact, is the only way that Selenium can handle these. There are pros and cons to using this technique. But no reason not to share with people. Some testers will be disturbed when they learn it elim

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-29 Thread Alister Scott
I forgot to mention, I can't get this working in Firefox, only IE at the moment. Cheers, Alister On Fri, Oct 29, 2010 at 12:16 PM, Alister Scott wrote: > Hi, > > One of the guys I am working with setting up Cucumber and Watir on a > ThoughtWorks project told me about a way to get rid of the pesk

Re: [Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-28 Thread Jarmo
Jari did something like that in watir-webdriver some time ago with an extension: http://stackoverflow.com/questions/3652582/alert-box-in-waitr-webdriver/3662741#3662741 I don't see any reason why not implement something similar or even the exactly same thing into Watir also. Also, you might not

[Wtr-development] A solution for JavaScript dialogs in Watir

2010-10-28 Thread Alister Scott
Hi, One of the guys I am working with setting up Cucumber and Watir on a ThoughtWorks project told me about a way to get rid of the pesky JavaScript dialogs that cause Watir scripts to be unstable. It involves overriding the JavaScript function to always return true, so the dialogs never appear.