[wtr-general] Re: Converting Watir::Waiter.wait_until to element.wait_until
Yes, you're correct it's Watir::Wait.until and Watir::Wait.while. Sorry for my mistake. Jarmo On Nov 20, 2:39 am, Ning Cao n...@adready.com wrote: I found you have to use Watir::Wait.until instead of Watir::Wait.wait_until, maybe it's a type in the code? -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Jarmo Pertman Sent: Friday, November 19, 2010 12:44 PM To: Watir General Subject: [wtr-general] Re: Converting Watir::Waiter.wait_until to element.wait_until Hi! First, please note that #wait_until_present is not the same as wait_until #exists? because #present? does mean that the link has to #exist? AND has to be #visible?. But i guess that doesn't matter most of the time. Depending of what you're doing with that link later on i'd recommend even easier way of using #when_present: $browser.link(:i, checkNode).when_present.click # or whatever you're going to do when the link exists and is visible... The second one would be: Watir::Wait.wait_until {{$browser.image(:id, nodeID[i][0]).src != images/wait18.gif} So, the most easiest fix to hide all deprecation warnings would do one global search replace of Watir::Waiter to Watir::Wait and you're done. Those #when_present, #wait_until_present and #wait_while_present methods are added just for convenience. Jarmo Pertman - IT does really matter -http://www.itreallymatters.net On Nov 19, 7:34 am, Alastair Montgomery doodl...@gmail.com wrote: Hi, I've just updated the Watir install at our Indian site to 1.6.7 and started seeing the messages about Watir::Waiter being deprecated. I've been able to convert the following format lines from Watir::Waiter.wait_until {$browser.link(:id,checkNode).exists?} to $browser.link(:id,checkNode).wait_until_present But my brain is drawing a blank with this line, Watir::Waiter.wait_until {$browser.image(:id, nodeID[i][0]).src != images/wait18.gif} I couldn't find the new methods on the API docs, maybe it is the jet lag catching up on me. Can you point me at examples or how the above line checking the image source URL would work in the new format? Thank you. Alastair -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-gene...@googlegroups.comhttp://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Watir doesn't wait for redirect to complete on IE6
what kind of redirect is this? meta refresh? On Tue, Nov 16, 2010 at 10:06 AM, dimovich dimov...@gmail.com wrote: It's basically: ie.goto 'page that redirects' ie.link(:id, 'MyLink').click On IE8 the 'click' call will fail because Watir cannot find the link (redirect hasn't finished yet so this is expected). On IE8 everything works just fine. On Nov 16, 1:12 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Nov 16, 2010 at 12:05 PM, dimovich dimov...@gmail.com wrote: On IE6 when requesting a page that redirects Watir will return imediately. On IE8 Watir will wait for redirect to complete. Did anybody else bump into this? Please show us the code. So, it works manually, but not from a Watir script? Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Please help me with watir-ruby script
can you go through the unit tests for clicking javascript pop ups in firefox. It should be in [watir installation directory]/firewatir/unittests or something like this. - Angrez On Tue, Nov 16, 2010 at 6:26 PM, robin dsouza robin.so...@gmail.com wrote: I used this function def startClicker( button , waitTime = 3) w = WinClicker.new longName = ie.dir.gsub(/ , \\ ) shortName = w.getShortFileName(longName) c = start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button }#{ waitTime} puts Starting #{c} w.winsystem(c ) w=nil end and called the function when pop up was appeared startClicker(OK) which did not work.. it gave a error as C:/Rubyscripts/new/RegistrationFatcowIE_priya.rb:16:in `startClicker': uninitialized constant WinClicker (NameError) Do i have use different require for WinClicker for FireFox? On Tue, Nov 16, 2010 at 6:11 PM, Basim Baassiri ba...@baassiri.ca wrote: without any code that you've written or html, no one in this forum will be able to help other than refer you to the documentation http://watir.com/documentation/ On Tue, Nov 16, 2010 at 7:28 AM, Robin D'Souza robin.so...@gmail.comwrote: Please help me with code for javascript pop up confirmation box for Fire Fox to click OK button -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com