[wtr-general] Re: Differences between watir and watir-webdriver
> > What are you using attach for, since you consider it a deal breaker? I too make heavy use of .attach() in Watir. In fact, all of my tests use it; of which there are hundreds. While window switching does work, it doesn't work (for me) when using test/unit; which I use extensively to run individual tests together with setup and teardown. For example; this won't work... require 'rubygems' require 'watir-webdriver' require 'test/unit' class Sampletest < Test::Unit::TestCase def setup browser = Watir::Browser.new :ie browser.goto "www.google.com" end def test_01_do_stuff # Perform a google search here end def teardown browser.window(:title => "Google").use do browser.window(:title => "Google").close end end end Watir's old method of 'browser = Watir::IE.attach(:title, "Google")' would work perfectly in the teardown; but not in watir-webdriver, as 'browser' is not a defined variable. I'm new to watir-webdriver, and do see that this is my route forward. So Any pointers here will as always be appreciated. GJHmf -- 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
[wtr-general] Removing reference to an element
Hi Guys, I am using watir-webdriver and as I understand, it stores the reference to an element once it's been defined. So I have this select_list that is disabled. In irb when I do browser.select_list(:how, :what).disabled? => true Then I select some option on the page which fires a Javascript and enables the select_list but when I do browser.select_list(:how, :what).enabled? I still get false as it still holds the reference to the old element and since the page hasn't refreshed it doesn't know its been now enabled by the javascript. Is there a way to delete the old reference Thanks, Rahul -- 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: Differences between watir and watir-webdriver
Here's how I would do this: https://gist.github.com/1711291 -- 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] Removing reference to an element
On Tue, Jan 31, 2012 at 4:55 PM, Rahul Sharma wrote: > > browser.select_list(:how, :what).enabled? I still get false as it > still holds the reference to the old element and since the page hasn't > refreshed it doesn't know its been now enabled by the javascript. > Element references in watir-webdriver are live - if the underlying element changes, so will the return value of #disabled? In any case, calling browserselect_list twice will always relocate the element, so you're not holding on to any reference at all. Without seeing the code (HTML/CSS/JS/Ruby) in question, it's hard to tell why you're running into trouble, but some possible cases: 1. The .select_list call is not finding the element you think it is. 2. The disabled state is changing asynchronously, and you have a race condition. -- 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
[wtr-general] Re: Differences between watir and watir-webdriver
Thanks very much. I've tweaked my actual script accordingly, and that seems to have done the trick. That's the one major hurdle overcome; I'll continue to play and assess watir-webdriver On Jan 31, 3:58 pm, Jari Bakken wrote: > Here's how I would do this: > > https://gist.github.com/1711291 -- 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] problem with radio button after upgrade
Thanks everyone for the links, it's a big help. As usual, I had to switch off to other work, trying to get a big block of time to get back to getting our many scripts to work in the new Watir/Webdriver. One of my coworkers who is new to Watir is helping. The doc will be a big help to us. -- Lisa On Fri, Jan 27, 2012 at 3:44 AM, Jari Bakken wrote: > The watir-webdriver docs can certainly be improved (especially when it > comes to examples), but the standard API docs (for any ruby gem actually) > can be found on rubydoc.info, as Zeljko mentions: > > http://rubydoc.info/github/watir/watir-webdriver/frames > > As for the attribute methods on the element object, those are largely > created through metaprogramming and thus not picked up by the default docs > generator. To generate the *full* set of docs, you can run `rake yard` in a > source checkout (we could perhaps host these ourselves somewhere?). > > Jari > > > On Fri, Jan 27, 2012 at 12:09 AM, Lisa Crispin wrote: > >> The good news is, the syntax you gave me does work. Thank you! >> >> Then I realized this page I found that looks like such nice doc is for >> the old Watir. Does that not exist for Watir 2? This is *really* what I >> need. Something that shows all the possibilities (eg., can use name, id, >> value or whatever), and lots of examples. >> thanks >> Lisa >> >> >> On Thu, Jan 26, 2012 at 4:03 PM, Lisa Crispin wrote: >> >>> OK, and now I see in your email the link to this >>> http://watir.com/support. So I just went there and did a search 'watir >>> radio', and finally found this page, which is what I was looking for: >>> >>> http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html >>> >>> Thank you! >>> -- Lisa >>> >>> >>> On Thu, Jan 26, 2012 at 3:13 PM, Željko Filipin < >>> zeljko.fili...@gmail.com> wrote: >>> On Thu, Jan 26, 2012 at 4:08 PM, Lisa Crispin wrote: > ie.radio(:name, 'rst', '65546').set The new api is: ie.radio(:name => "rst", :value => "65546").set Željko -- 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 >>> >>> >>> >>> -- >>> Lisa Crispin >>> Co-author with Janet Gregory, _Agile Testing: A Practical Guide for >>> Testers and Agile Teams_ (Addison-Wesley 2009) >>> Contributor to _Beautiful Testing_ (O'Reilly 2009) >>> http://lisacrispin.com >>> @lisacrispin on Twitter >>> http://entaggle.com/lisacrispin >>> >>> >> >> >> -- >> Lisa Crispin >> Co-author with Janet Gregory, _Agile Testing: A Practical Guide for >> Testers and Agile Teams_ (Addison-Wesley 2009) >> Contributor to _Beautiful Testing_ (O'Reilly 2009) >> http://lisacrispin.com >> @lisacrispin on Twitter >> http://entaggle.com/lisacrispin >> >> -- >> 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 >> > > -- > 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 > -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com @lisacrispin on Twitter http://entaggle.com/lisacrispin -- 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
[wtr-general] watir-webdriver 0.5.2
More information at http://watir.com/2012/02/01/watir-webdriver-0-5-2/ Željko -- watir.com/book - author -- 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
[wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2
I guess you have a typo there - "Watir::Select#selected_options no longer returns Array, but Array". J. On Wed, Feb 1, 2012 at 7:27 AM, Željko Filipin wrote: > More information at http://watir.com/2012/02/01/watir-webdriver-0-5-2/ > > Željko > -- > watir.com/book - author > > ___ > Wtr-development mailing list > wtr-developm...@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- 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