Re: [Wtr-general] www.croczilla.com/jssh is down what does it mean ?

2006-12-19 Thread Dave Hoover
  What does it mean for SafariWatir ?

 My understanding is that SafariWatir is Dave Hoover's project at
 http://safariwatir.rubyforge.org/ which is completely separate from
 Angrez's work, so there should be no implication for SafariWatir
 either.

That is correct.  SafariWatir is alive and well.  SafariWatir has no
dependency on JSSh or FireWatir, it uses the rb-appscript Apple event
bridge to inject JavaScript into Safari to work its magic.

I just spoke with Angrez a few days ago, helping him test a FireWatir
gem on my Mac.  As far as I know, he's still working on it.

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


[Wtr-general] SafariWatir 0.2.0

2006-12-04 Thread Dave Hoover
SafariWatir (http://safariwatir.rubyforge.org/) has been updated to
use the rb-appscript project (http://rb-appscript.rubyforge.org/)
rather than depending on AppleScript to do it's dirty work.  This has
improved performance dramatically.

You can watch SafariWatir executing its test suite in this screencast:
http://safariwatir.rubyforge.org/safariwatir_script_0.2.0.mov

Here's the test suite source:
http://rubyforge.org/viewvc/trunk/safariwatir_script.rb?revision=25root=safariwatirview=markup

Dave Hoover
http://redsquirrel.com/dave/
http://obtiva.com/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Watir on Rails

2006-09-07 Thread Dave Hoover
I have just released a Ruby on Rails Plugin that allows for easy Watir
testing in Rails.  To install the plugin in your Rails project,
execute

  ./script/plugin install svn://rubyforge.org/var/svn/watir-on-rails

You can then use the generator to get you started on writing your
first Watir on Rails test...

  ./script/generate watir SuccessfulLogin

Your Watir tests will live in test/watir and can be executed from Rake
like this...

  rake test:watir

In your Watir tests you will have access to all the standard Rails
testing conveniences, such as fixtures and ActiveRecord APIs.

More information can be found at http://watir-on-rails.rubyforge.org/

Watir on Rails supports both Watir::IE and Watir::Safari.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir on Rails

2006-09-07 Thread Dave Hoover
You need to ensure that the web server is running in test mode.

On 9/7/06, David Schmidt [EMAIL PROTECTED] wrote:
 Dave,

 Very nice!

 I notice that your example at http://watir-on-rails.rubyforge.org/ tests
 the URL for the local development Rails app on the default port
 (http://localhost:3000/).  Does your plugin start the web server when
 you do the rake test:watir or do you have to ensure that the web
 server is already running?

 David Schmidt

 Dave Hoover wrote:
  I have just released a Ruby on Rails Plugin that allows for easy Watir
  testing in Rails.  To install the plugin in your Rails project,
  execute
 
./script/plugin install svn://rubyforge.org/var/svn/watir-on-rails
 
  You can then use the generator to get you started on writing your
  first Watir on Rails test...
 
./script/generate watir SuccessfulLogin
 
  Your Watir tests will live in test/watir and can be executed from Rake
  like this...
 
rake test:watir
 
  In your Watir tests you will have access to all the standard Rails
  testing conveniences, such as fixtures and ActiveRecord APIs.
 
  More information can be found at http://watir-on-rails.rubyforge.org/
 
  Watir on Rails supports both Watir::IE and Watir::Safari.
 
 ___
 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] method which contains array as the parameter

2006-08-21 Thread Dave Hoover
On 8/21/06, sikander [EMAIL PROTECTED] wrote:
 this method is restricted to check for only 3 specific links. But I want to
 define array[] as the parameter, and I want to pass any number of links and
 verify it.

This should do it...

def run_check_links(ieHelper, *arrayText)
  for text in arrayText
assert(ieHelper.link(:text, text.exists?)
assert(ieHelper.link(:text, text.enabled?)
assert_equal(link,ieHelper.link(:text, text.type )
  end
end
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Submitting a form with multiple submit buttons

2006-08-21 Thread Dave Hoover
On 8/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I have a form with two submit buttons:

 input type=submit value=Cancel \
 input type=submit value=Save \

 I can't seem to access these with the Watir Button class and if I use
 form.submit, it always executes the 'Cancel' command above.

  Any ideas?

Show us the code that you're using to access the buttons.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] contains_text with regular expression

2006-08-20 Thread Dave Hoover
On 8/20/06, sikander [EMAIL PROTECTED] wrote:
 assert($ie.contains_text(/Search/).exists?)

Get rid of the .exists? and it should work fine.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] contains_text not giving match when the requested tags are in frames instead of main html body

2006-08-19 Thread Dave Hoover
On 8/19/06, Manish Sapariya [EMAIL PROTECTED] wrote:
 ie.contains_text(admin) returns me nil.

 Does watir support contains_text within frame as well?

Yes, but you need to specify the frame like this...
  ie.frame(:name, foo).contains_text(bar)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] get the meta tag out of a page

2006-08-19 Thread Dave Hoover
On 8/19/06, Charley Baker [EMAIL PROTECTED] wrote:
 Watir deals with the html of the page, not the http headers. I'm not sure
 what the hard way is that you're dealing with currently, but you can access
 most of this information through ruby's net libraries:

He's not talking about HTTP headers, he's talking about meta tags
that are up in the head of the page.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Reading XML using watir/ruby

2006-08-17 Thread Dave Hoover
On 8/17/06, Chintakrindi Meghanath
[EMAIL PROTECTED] wrote:
 Can anyone tell me, how to read XML file using watir/ruby ?

Here one way to interact with XML in Ruby:
http://www.germane-software.com/software/rexml/docs/tutorial.html
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Using regular expressions in Watir

2006-08-15 Thread Dave Hoover
On 8/15/06, Astha Raj [EMAIL PROTECTED] wrote:
 What I need do to
 only look for the string which ends with the given section. For example, I
 have two form fields with id like

 FormName_Name1 and FormName_Name1New

 So when I use the Watir statement like –
 e.text_field(:id,/_Name1/).set(astharaj) – it will put the same in both –
 right? I want it to just set for first field (FormName_Name1). How can I do
 this? Any suggestions would be great.

Use the \A and \Z anchors to match the beginning and end of strings,
respectively.  I believe the answer to your question is

  e.text_field(:id, /_Name1\Z/).set(astharaj)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Search through WATIR mailing archive

2006-08-13 Thread Dave Hoover
On 8/13/06, jadzien caruthas [EMAIL PROTECTED] wrote:
 Hi all, am looking for a way to search through the mail archive of this news
 group so i wont be asking a question that has already been asked.

Try the following in Google:
  site:rubyforge.org [Wtr-general] your search

via http://justinram.wordpress.com/2006/02/27/searching-google-for-watir-help/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general



Re: [Wtr-general] not exactly watir but a ruby question

2006-08-11 Thread Dave Hoover
On 8/11/06, Manish Sapariya [EMAIL PROTECTED] wrote:
 Hi,
 How do break out of x.times loop.

Here's one answer to your question...
http://permalink.gmane.org/gmane.comp.lang.ruby.general/21817
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] SafariWatir 0.1.0

2006-07-21 Thread Dave Hoover
Announcment: 
http://redsquirrel.com/cgi-bin/dave/projects/watir/safari.watir.0.1.0.html

Installation:  gem install safariwatir

Home Page: http://safariwatir.rubyforge.org/

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


Re: [Wtr-general] FireWatir deserves its own project

2006-07-13 Thread Dave Hoover
 But the bigger issue of ensuring compatability between versions of Watir is
 tricky. For example, FireWatir doesn't support frames. Is this reasonable?

I suppose that is up to whatever minimum standard is used to determine
whether an API is sufficiently compatible or not.  I like the idea of
having a test suite that determines whether the API has met the
standard ... and I suggest the suite be named Poseidon (god of
wat[i]r).

 And even then, i suspect that each implementation would have some additional
 features that were not part of the standard API.

No doubt.  For example, SafariWatir has close and quit methods.  One
closes the window, while the other quits the application.  Another
example: SafariWatir has an alert method that returns an AlertWindow
that has a click method.  :-)

 This suggests that each implementation also should have a
 strict mode where it only allows execution against the core API or least
 creates warnings for all other uses. This way, users (or their managers)
 could make sure their tests were portable. Otherwise they wouldn't know
 until they tried.

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


Re: [Wtr-general] FireWatir deserves its own project

2006-07-13 Thread Dave Hoover
On 7/13/06, Bret Pettichord [EMAIL PROTECTED] wrote:
 With mine this is how you click an alert button:

 ie.dialog.button(OK).click

For clarification, this is how you click an alert button with SafariWatir:

browser.alert.click

It doesn't take a parameter since alert boxes only have one button.
There would be a separate method for confirm boxes:

browser.confirm(OK).click
browser.confirm(Cancel).click

Like Bret, I have no emotional attachment.  Just looking to fit in
with the rest of the API.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] FireWatir deserves its own project

2006-07-12 Thread Dave Hoover
On 7/12/06, Bret Pettichord [EMAIL PROTECTED] wrote:
 But what FireWatir needs is more experimentation, and that means that it
 needs to be developed according to different development rules from Watir. I
 am happy to consult, and to hear any ideas about how it might develop
 differently, but i think it is time for it to spread its wings, and am not
 so sure that it wouldn't even be best if there were a couple active versions
 of Ruby/FireFox drivers, free to share code and ideas between them, but with
 out too much worry about consistency and agreement.

It's probably too obvious to mention, but since I am the master of all
things obvious, I will:  let's make sure that every driver conforms to
as much as the Watir API as is reasonable.  Ultimately, if we can have
more than one driver then we should be able to use the same Watir
scripts regardless of which browser/OS we're on.

BTW, I just started the SafariWatir project on RubyForge:
http://rubyforge.org/projects/safariwatir/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir ran on Linux Fedora Core 5

2006-07-11 Thread Dave Hoover
Angrez said:
 So theoretically it is possible to run FireWatir on any platform. The only
 problem is what you are facing right now i.e. how to click the dialog boxes
 on that particular platform? Once we find solution to this, WATiR can be
 made a multi-platform testing tool.

Speaking of multi-platform, I've made some good progress on
SafariWatir.  Anyone interested in helping out with this?  I'm using
Applescript's do JavaScript method to make it work.

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


Re: [Wtr-general] assert_arrayEquals

2006-07-11 Thread Dave Hoover
On 7/11/06, Chris McMahon [EMAIL PROTECTED] wrote:
 You could write your own, but the coolest way I know to do this is like

 require 'test/unit'

 class Foo  Test::Unit::TestCase
   def test_foo
 array_1 = [1,2,3]
 array_2 = [1,2,3]

 assert_equal(array_1 - array_2 ,[])

That doesn't quite cut it.  Check this out...

irb(main):001:0 a = [1, 2]
= [1, 2]
irb(main):002:0 b = [1, 2, 3]
= [1, 2, 3]
irb(main):003:0 a - b
= []
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] FireWatir on Intel Mac

2006-06-27 Thread Dave Hoover
I gave a talk on Acceptance Testing at RailsConf yesterday, showcasing
Watir, Selenium, and Sahi.  Since I have a MacBook Pro (and I hadn't
installed Parallels/WinXP yet), I wanted to show off FireWatir.  Alas,
it appears that the JSSH XPI that FireWatir relies upon doesn't work
on Mac Firefox.  Dave Liebreich from Mozilla was able to get me a
Firefox + JSSH build and Chris McMahon was able to get me the latest
Watir source built into a gem (can't do that w/o Windows currently),
and then I had to comment out any win32 stuff that Watir does when it
is require'd, and voila, FireWatir on the Mac.  It still suffers from
insanely slow performace, but it's a start.

Dave is still working on getting the JSSH XPI for the Mac working, but
until then, he has graciously hosted an Intel-only Firefox+JSSH binary
here: http://people.mozilla.org/~davel/jssh/
More info here: http://www.daveliebreich.com/blog/?page_id=6
Once he gets the XPI working, he will likely take down the Firefox binary.

Thank you everyone working on (Fire)Watir, it's a great tool, and I
hope that more work can be done to bring it onto the other browsers.

Dave Hoover
http://redsquirrel.com/dave/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general