[wtr-general] Re: watir help

2012-02-01 Thread orde
A couple of piggyback comments on the above.

a) first question about accessing elements in a frame:

browser.frame(:id, "foo").link(:href => /
productpref=catalog/).click# the example frame has no attributes,
so I guess you could use index...

b) lots of javascript in the second example, so you might need to
trigger the event:

browser.link(:id,
"foo").fire_event("onmouseover")#
mouseover is an example event handler

HIH.

orde



On Feb 1, 3:52 pm, Dave McNulla  wrote:
> For the first question, I would try these:
> browser.link(:href => /productpref=catalog/).click
> browser.link(:text => 'catalog').click
>
> For the second question, I would try these:
> browser.link(:text => 'Active').click
> browser.link(:href => /List Catalogs/).click
>
> Of course I wouldn't give up if those did not work, but I would try to
> following identification methods (probably in that order) OR a combination
> of them:
> :href
> :name
> :id
> :text
> :index
> :class
> :html
> :after
> :xpathhttp://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir
>
> Dave

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: watir help

2012-02-01 Thread Dave McNulla
For the first question, I would try these:
browser.link(:href => /productpref=catalog/).click
browser.link(:text => 'catalog').click

For the second question, I would try these:
browser.link(:text => 'Active').click
browser.link(:href => /List Catalogs/).click

Of course I wouldn't give up if those did not work, but I would try to 
following identification methods (probably in that order) OR a combination 
of them:
:href
:name
:id
:text
:index
:class
:html
:after
:xpath
http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir

Dave

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: What Email Provider is best used with Watir?

2012-02-01 Thread Dave McNulla
Watir can automate stuff (even if you aren't testing), but if you just want 
to automate a process with the fewest points of failure, skip the browser 
and go directly to the server. The gems Željko mentioned are great for that.

Dave

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2

2012-02-01 Thread Željko Filipin
On Wed, Feb 1, 2012 at 5:29 PM, Jari Bakken  wrote:
> There's still the issue Jarmo pointed out - "no longer returns Array, but
Array" - e.g. the part about  and  got lost. Feel free to
rephrase that if it's hard to understand (the collection type syntax is
stolen from Yard w/roots in C++/Java).

Argh. Wordpress.com refuses to keep Array even when I wrap it with
 tag.  just dissapears.

I have changed it to: "Watir::Select#selected_options no longer returns
array of strings, but array of Watir::Option objects". Please let me know
if there is a better way to say it.

Željko

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2

2012-02-01 Thread Jari Bakken
There's still the issue Jarmo pointed out - "no longer returns Array, but
Array" - e.g. the part about  and  got lost. Feel free to
rephrase that if it's hard to understand (the collection type syntax is
stolen from Yard w/roots in C++/Java).

On Thu, Feb 2, 2012 at 12:25 AM, Željko Filipin wrote:

> On Wed, Feb 1, 2012 at 5:17 PM, Jari Bakken  wrote:
> > You also link to jarib/watir-webdriver (on both GitHub and Travis),
> which is now changed to watir/watir-webdriver.
>
> Ops. :) I have copy/pasted text from the previous release. Fixed.
> Please let me know if you notice anything else.
>
> Željko
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2

2012-02-01 Thread Željko Filipin
On Wed, Feb 1, 2012 at 5:17 PM, Jari Bakken  wrote:
> You also link to jarib/watir-webdriver (on both GitHub and Travis), which
is now changed to watir/watir-webdriver.

Ops. :) I have copy/pasted text from the previous release. Fixed.
Please let me know if you notice anything else.

Željko

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2

2012-02-01 Thread Jari Bakken
You also link to jarib/watir-webdriver (on both GitHub and Travis), which
is now changed to watir/watir-webdriver.

On Wed, Feb 1, 2012 at 7:11 AM, Jarmo  wrote:

> I guess you have a typo there - "Watir::Select#selected_options no longer
> returns Array, but Array".
>
> J.
>
> On Wed, Feb 1, 2012 at 7:27 AM, Željko Filipin 
> wrote:
>
>> More information at http://watir.com/2012/02/01/watir-webdriver-0-5-2/
>>
>> Željko
>> --
>> watir.com/book - author
>>
>> ___
>> Wtr-development mailing list
>> wtr-developm...@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/wtr-development
>>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] What Email Provider is best used with Watir?

2012-02-01 Thread John Fitisoff
Joe,

You should have an SMTP server at work. You can use something like Net::SMTP 
(or one of the higher-level libraries Željko described below) to send email 
using that SMTP server. I don't think you need to worry about Gmail or other 
mail services.  Here's an example of how to do it using Net::SMTP. Once you 
know the server name it's pretty easy.

http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/smtp/rdoc/Net/SMTP.html 






 From: Joe Fleck 
To: watir-general@googlegroups.com 
Sent: Wednesday, February 1, 2012 10:42 AM
Subject: Re: [wtr-general] What Email Provider is best used with Watir?
 
Our process to on board new users is to send them an invite to their
email account and I am looking to automate that process.


On Wed, Feb 1, 2012 at 12:48 PM, Željko Filipin
 wrote:
> On Wed, Feb 1, 2012 at 11:18 AM, Joe Fl  wrote:
>> What Email Provider is best used with Watir?
>
> What do you want to do? Send e-mail? There are other ruby gems that do that.
> I have used a couple:
>
> http://rubygems.org/gems/mail
> http://rubygems.org/gems/gmail
>
> Željko
> --
> watir.com/book - author
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] What Email Provider is best used with Watir?

2012-02-01 Thread Željko Filipin
On Wed, Feb 1, 2012 at 12:42 PM, Joe Fleck  wrote:
> Our process to on board new users is to send them an invite to their
> email account and I am looking to automate that process.

Then use mail or gmail gem, links are in my previous post.

Željko

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Abe Heward
Cool. Thanks!

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] What Email Provider is best used with Watir?

2012-02-01 Thread Joe Fleck
Our process to on board new users is to send them an invite to their
email account and I am looking to automate that process.


On Wed, Feb 1, 2012 at 12:48 PM, Željko Filipin
 wrote:
> On Wed, Feb 1, 2012 at 11:18 AM, Joe Fl  wrote:
>> What Email Provider is best used with Watir?
>
> What do you want to do? Send e-mail? There are other ruby gems that do that.
> I have used a couple:
>
> http://rubygems.org/gems/mail
> http://rubygems.org/gems/gmail
>
> Željko
> --
> watir.com/book - author
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Jari Bakken
On Wed, Feb 1, 2012 at 3:53 PM, Abe Heward  wrote:

> NoMethodError: undefined method `now' for Watir::Time:Class
>
>
>
The HTML spec recently (re-)-introduced the  element, so there's now
a Watir::Time class. Since you're inside the Watir module in your monkey
patch, that's what you're referencing when you do "Time.now". To access the
top-level constant, instead do "::Time.now".

watir-webdriver already has a helper for waiting, so you could instead do:

  Watir::Wait.until { execute_script("return jQuery.active") == 0 }

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Extend watir

2012-02-01 Thread Željko Filipin
On Wed, Feb 1, 2012 at 10:00 AM, Codsf  wrote:
> so have 3 Firefox instances run the same tests?

Did you try this?

ff1 = Watir::Browser.new
ff2 = Watir::Browser.new
ff3 = Watir::Browser.new

Željko
--
watir.com/book - author

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Running cucumber + watir-webdriver + mac os x over SSH gives “Element cannot be scrolled into view”

2012-02-01 Thread robertwatts
Hi guys, I’m really stuck on trying to set up watir to avoid “element
cannot be scrolled into view” error from firefox when running over SSH

Any help would be really appreciated:
http://stackoverflow.com/questions/8995998/running-cucumber-watir-webdriver-mac-os-x-over-ssh-gives-element-cannot-be

Thanks!
Rob

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Extend watir

2012-02-01 Thread Codsf
Thanks for the tip, but this is for distributing tests over  a
network. Can it be used to instantiate multiple browser instances on
the same machine, so have 3 Firefox instances run the same tests?

On Jan 26, 11:15 pm, bis  wrote:
> https://github.com/90kts/watirgrid
>
> On Sun, Jan 22, 2012 at 4:55 PM, cody cody wrote:
>
>
>
>
>
>
>
> > Please Excuse me since I am a ruby novice, but I wanted to create a
> > simple ruby class (possibly a gem) which will allow you to run
> > parallel watir-webdriver tests with the different browsers. So
> > essentially you could run the same test with firefox and ie at the
> > same time. But how do you actually extend the watir class to inherit
> > its methods. For example I tried the following:
>
> > module Watir
>
> > class test
>
> >  end
>
> >  end
>
> > Even attempting to run this just gives me errors, So how can I extend
> > it to inherit its methods correctly? Thanks.
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] What Email Provider is best used with Watir?

2012-02-01 Thread Željko Filipin
On Wed, Feb 1, 2012 at 11:18 AM, Joe Fl  wrote:
> What Email Provider is best used with Watir?

What do you want to do? Send e-mail? There are other ruby gems that do
that. I have used a couple:

http://rubygems.org/gems/mail
http://rubygems.org/gems/gmail

Željko
--
watir.com/book - author

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] What Email Provider is best used with Watir?

2012-02-01 Thread Joe Fl
Hello Everyone,

What Email Provider is best used with Watir?  After reading several
posted discussion it seems that Watir and gmail can be difficult to
work with.  Has anyone had success with any other web mail providers?

Thank you,
Joe

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Abe Heward
I just updated to 0.5.2. I then ran a script that was working yesterday and 
got this error:

NoMethodError: undefined method `now' for Watir::Time:Class

... caused by an admittedly kludgy custom method that I've written to 
extend the Browser class...

module Watir
  class Browser
def *wait_for_ajax*(timeout=5)
  end_time = *Time.now* + timeout
  while self.execute_script("return jQuery.active") > 0
sleep 0.2
break if *Time.now* > end_time
  end
  self.wait(timeout + 10)
end
  end
end

So, my question is: What changed to make this suddenly stop working, and 
how can I fix it so that it works again?

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: [Wtr-development] watir-webdriver 0.5.2

2012-02-01 Thread Aliaksandr Ikhelis
Great job, thank you, Jari!

Jarmo - any specific plans when final watir3.0 will be released?

Also, wonder is there any consideration for matching Watir Cookies API to
watirspec as well?

Thank you,
Aliaksandr Ikhelis


On Wed, Feb 1, 2012 at 11:00 AM, Alister Scott wrote:

> I have created a new page on watirwebdriver.com about the new cookies
> API. Thanks Jari for implementing so quickly.
>
> http://watirwebdriver.com/cookies/
>
> ___
> Wtr-development mailing list
> wtr-developm...@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-development
>

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Alister Scott
I have created a new page on watirwebdriver.com about the new cookies API. 
Thanks Jari for implementing so quickly.

http://watirwebdriver.com/cookies/

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com