This... NameError: uninitialized constant Windows::API::Error Or this... irb(main):009:0> Watir::IE.new.goto 'google.com' NoMethodError: undefined method `goto' for #<Watir::IE:0x32e108c> I reinstalled Windows about 4 hours ago. I installed the network card drivers and Ruby via the one-click installer. I then installed the Watir gem. The above error messages are all I'm getting when attempting to use it. I am running as the administrator on this machine. I have registered the AutoIt file manually. Any ideas? Google turns up _nothing_ related specifically to these issues. Surely I cannot be the only person who has encountered this.
on 2009-02-05 07:32
on 2009-02-05 18:04
I am having this exact same problem, and it just started yesterday. I don't know if this is some kind of crazy coincidence or what the heck is going on. It's really weird because I ran Watir scripts earlier in the day yesterday, and now they just don't work. Unfortunately I have no idea what the cause might be, but I have a thread about this started in the Watir group over in google groups. I will post back here if they have any insight into this.
on 2009-02-05 18:27
Charley Baker (Watir lead developer) had the solution to this in the Watir group. It appears that the win32utils libraries had a compatibility issue. The solution is just to update the libraries with this: gem install windows-pr If you are not a member of the Watir group, I highly recommend joining: http://groups.google.com/group/watir-general?hl=en
on 2009-02-05 19:20
Brian Tomlin wrote: > gem install windows-pr That helped. But now I am seeing this... C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/m odule/introspection.rb:70:in `const_get': no such file to load -- safariwatir (M issingSourceFile) On a whim I tried gem install safariwatir and get... Building native extensions. This could take a while... ERROR: Error installing safariwatir: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb install safariwatir create C:/Ruby/lib/ruby/gems/1.8/gems/rb-appscript-0.5.1/src/osx_ruby.h ... create C:/Ruby/lib/ruby/gems/1.8/gems/rb-appscript-0.5.1/src/osx_intern.h ... creating Makefile nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. ... Really? I'm on Windows. I don't have make. Ugh... This gem USED to work just fine.
on 2009-02-05 19:35
Daniel, I think you and I are leading parallel lives. I saw the same thing in a script I had that was something like this: require 'rubygems' require 'watir' ie = IE.new It used to work, but for some reason to get it to work now I had to change the last line to: ie = Watir::IE.new I hope this works for you.
on 2009-02-05 23:51
Brian Tomlin wrote: > Daniel, I think you and I are leading parallel lives. I saw the same > thing in a script I had that was something like this: > > require 'rubygems' > require 'watir' > > ie = IE.new > > > It used to work, but for some reason to get it to work now I had to > change the last line to: > > ie = Watir::IE.new > > > I hope this works for you. I've always used Watir::IE.start(string). Currently, this is working, but calling... browser = Watir::IE.start(uri) browser.text_field(:id, text_field_id) Is raising: uninitialized constant Watir::InputElementLocator::MissingWayOfFindingObject Exception Did they change the API and not tell anyone? As far as I can tell via the cheatsheet (http://secretgeek.net/watir_cheatsheet.asp) they haven't. What gives?
on 2009-02-06 00:12
That should work as far as I know. You might want to post this question on the Watir group along with the html of the element you are trying to access.
on 2009-02-06 00:49
May I humbly suggest that we use another adverb? It is difficult enough being born with a cognitive development handicap about which neither you nor anyone else can do much. It made much harder when society in general uses words describing you in ways suggesting that you're undesirable, unwanted, unlike, etc. In the programming/computer world, we have a similar term, but one which has much less of a negative loading - AND we're much more able to cope with any negativity associated with it than are people with cognitive development challenges. That word is nerd. No one ever feels good about being called a nerd. No one ever intends good by using the word (except in humorous settings). So, lest this get too serious (though it IS a serious issue), dare I say that to refer to Watir as "retarded" is a really nerdy thing to do? :) No, I daren't. But...that just might slip out if I allow myself to bumble alone in my native nerdy mindlessness. Oh my...what did I just do? It's so easy, isn't it? No one needs to feel bad, or chastised. I myself once used the "r" word, in front of 150 people. I also never forget having done it. It was utter mindlessness, and I intended no harm (I also apologized in my next sentence), but...it would have been hurtful anyway to anyone affected who heard it. AND it could have provided a bad example, and that's what I'm concerned about here. Use of such unfortunately pejorative terms (and they shouldn't be) really is not tolerable. We all need to be careful, I think. t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << firstname.lastname@example.org >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on 2009-02-06 01:40
Brian Tomlin wrote: > That should work as far as I know. You might want to post this question > on the Watir group along with the html of the element you are trying to > access. Ah... I'm the retard I guess. Brian, your suggestion did work (thank you). In my haste I typed... browser.text_field(:iid, id_string) Catch it? Hehe... That's what I get for being impatient. Oh well, problem solved. Yay for Watir! That said, someone please update the Watir project page! The rdoc documentation is covering 1.5 or something. @Tom: > That word is nerd. No one ever feels good about > being called a nerd. No one ever intends good by > using the word (except in humorous settings). Your writing is collectivist in nature, which I reject wholesale. But this is a forum about Ruby, not philosophy/economics. If you want to talk about such things meet me at http://mises.org/Community/forums/ and I will gladly address your points. My username is angryrabbit. See you there... :)
on 2009-02-06 02:05
Daniel Waite wrote: > drivers and Ruby via the one-click installer. > > I then installed the Watir gem. The above error messages are all I'm > getting when attempting to use it. > > I am running as the administrator on this machine. I have registered the > AutoIt file manually. > > Any ideas? Google turns up _nothing_ related specifically to these > issues. Surely I cannot be the only person who has encountered this. Yep, you want this combination: win32-api 1.3.0 or later windows-api 0.3.0 or later windows-pr 0.9.9 or later Regards, Dan
on 2009-02-06 02:20
Daniel Berger wrote: > Yep, you want this combination: > > win32-api 1.3.0 or later > windows-api 0.3.0 or later > windows-pr 0.9.9 or later Duly noted. Installing Watir installed all those things (plus a few other gems). However, I have two versions of windows-pr: 0.9.3 and 0.9.9. My guess is that Watir installed 0.9.3. Thanks for the summary. :)
on 2009-02-06 08:24
Daniel Waite wrote: > [...] > > @Tom: > >> That word is nerd. No one ever feels good about >> being called a nerd. No one ever intends good by >> using the word (except in humorous settings). >> > > Your writing is collectivist meaning? (I know the word, but your usage seem obscure to me, so I don't understand you.) And in any case, to label something is not to refute an argument. Only reasoning can do that. > in nature, which I reject wholesale. What I was saying, which I'll now put more directly, is that your use of that word is unacceptable in polite and educated society. It hurts people who have already been hurt enough, including some of my clients and a member of my family. I really shouldn't have to tell you this. If someone uses that word as you have ANYWHERE, and their usage goes unchallenged, there is an implicit acceptance of that usage. To regress toward a time when prejudicial speech was far more common than it is today is not OK by me, and I believe I have a lot of company. Your rejection of what I'm trying to tell you is perilously close to gross ignorance. Or maybe you just don't give a damn, in which case the problem is more serious than that of being ignorant. > But > this is a forum about Ruby, not philosophy/economics. What I'm trying to get across to you is neither philosophy nor economics. This IS a forum about Ruby, inhabited by members of the human society, where most of us consider it unacceptable to think, act, or speak in prejudicial ways. You don't get a ticket to act like an imbecile here simply because you program in Ruby - or for any other reason that I can think of. Your use of "retarded" is prejudicial because it is a word with only negative connotations, and it applies to a group of people who are victims of their genetics. If they were a gene pool, use of the word "retarded" would be racism, without question. There was a time in my country (USA) when that was widely acceptable. In my lifetime, this has changed. We're not going back to that former time if I have anything to say about it. My use of the word "imbecile" in a previous paragraph is different. It is NOT used any longer to refer to any class of people (although it was, at one time). Today, it simply means something like "utter fool". It cannot be seen as prejudicial usage. > If you want to > talk about such things meet me at http://mises.org/Community/forums/ and > I will gladly address your points. My username is angryrabbit. See you > there... :) > You've met me here, and here is were the error was made, so here is the appropriate forum. It is not acceptable to me to have your choice of word HERE go without challenge. You made a mistake. I hope you will think it over. You're not the only one inhabiting this planet, or even this forum. Do it again, and I'll challenge you again, because it will still be hurtful, and that's the problem. t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << email@example.com >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on 2009-02-06 08:38
Daniel and other, I should have added - I've said what I think needs to be said about this issue here, and even explained why I said it (the hurtfulness issue, and the issue about the need for the behavior to be challenged in the arena where it occurred). I don't need to speak further about this, as I've done what I felt I needed to do. Respond as you wish; I'll probably not respond myself. Daniel, I have no particular reason to think you're a bad person. That has never been my thought. It was always about a particular verbal behavior that was not OK, and nothing more. It's important that that be made clear. And if you want to backchannel about this, that'd be fine. I'm content at this point to take it off the list. t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << firstname.lastname@example.org >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~