Hi,
When I try run any script I still get the following error message:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
from
The error message is saying that it can't find the text field with the
name 'q'. For some reason, it doesn't exist in the browser contained
by your variable ie. Are you sure that your browser is on the page
you think it is?
One way to troubleshoot this is with an irb session. Run your test
Thanks for you input Tiffany but when I run the script and execute in
IRB I get the following error message:
NameError: undefined local variable or method `ie' for main:Object
Is there something I have to set to intialize IE? On what operating
system did you execute the script since I have
When I type the commans into IRB here is was I get as output:
irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1,
Here is an output from IRB when I try to execute script line by line:
irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1,
Are you running your command prompt session with administrator
privileges? I had a problem when I moved to Vista where two browsers
were being opened. Try the suggestions Bill Agee gave me:
http://tinyurl.com/ygn4fpx
Hope this helps!
-Tiffany
On Nov 12, 11:47 am, tester86
Thanks for your help! It turn out that Bill's helped actually helped
me out. I have to run command prompt as administrator. My script is
now running finally after two days of debugging watir.
Thanks for all your help!
On Nov 12, 1:55 pm, Tiffany Fodor tcfo...@comcast.net wrote:
Are you
Bret,
My script is going to the google URL, but for some reason it cannot
find the text box. I have tried all the examples but I get the
following output:
broswer.url
browser.text
script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
(NoMethodError)
same for when I use
I removed include Watir now my script is:
require 'watir'
require 'rubygems'
#require win32ole
ie = Watir::IE.new
ie.goto(http://google.com;)
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click
I still get the same error message. I am using watir 1.4.1. Below is
my ruby version
watir 1.4.1
On Nov 9, 9:46 pm, Bret Pettichord b...@pettichord.com wrote:
What version of Watir are you using?
tester86 wrote:
I am trying to run a watir script:
require 'watir'
include Watir
ie = Watir::IE.new
ie.goto(http://google.com;)
ie.text_field(:name, q).set(watir)
Here is the list of my local gems (just incase its helps)
*** LOCAL GEMS ***
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
builder (2.1.2)
camping (1.5.180)
commonwatir (1.6.2)
cucumber (0.4.3)
diff-lcs (1.1.2)
firewatir (1.6.2)
fxri
In a previous email, you indicate that you're running Watir 1.4.1. But, the
below indicates that you're on 1.6.2.
In any case, I tried running your code and it worked fine. (What happens if
you switch the require 'watir' and require 'rubygems' lines? Could that be
the source of your problem?
On Tue, Nov 10, 2009 at 3:10 PM, tester86 sagar.am...@gmail.com wrote:
watir 1.4.1
Please uninstall it and install watir via gem. Ask if you need help with
that.
Željko
--
watir.com - community manager
watirpodcast.com - host
--~--~-~--~~~---~--~~
You received
This morning I just upgraded to watir 1.6.2 and I also switched the
lines but I still got the same output.
On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
wrote:
In a previous email, you indicate that you're running Watir 1.4.1. But, the
below indicates that you're on 1.6.2.
Previously, I did instal watir via the gem version 1.4.1 then
yesterday I download watir according to some material I found online.
This morning I upgraded to watir 1.6.2. and executed my script again
but I got the same error message. Do you think I should uninstall ruby
and that will remove all
I am wondering if maybe this is a permissions problem. Are you using
Windows 7?
It would help if you printed the error and stack trace that you are now
getting.
Bret
tester86 wrote:
This morning I just upgraded to watir 1.6.2 and I also switched the
lines but I still got the same output.
I do not think that it is a permission an issue and I am using windows
vista but going to be working on windows 7 soon. I do not know how to
get a stack trace from my output. In my previous posts shows the error
message that I get in command prompt.
Question:
1. How do I check my envirnoment
1. How do I check my envirnoment variables for ruby?
This will give you the list (from command line): ruby -e 'puts
global_variables.sort'
This will give you the value for an individual env var: ruby -e 'puts
[env_var]'. For example: ruby - e 'puts $DEBUG'
orde
On Nov 10, 8:47 am, tester86
Not exactly what I had in mind when I mentioned checking the environment
variables.
For Windows:
Control Panel = System = Advanced = Environment Variables.
On Tue, Nov 10, 2009 at 11:06 AM, orde ohil...@gmail.com wrote:
1. How do I check my envirnoment variables for ruby?
This will give
You posted a stack trace earlier. This is displayed after the error
message. If you are still getting exactly the same stack trace, then you
are still using the old version of watir. A new version of watir will
result in a somewhat different stack trace.
You can type set at a command prompt
Thanks for all the help I managed to get ruby and watir all up and
running. But I have a question, when I was using cucumber I get this
error message and they told me to put this post in the watir group:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists':
My guess is that the browser is not actually on the google page at this
point. You could use statements like this to help troubleshoot:
puts browser.text
puts browser.url
puts browser.title
Bret
tester86 wrote:
Thanks for all the help I managed to get ruby and watir all up and
Per http://wiki.openqa.org/display/WTR/include+Watir
Don't use 'include'
On Mon, Nov 9, 2009 at 3:49 PM, tester86 sagar.am...@gmail.com wrote:
I am trying to run a watir script:
require 'watir'
include Watir
ie = Watir::IE.new
ie.goto(http://google.com;)
ie.text_field(:name,
What version of Watir are you using?
tester86 wrote:
I am trying to run a watir script:
require 'watir'
include Watir
ie = Watir::IE.new
ie.goto(http://google.com;)
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).submit
when I run it from command line ruby filename.rb I get
Hi,
Add first line -- require 'rubygems'
Remove line no.2 -- include Watir
I hope it works now. If its not working then Please provide more details
about Watir Verison and Ruby version.
Thanks
On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:
I am trying to run a watir
25 matches
Mail list logo