Re: [Wtr-general] Excel Interface Class

2007-03-05 Thread Paul Carvalho

By any chance, would anyone be interested in writing a hook into Google
Spreadsheets?  I guess you'd sacrifice speed for portability.

Paul C.


On 05/03/07, Paul Rogers <[EMAIL PROTECTED]> wrote:


I use Open Office. Having the Excel reader is handy, but it obviously
doesnt
work for me. I started working on some code that would read open office
spreadhseet files. It would be great if you could make it work on both,
with
the same interface, especially as things like firewatir and safari watir
work well on non windows platforms.

The open office format is an xml file in a zip, and its actually quite
easy
to work with.
I can send you my code if you like

Paul

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

Re: [Wtr-general] How to clear the cache of the browser?

2007-03-05 Thread Paul Rogers
google advanced search lets you pick the domain you want to search on.
You can just delete the files from the file system. There is also some code in 
contrib to remove cookies. You could easily extend that to do all the files.
I always set my browser to 'always get a new page' 
goto Tools menu
Internet options
then on ie 7 click Settings on the Browsing history section
and pick 'Every time I visit the web page'

IE 6 is similar

Paul
  - Original Message - 
  From: swarna latha 
  To: wtr-general@rubyforge.org 
  Sent: Monday, March 05, 2007 8:34 PM
  Subject: [Wtr-general] How to clear the cache of the browser?


  Before launching  a web page , I need to clear the cache / temp files/cookies 
of the browser. How can I do it ? 
  Can we do a keyword based search on the Wtr general archive list? I seem to 
find it a bit difficult to go through archive (2004 to 2007) everytime ...maybe 
I am missing something obvious..

  Thanks for the help.
  Swarna. 





--
  8:00? 8:25? 8:40? Find a flick in no time
  with theYahoo! Search movie showtime shortcut.


--


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

Re: [Wtr-general] Excel Interface Class

2007-03-05 Thread Paul Rogers
I use Open Office. Having the Excel reader is handy, but it obviously doesnt 
work for me. I started working on some code that would read open office 
spreadhseet files. It would be great if you could make it work on both, with 
the same interface, especially as things like firewatir and safari watir 
work well on non windows platforms.

The open office format is an xml file in a zip, and its actually quite easy 
to work with.
I can send you my code if you like

Paul

- Original Message - 
From: "Brown, David" <[EMAIL PROTECTED]>
To: 
Sent: Friday, March 02, 2007 4:47 PM
Subject: [Wtr-general] Excel Interface Class


> I've posted an Excel Interface class which I've developed over the past
> few months on the Watir openqa.org site under contributions:
> http://wiki.openqa.org/display/WTR/Excel+interface+class
>
> This class provides simple methods for reading data records from Excel
> spreadsheets, hides the complexities of directly using ruby's win32ole
> library to interface with Excel, and makes it much easer to create
> data-driven Watir tests.
>
> I hope it will be as useful to others as it has been for me.
>
> -David Brown
> ___
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


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


[Wtr-general] How to clear the cache of the browser?

2007-03-05 Thread swarna latha
Before launching  a web page , I need to clear the cache / temp files/cookies 
of the browser. How can I do it ? 
Can we do a keyword based search on the Wtr general archive list? I seem to 
find it a bit difficult to go through archive (2004 to 2007) everytime ...maybe 
I am missing something obvious..

Thanks for the help.
Swarna.


 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Js popup unit tests

2007-03-05 Thread Carlos.Fernandez
-->  I chaulked this up to the fact that a 1.5.x dev gem has been released
for over a year.

I just discovered the watir forum -- google sure is helpful ;) -- and realized 
the watir v1.4 does not support IE 7.  However, I also had "hang-ups" when I 
ran the watir v1.5 jscript_test.rb.

Carlos

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


Re: [Wtr-general] What is the funtion in Ruby equivalent as strrchrin C

2007-03-05 Thread Jason He
Hi Charley,

 

You gave a convenient way to achieve the goal. 

By the way, I guess a double quote is missing before the last bracket in the 
second line when using expand_path().

 

Thanks very much for your help.

 

Jason

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年3月6日 0:08
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] What is the funtion in Ruby equivalent as strrchrin C

 

There are quite a few ways to do this, here's one using expand_path: 

f = File.dirname(__FILE__)  # get your test directory 
puts File.expand_path("#{f}/..)  # get the directory above your test 
directory 

-Charley 

On 3/5/07, Jason He < [EMAIL PROTECTED]> wrote:

Dear all,

 

I use "example_logger1.rb" and "test_logger1.rb" C:\watir1145\examples\logging 
to logging, but a problem is that the generated log file will under the same 
directory with test cases, 

I want put the generated logs into a separated directory.

 

The code in the "example_logger1.rb" is that,

logger = CoreLogger.new(File.join(File.dirname(__FILE__), 
"#{fileNamePrefix}_#{time}.txt") ,2, 100)

Here the  "File.dirname(__FILE__)" will return the directory who stores test 
cases.

Now I want get the directory upper of the directory of 
"File.dirname(__FILE__)", is there a equivalent function or Regexp in 
Ruby/Watir as strrchr/substr in C to achieve this?

 

Any hint or help is appreciated.

 

Regards,

Jason


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

 

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

Re: [Wtr-general] Calling Definition again!

2007-03-05 Thread sathees
why would some one start a new problem in my thread?

anyone can answer my question please?
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6734&messageID=19563#19563
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Js popup unit tests

2007-03-05 Thread Carlos.Fernandez
installed v1.4.1 via gems.  Installed autoit v3.

When I run the jscript_test.rb I receive IE errors stating that
JavascriptClick.htm cannot be found.  I cannot find that file under
watir v1.4 in my gems dir.  I downloaded it from svn and moved to the
appropriate directory.  Re-ran the tests.  When IE would open a JS popup
. . . Watir would not close it.

I chaulked this up to the fact that a 1.5.x dev gem has been released
for over a year.

I installed the v1.5.1.1158 dev gem.  When I ran the jscript_test.rb . .
. Watir would not close the JS popups.

I suspect that this is a local issue.  Does anyone have any suggestions?

Running xp pro sp2
IE 7 v7.0.5730.11
Ruby 1.8.2

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


Re: [Wtr-general] Excel Interface Class

2007-03-05 Thread Charley Baker

Nice work. I'd highly recommend that as people have examples or snippets,
and perhaps fully working, unit tested libraries as you have, start to post
them on our wiki in the user contribution area.

-c

On 3/2/07, Chris McMahon <[EMAIL PROTECTED]> wrote:


Bravo!
-C

On 3/2/07, Brown, David <[EMAIL PROTECTED]> wrote:
> I've posted an Excel Interface class which I've developed over the past
> few months on the Watir openqa.org site under contributions:
> http://wiki.openqa.org/display/WTR/Excel+interface+class
>
> This class provides simple methods for reading data records from Excel
> spreadsheets, hides the complexities of directly using ruby's win32ole
> library to interface with Excel, and makes it much easer to create
> data-driven Watir tests.
>
> I hope it will be as useful to others as it has been for me.
>
> -David Brown
> ___
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

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

Re: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby

2007-03-05 Thread Charley Baker

Strange, I tried the example from Jonathan Kohl, and it worked fine.

The idea in Ruby is that variables hold references to objects not the
objects themselves similar to Java. If you've worked in c/c++ this will make
more sense, Ruby, Java and some other languages hide the ugliness of this
under the covers. So when you create a variable and assign it to something,
it's holding a pointer to the actual object. When you then assign that to
another variable, you've now got two variables pointed to the same object in
memory.

a = 'foo' # create a variable named a that points to an object somewhere
in memory
b = a # now create b which will point to that same object in memory,
in this case a string object
puts a.object_id
=> object_id whatever
puts b.object_id
=> the same object_id since they both point to the same object in memory

Enumerating through a collection of some sort like an Array, makes it a bit
more confusing. If you end up returning strings, for example, then those are
new objects which won't then hold reference to the original objects in your
collection. Hopefully that makes some sense. :)

-Charley


On 3/5/07, Chris McMahon <[EMAIL PROTECTED]> wrote:


On 3/5/07, vijay <[EMAIL PROTECTED]> wrote:
> Thank you Zeljko Filipin.  That was an useful and an interesting '.pdf'.
>
> Thanks,
> Vijay.

For those interested in both history and the vagaries of OO
programming, the original issue was a problem I stumbled across and
mentioned on the list for people reviewing Brian's book.  It's an
interesting issue, and a good thing to be aware of, if you aren't
already.  For me, it comes up when I work with databases, since what
comes back from Ruby ODBC is almost always an AoA, and that's where I
got into trouble...

#
require 'test/unit'
class TOY_CASE expected but was
<[1, 2, 3]>.

1 tests, 1 assertions, 1 failures, 0 errors
>Exit code: 1

I had to go to the comp.lang.ruby list for an answer.  Even my local
Ruby guru didn't see the problem immediately.

Apparently inside an "each" loop you're only working on a copy of the
item, not the item itself, so to_s isn't actually working on the real
items in the array.

To make this work, you have to use "map":

aoa.each do |arr|
   arr.map! do |item|
   item = item.to_s
   end


Jonathan Kohl mentions an opposite but similar weirdness:

a = %w[a b c]
b = a
b = %w[x y z]
p a
=>
x y z
p b
=>
x y z
when what was expected was this:
p a
=>
["a", "b", "c"]
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

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

[Wtr-general] OT: The original problem. Re: A small doubt in Ruby

2007-03-05 Thread Chris McMahon
On 3/5/07, vijay <[EMAIL PROTECTED]> wrote:
> Thank you Zeljko Filipin.  That was an useful and an interesting '.pdf'.
>
> Thanks,
> Vijay.

For those interested in both history and the vagaries of OO
programming, the original issue was a problem I stumbled across and
mentioned on the list for people reviewing Brian's book.  It's an
interesting issue, and a good thing to be aware of, if you aren't
already.  For me, it comes up when I work with databases, since what
comes back from Ruby ODBC is almost always an AoA, and that's where I
got into trouble...

#
 require 'test/unit'
class TOY_CASE expected but was
<[1, 2, 3]>.

1 tests, 1 assertions, 1 failures, 0 errors
>Exit code: 1

I had to go to the comp.lang.ruby list for an answer.  Even my local
Ruby guru didn't see the problem immediately.

Apparently inside an "each" loop you're only working on a copy of the
item, not the item itself, so to_s isn't actually working on the real
items in the array.

To make this work, you have to use "map":

aoa.each do |arr|
   arr.map! do |item|
   item = item.to_s
   end


Jonathan Kohl mentions an opposite but similar weirdness:

 a = %w[a b c]
 b = a
 b = %w[x y z]
 p a
 =>
 x y z
 p b
 =>
 x y z
when what was expected was this:
 p a
 =>
["a", "b", "c"]
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] What is the funtion in Ruby equivalent as strrchr in C

2007-03-05 Thread Charley Baker

There are quite a few ways to do this, here's one using expand_path:

f = File.dirname(__FILE__)  # get your test directory
puts File.expand_path("#{f}/..)  # get the directory above your test
directory

-Charley

On 3/5/07, Jason He <[EMAIL PROTECTED]> wrote:


 Dear all,



I use "example_logger1.rb" and "test_logger1.rb"
C:\watir1145\examples\logging to logging, but a problem is that the
generated log file will under the same directory with test cases,

I want put the generated logs into a separated directory.



The code in the "example_logger1.rb" is that,

logger = CoreLogger.new(File.join(File.dirname(__FILE__),
"#{fileNamePrefix}_#{time}.txt") ,2, 100)

Here the  "File.dirname(__FILE__)" will return the directory who stores
test cases.

Now I want get the directory upper of the directory of
"File.dirname(__FILE__)", is there a equivalent function or Regexp in
Ruby/Watir as strrchr/substr in C to achieve this?



Any hint or help is appreciated.



Regards,

Jason

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

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

Re: [Wtr-general] Converting into LOG

2007-03-05 Thread Željko Filipin

On 3/5/07, Naga Harish Kanegolla <[EMAIL PROTECTED]> wrote:


But is there a way in watir  to send a mail as an attachment of that log
file ?



There are several Ruby libraries for sending e-mail. I tried the first two,
but the other two could also be useful.

http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html
http://i.loveruby.net/en/projects/tmail/
http://rubyforge.org/projects/rubymail/
http://rubyforge.org/projects/gmailutils/
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Converting into LOG

2007-03-05 Thread Naga Harish Kanegolla
Hi Charley,
   I couldn't download that as its  giving the error 

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

Anyways thanks for the idea, and now i am able to log the output in to a log  
file and everything is working fine,

But is there a way in watir  to send a mail as an attachment of that log file 
?? So that every body can access that,

Thanks in Advance,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6765&messageID=19539#19539
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Calling Definition again!

2007-03-05 Thread Željko Filipin

I do not know why others did not reply, but I do know why I did not reply.
Simply, I do not understand what do you want to do, and I do not understand
what your code does. Try explaining your problem in more detail and try
posting simpler code.
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] What is the funtion in Ruby equivalent as strrchr in C

2007-03-05 Thread Jason He
Dear all,

 

I use "example_logger1.rb" and "test_logger1.rb"
C:\watir1145\examples\logging to logging, but a problem is that the
generated log file will under the same directory with test cases, 

I want put the generated logs into a separated directory.

 

The code in the "example_logger1.rb" is that,

logger = CoreLogger.new(File.join(File.dirname(__FILE__),
"#{fileNamePrefix}_#{time}.txt") ,2, 100)

Here the  "File.dirname(__FILE__)" will return the directory who stores
test cases.

Now I want get the directory upper of the directory of
"File.dirname(__FILE__)", is there a equivalent function or Regexp in
Ruby/Watir as strrchr/substr in C to achieve this?

 

Any hint or help is appreciated.

 

Regards,

Jason

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

Re: [Wtr-general] A small doubt in Ruby

2007-03-05 Thread vijay
Thank you Zeljko Filipin.  That was an useful and an interesting '.pdf'.

Thanks,
Vijay.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6739&messageID=19525#19525
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general