Re: [Wtr-general] hi, not able to use assert
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
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 # (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=6352&messageID=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
Usually people use assertions inside test cases. There are plenty of examples in the watir "examples" directory in the "bonus file" that show you how to do this. It is also possible to use assertions outside test cases. In that case you also need this line of code: require 'test/unit/assertions' I'm sorry to hear that this did not work for you. I can't think of any other advice. My apologies. Bret - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=18011#18011 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] hi, not able to use assert
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
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=6352&messageID=17988#17988 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] hi, not able to use assert
add this line: require 'test/unit/assertions' - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=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
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
[Wtr-general] hi, not able to use assert
hi, I am not able to use assert method . i tried the following code but its giving an error require 'watir' include Watir require 'test/unit' ie = IE.new ie.goto("www.google.com") assert( ie.contains_text('Welcome to your Google homepage') ) and the error i got is test.rb:6: undefined method `assert' for # (NoMethodError) please help me out thank you, Maloy - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=17909#17909 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general