On Saturday, November 4, 2017 at 11:16:43 AM UTC-7, Aqua wrote:
>
> Hi All,
>
> I am new to Watir and Ruby. I am trying to create a Log file to capture 
> log messages to 
> 1. validate successful google search and 
> 2. unsuccessful google search attempt
>
> I am using Eclipse IDE for executing the ruby scripts. Here is the code 
> that I am trying 
>
> require 'watir'
> require 'logger'
>   
>   $log = Logger.new('log.txt')  
>   $browser = Watir::Browser.new :chrome
>   $browser.goto('http://www.google.com')
>   $browser.text_field(:name,'q').set 'Quality Assurance'
>   $browser.button(:name,'btnK').click 
>
>   begin
>     assert($browser.pageContainsText("Quality Assurance"))
>       $log.info("Given search text showed up!")
> rescue
>     $log.error("Given search text did not show up!")   
>   end
>
> The code was running fine before I added the begin.... and ....end blocks. 
> (Also is the log file generated in the Ruby folder by default?)
> Could someone help me out  with this?
> Thanks in advance.
>   
>
> On Tuesday, March 4, 2008 at 10:07:36 PM UTC-8, Prasad wrote:
>>
>> Hi All, 
>>
>>
Please do not play necromancer and raise 9 year old threads from the dead.

The 'logger' gem (from what I can see) appears not to have had any commits 
for a very long time, and is likely not being maintained.   I would 
consider looking at a logging gem that shows signs of more current 
maintenance (and thus by implication, support)    The two most likely 
suspects I see are:
  Logging <https://github.com/TwP/logging>
  Timber <https://github.com/timberio/timber-ruby> 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to