From: sachin.s32@... Date: 2012-12-05T18:44:23+09:00 Subject: Re: Unable to run the program. --_000_E2B9FE7E3901E44BADC44CED1F5A916668776D60BLRECMBX5wiproc_ Content-Type: text/plain; charset="us-ascii" content-transfer-encoding: quoted-printable Thanks Ralf.. Its working now after changing the name of "def search to def= test_search". But want to know why def search didn't work previously. From: Ralf Mueller [mailto:ralf.mueller@zmaw.de] Sent: Wednesday, December 05, 2012 12:49 PM To: ruby-talk ML Subject: Re: Unable to run the program. On 12/05/2012 07:33 AM, sachin.s32@wipro.com wr= ote: Hey all, I am novice into the world of ruby and trying to do a simple search with the= below program, but I am unable to run and no error is thrown. Can somebody= help me where I am going wrong? require 'watir' include Watir require 'test/unit' class Test_google_Search < Test::Unit::TestCase def search test_site =3D 'http://www.google.com' $ie =3D IE.new $ie.goto(test_site) $ie.text_field(:name, "q").set("pickaxe") $ie.button(:name, "btnG").click assert($ie.contains_text("Programming Ruby") ) end end you just defined a class, no operation is performed here. In this special case, it's a child of Test::Unit, so you could run it with ruby this_file.rb or ruby this_file.rb --name=3Dtest_search if you rename search to test_search regards ralf Please do not print this email unless it is absolutely necessary. =0A= =0A= The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may= contain proprietary, confidential or privileged information. If you are not= the intended recipient, you should not disseminate, distribute or copy this= e-mail. Please notify the sender immediately and destroy all copies of this= message and any attachments. =0A= =0A= WARNING: Computer viruses can be transmitted via email. The recipient should= check this email and any attachments for the presence of viruses. The compa= ny accepts no liability for any damage caused by any virus transmitted by th= is email. =0A= =0A= www.wipro.com --_000_E2B9FE7E3901E44BADC44CED1F5A916668776D60BLRECMBX5wiproc_ Content-Type: text/html; charset="us-ascii" content-transfer-encoding: quoted-printable

Thanks Ralf.. Its worki= ng now after changing the name of “def search to def test_search”= ;.

 

But want to know why de= f search didn’t work previously.

 

 

From: Ralf Mueller [mailto:ralf.mueller@zmaw.de]
Sent: Wednesday, December 05, 2012 12:49 PM
To: ruby-talk ML
Subject: Re: Unable to run the program.

 

On 12/05/2012 07:33 AM, sachin.s32@wipro.com wrote:

Hey all,

 

I am novice into the world of ruby and trying to do a= simple search with the below program, but I am unable to run and no error i= s thrown. Can somebody help me where I am going wrong?

 

require 'watir'

include Watir

 

require 'test/unit'

 

class Test_google_Search < Test::Unit::TestCase

 

  def search

 

    test_site =3D 'http://www.google.com'

         = ;      

         = ;       $ie =3D IE.new

         = ;      

         = ;       $ie.goto(test_site)

         = ;      

         = ;       $ie.text_field(:name, "q").s= et("pickaxe")

         = ;       $ie.button(:name, "btnG").cl= ick

         = ;      

         = ;       assert($ie.contains_text("Program= ming Ruby") )

         = ;      

  end

 

end

 

 

 

you just defined a class, no operation= is performed here.
In this special case, it's a child of Test::Unit, so you could run it with
ruby this_file.rb
or
ruby this_file.rb --name=3Dtest_search

if you rename search to test_search

regards
ralf

Please do not print this email unl= ess it is absolutely necessary.

=0A= =0A= =0A=

The information contained in this electronic message and any attachments= to this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you are= not the intended recipient, you should not disseminate, distribute or copy= this e-mail. Please notify the sender immediately and destroy all copies of= this message and any attachments.

=0A= =0A=

WARNING: Computer viruses can be transmitted via email. The recipient sho= uld check this email and any attachments for the presence of viruses. The co= mpany accepts no liability for any damage caused by any virus transmitted by= this email.

=0A=

=0A= www.wipro.com=0A=

--_000_E2B9FE7E3901E44BADC44CED1F5A916668776D60BLRECMBX5wiproc_--