Re: [Wtr-general] hi, not able to use assert

2007-02-03 Thread Bret Pettichord
Maloy kanti debnath wrote:
 require 'watir/assertions.rb'
   
that should be

  require 'watir/assertions'
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] hi, not able to use assert

2007-02-01 Thread carl . l . shaulis




Hi Maloy,

A snippet of code was provided yesterday.  Did you see this code? Does this
code not work?  Do you have questions about the code?  Are you executing
this via IRB or someting like Eclipse?

Have you executed any of the unit tests?  Do the assertions work for the
unit tests?

Thanks,

Carl



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] hi, not able to use assert

2007-02-01 Thread Maloy kanti debnath
hi,
  thanks for your reply. I have used your code but after using it also i got an 
error c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in 
`require__': No such file to load -- /apps/ruby/lib/ruby/1.8/test/unit 
(LoadError).

When I modified your code as the following

require 'watir' 
include Watir
require 'watir/assertions.rb'
@ie = IE.new 
@ie.goto(http://www.google.com;) 
assert(@ie.link(:text, Make Google Your Homepage!).exists?) 
@ie.link(:text, Make Google Your Homepage!).click 

and executed it, the following error occured:


undefined method `assert' for #Object:0x27b9258 (NoMethodError)

I am using the editor which is given by ruby SCiTE.No i have not executed any 
of the unit tests

thank you,
maloy
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6352messageID=18051#18051
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] hi, not able to use assert

2007-01-31 Thread carl . l . shaulis




Good morning:

Perhaps you could try something like this:

#includes:
require 'watir'   # the watir controller
require rexml/document
require date
require '/apps/ruby/lib/ruby/1.8/test/unit'
require '/apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/WindowHelper'
include REXML
include Watir

class Google_Test  Test::Unit::TestCase
include Watir


   def setup
   @ie = IE.new
   @ie.goto(http://www.google.com;)

   end

   def test1
# User clicks on sign in link

assert(@ie.link(:text, Make Google Your Homepage!).exists?)

@ie.link(:text, Make Google Your Homepage!).click


   end
end

Good luck!

Carl





___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] hi, not able to use assert

2007-01-31 Thread Bret Pettichord
add this line:

require 'test/unit/assertions'
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6352messageID=17922#17922
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] hi, not able to use assert

2007-01-31 Thread Maloy kanti debnath
hi,
 i tried adding 
 require 'test/unit/assertions'  in my code but then too its not working 
and is giving the same error can you give me a simple set of code using 
assertions.
It will be really helpfull too me thank you,

thanks
maloy
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6352messageID=17988#17988
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general