Forum: Ruby Watir problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2a0f7bd2c54fbc44329d69555b96f1c5?d=identicon&s=25 kevin.jackson (Guest)
on 2005-11-24 08:42
(Received via mailing list)
Hi,

I'm just starting out with Watir to evaluate it's use for testing web
application, but I'm stuck with a require problem

given the following script:
---
require 'watir'

include Watir

ie = IE.new

ie.goto("http://localhost:3000/account")
---
and given the fact that I installed watir using gems:

gem install watir

Can anyone suggest what I'm doing wrong?  The unittests run (with
require 'watir'), but my tests on a different partition don't work - No
such file to load -- watir (LoadError)

Thanks

Puzzled Kev
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 james_b (Guest)
on 2005-11-24 08:46
(Received via mailing list)
Kev Jackson wrote:
> Hi,
>
> I'm just starting out with Watir to evaluate it's use for testing web
> application, but I'm stuck with a require problem
>
> given the following script:
> ---
> require 'watir'

require_gem 'watir'

Perhaps.




James
2a0f7bd2c54fbc44329d69555b96f1c5?d=identicon&s=25 kevin.jackson (Guest)
on 2005-11-24 08:50
(Received via mailing list)
>> ---
>> require 'watir'
>
>
> require_gem 'watir'
>
Annoyingly that fails with

undefined method 'require_gem'

I'm sure problem is between keyboad and chair, but I can't work out what
I'm doing wrong

[sigh]
Kev
Cee0292fffa691f1fb320d5400200e99?d=identicon&s=25 marcel (Guest)
on 2005-11-24 08:50
(Received via mailing list)
On Thu, Nov 24, 2005 at 04:48:29PM +0900, Kev Jackson wrote:
>
> I'm sure problem is between keyboad and chair, but I can't work out what
> I'm doing wrong

You have to require 'rubygems' first.

marcel
2a0f7bd2c54fbc44329d69555b96f1c5?d=identicon&s=25 kevin.jackson (Guest)
on 2005-11-24 08:54
(Received via mailing list)
>
>marcel
>
>
Thanks so much!  Yes I'm an idiot

Kev
2a0f7bd2c54fbc44329d69555b96f1c5?d=identicon&s=25 kevin.jackson (Guest)
on 2005-11-24 09:26
(Received via mailing list)
I've never been so impressed with a piece of software so quickly in my
life.  This is perhaps the most useful piece of software I've ever
evaluated (for my current needs).

Perfect fir to what I need

Big thanks to the watir developers, and big thanks to matz for ruby, big
thanks to the ruby community - this will make our testing here so much
more rigorous

Kev
680f75e1d37a4691bf9ae902baf7beee?d=identicon&s=25 christian.leskowsky (Guest)
on 2005-11-24 14:08
(Received via mailing list)
I know exactly what you mean!

On 11/24/05, Kev Jackson <kevin.jackson@it.fts-vn.com> wrote:
>
> Kev
>
>


--
-

'There was an owl lived in an oak.
The more he heard, the less he spoke.
The less he spoke, the more he heard.'

Christian Leskowsky
christian.leskowsky@gmail.com
A7c9c275318af9e1e3812fab9660cd7c?d=identicon&s=25 jeff.darklight (Guest)
on 2005-11-25 21:54
(Received via mailing list)
Also, if you simply set an environment variable "RUBYOPT" to be
"rubygems"
... things also work ( basically the env variable tells ruby to ALWAYS
require that library ).

j.


On 11/23/05, Kev Jackson <kevin.jackson@it.fts-vn.com> wrote:
> >
> >You have to require 'rubygems' first.
> >
> >marcel
> >
> >
> Thanks so much!  Yes I'm an idiot
>
> Kev
>
>


--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"

Jeff Wood
7fa2dee73547604ac8ab07e48889b95d?d=identicon&s=25 Suresh Kumar (suresh)
on 2007-06-15 07:34

I am working with WATIR. I can't control the security information pop
up.
when i navigate to the login page of my web page it throws a pop up
message "This page contains both secured and non secured items. Do you
want to display?"
How can i close that pop up alert?????

Any one please help in this front.

suresh
19d0e6c6acf1337e1855dc1468ba1c89?d=identicon&s=25 Manish Sapariya (Guest)
on 2007-06-15 12:36
(Received via mailing list)
Suresh Kumar wrote:
>  I can't control the security information pop
> up.
> when i navigate to the login page of my web page it throws a pop up
> message "This page contains both secured and non secured items. Do you
> want to display?"
> How can i close that pop up alert?????
>
If you are using watir 1.5 checkout the dialog_test.rb in unit tests
under ruby installation
directory. You will have to find the watir directory, its deep down the
hierarchy.

It has several example to click on dialog which are invoked by
javascript. However same
logic can be used in you script by using click_no_wait method which
invokes the dialog.

Hope this helps.
Regards,
Manish
7fa2dee73547604ac8ab07e48889b95d?d=identicon&s=25 Suresh Kumar (suresh)
on 2007-06-19 09:06
Manish Sapariya wrote:
> Suresh Kumar wrote:
>>  I can't control the security information pop
>> up.
>> when i navigate to the login page of my web page it throws a pop up
>> message "This page contains both secured and non secured items. Do you
>> want to display?"
>> How can i close that pop up alert?????
>>
> If you are using watir 1.5 checkout the dialog_test.rb in unit tests
> under ruby installation
> directory. You will have to find the watir directory, its deep down the
> hierarchy.
>
> It has several example to click on dialog which are invoked by
> javascript. However same
> logic can be used in you script by using click_no_wait method which
> invokes the dialog.
>
> Hope this helps.
> Regards,
> Manish

Thanks manish. but i am using WATIR 1.4.1, where can i get WATIR 1.5. do
you know the url?

Regards
suresh
7fa2dee73547604ac8ab07e48889b95d?d=identicon&s=25 Suresh Kumar (suresh)
on 2007-06-19 11:34
Suresh Kumar wrote:
> Manish Sapariya wrote:
>> Suresh Kumar wrote:
>>>  I can't control the security information pop
>>> up.
>>> when i navigate to the login page of my web page it throws a pop up
>>> message "This page contains both secured and non secured items. Do you
>>> want to display?"
>>> How can i close that pop up alert?????
>>>
>> If you are using watir 1.5 checkout the dialog_test.rb in unit tests
>> under ruby installation
>> directory. You will have to find the watir directory, its deep down the
>> hierarchy.
>>
>> It has several example to click on dialog which are invoked by
>> javascript. However same
>> logic can be used in you script by using click_no_wait method which
>> invokes the dialog.
>>
>> Hope this helps.
>> Regards,
>> Manish
>
> Thanks manish. but i am using WATIR 1.4.1, where can i get WATIR 1.5. do
> you know the url?
>
> Regards
> suresh

I have downloaded Watir1.5 from open QA site.when i invoke click_no_wait
method, it opens one empty IE along with main IE instance and it closes
that empty IE on  dialog.close.. what i have to do?

/suresh
A481c40ea2228f15dcc28c5a669faee2?d=identicon&s=25 jfry (Guest)
on 2007-06-19 17:31
(Received via mailing list)
On Jun 19, 2:34 am, Suresh Kumar <sureshkumar.peru...@gmail.com>
wrote:
> >> If you are using watir 1.5 checkout the dialog_test.rb in unit tests
> >> Regards,
> that empty IE on  dialog.close.. what i have to do?
>
> /suresh
>
> --
> Posted viahttp://www.ruby-forum.com/.

Hi Suresh, I haven't heard of folks having that issue before, but the
best way to help troubleshoot your issue is if you forward your code
to the list...and by far the best list to fwd it to is wtr-
general@rubyforge.org. There are more folks answering watir questions
on the watir list than in comp.lang.ruby. You can join it (and search
the archives) here: http://rubyforge.org/mailman/listinfo/wtr-general

Good luck,
Jeff

http://testingjeff.wordpress.com
7fa2dee73547604ac8ab07e48889b95d?d=identicon&s=25 Suresh Kumar (suresh)
on 2007-06-20 11:01
jfry wrote:
> On Jun 19, 2:34 am, Suresh Kumar <sureshkumar.peru...@gmail.com>
> wrote:
>> >> If you are using watir 1.5 checkout the dialog_test.rb in unit tests
>> >> Regards,
>> that empty IE on  dialog.close.. what i have to do?
>>
>> /suresh
>>
>> --
>> Posted viahttp://www.ruby-forum.com/.
>
> Hi Suresh, I haven't heard of folks having that issue before, but the
> best way to help troubleshoot your issue is if you forward your code
> to the list...and by far the best list to fwd it to is wtr-
> general@rubyforge.org. There are more folks answering watir questions
> on the watir list than in comp.lang.ruby. You can join it (and search
> the archives) here: http://rubyforge.org/mailman/listinfo/wtr-general
>
> Good luck,
> Jeff
>
> http://testingjeff.wordpress.com

hi jeff,
this is my simple code for navigating my page into Sign In page, when my
Sign in page gets loaded , it shows the security information alert which
i need to close manually..

require 'watir'   include Watir
require 'test/unit'
$ie = IE.new
$ie.goto('http://www.salesperformanceonline.com')
$ie.link(:text, 'Sign In').click
$ie.button(:name,'submitbutton').click

regards
suresh
This topic is locked and can not be replied to.