[wtr-general] Simple Ruby script not working on Windows Vista IE8 configuration

2010-04-12 Thread Vijay Shinde
Hi all,
I am newbie to Ruby Watir.

I am getting error when I run a simple script on:
WINDOWS VISTA and IE8
Ruby 1.8.6
and WATIR 1.6.5

Script is:


require 'rubygems'
require 'watir'
browser = Watir::Browser.start  https://nfgprimary-qa01/profile/
login.aspx
sleep 15
browser.image(:src,/createprofile/).click




When I run this script I get following error:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
460:in `method_missing': unknown property or method
`document' (WIN32OLERuntimeError)
HRESULT error code:0x800706b5
  The interface is unknown. from c:/ruby/lib/ruby/gems/1.8/gems/
watir-1.6.5/lib/watir/ie-class.rb:460:in `document'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/locator.rb:
44:in `each_element'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/locator.rb:
51:in `locate'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
container.rb:811:in `locate_tagged_element'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/image.rb:
20:in `locate'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
53:in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
288:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
60:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
233:in `click!'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
219:in `click'
from test1.rb:9
Exit code: 1





Can anybody help me get out of this?
Is my Windows Vista and IE8 causing any issue?

Regards,
Vijay

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Simple Ruby script not working on Windows Vista IE8 configuration

2010-04-12 Thread Wesley Chen
Please try to remove
require 'rubygems'
from your script and then run it.

Wesley.
For life, the easier, the better.


On Mon, Apr 12, 2010 at 1:47 PM, Vijay Shinde shindevija...@gmail.comwrote:

 ode:0x800706b5

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Re: How to use the Firewatir in Mac

2010-04-12 Thread Angrez Singh
I hope you all are using the new XPI for Firefox 3.6.x from here:
http://wiki.openqa.org/display/WTR/FireWatir+Installation#FireWatirInstallation-2%29InstalltheJSSHFirefoxExtension

- Angrez

On Sun, Apr 11, 2010 at 1:10 AM, John Williams jwil...@gmail.com wrote:

 Hello,

 The Contents folder is actually a special, hidden container for
 application-specific resources. Apple formally calls it an application
 bundle or package. If you right-click on any application, choose
 Show Package Contents to see the Contents folder in the Finder.
 Firefox should be in your Applications folder, and the icon on your
 Desktop is probably an alias, so I don't think you need to move it.
 If, however, the Firefox application is indeed on your desktop, then
 you'll have to change the path when you launch it from Terminal.

 Cheers,
 John

 On Apr 8, 10:15 am, chatur vidur macvi...@gmail.com wrote:
  Hi I had a similar problem, but i want to know
  /Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh
  what is this contents where do i get it from? i have firefox- bin- jssh
  Btw, I have a mac os x 10.4.11
  firefox 3.6
   firefox- bin- jssh is on my desktop should i move it else where?
 
 
 
  On Thu, Apr 8, 2010 at 10:30 PM, John Williams jwil...@gmail.com
 wrote:
   Thank you Zhong. After I open Firefox with:
 
   /Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh
 
   I still get errors trying to use jssh. I believe there is a difference
   between Mac OS X 10.5 and 10.6 in how they allow arguments such as -
   jssh. For example, when I try to telnet to the port:
 
   $ telnet localhost 9997
   Trying ::1...
   telnet: connect to address ::1: Connection refused
   Trying fe80::1...
   telnet: connect to address fe80::1: Connection refused
   Trying 127.0.0.1...
   telnet: connect to address 127.0.0.1: Connection refused
   telnet: Unable to connect to remote host
 
   When you open Firefox from Terminal, do you have to open a new window
   in Terminal for any additional commands? I do. When I open Firefox
   with the command above, the Terminal window I am in freezes up until I
   quit Firefox. I have never opened applications from Terminal before,
   so I am not sure if this is a normal response?
 
   Thanks,
   John
 
   On Apr 7, 8:28 pm, Yuping Zhong littlezhong...@gmail.com wrote:
John,
 
Do you try the /Applications/Firefox.app/Contents/MacOS/firefox-bin
   -jssh?
 
 Does it work?
 
On Thu, Apr 8, 2010 at 11:27 AM, Yuping Zhong 
 littlezhong...@gmail.com
   wrote:
 
 I have another issue.
 After I type the
 /Applications/Firefox.app/Contents/MacOS/firefox-bin
 -jssh,then I can use the irb to open the firefox.After I quit the
 irb
   and
 start the new irb again.I also get the error.
 
 So before I want to use the irb to open the firefox each time,I
 have to
   type
 the /Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh
 
 Any idea to resolve this issue?
 
 Thanks!
 
 ***
 
 See the following:
 
 $ /Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh
 FoxyProxy settingsDir: /Users/tank/Library/Application
 Support/Firefox/Profiles/92qg04dg.default/foxyproxy.xml
 
 $ irb
 irb(main):001:0 require rubygems
 = true
 irb(main):002:0 require firewatir
 = true
 irb(main):003:0 ff=FireWatir::Firefox.new
 FoxyProxy settingsDir: /Users/tank/Library/Application
 Support/Firefox/Profiles/92qg04dg.default/foxyproxy.xml
 = #FireWatir::Firefox:0x1a34890 url= title=Problem loading
 page
 irb(main):004:0 quit
 
 $ irb
 irb(main):001:0 require rubygems
 = true
 irb(main):002:0 require firewatir
 = true
 irb(main):003:0 ff=FireWatir::Firefox.new
 RuntimeError: Firefox is running without -jssh
 from
 
  
 /usr/local/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:
   125:in
 `initialize'
  from (irb):3:in `new'
 from (irb):3
 
 On Thu, Apr 8, 2010 at 2:40 AM, John Williams jwil...@gmail.com
   wrote:
 
 I'm having the same problem as Yuping with slightly different
 versions, but opening Firefox using the ...firefox-bin -jssh
 command
 suggested above does not fix my issue. I'm running slightly older
 versions:
 
 Mac OS X 10.5.8
 Firefox 3.5.9
 jssh-3.5.x-Darwin-param.xpi
 
 I too get the RuntimeError: Firefox is running without -jssh
 error
 and port 9997 does not appear to be opening. Do I need Mac OS X
 10.6
 in order to open Firefox with arguments?
 
 Any suggestions?
 Cheers,
 John
 
 On Apr 6, 10:05 pm, Moises Siles moises.si...@gmail.com wrote:
  cool, someone else help me in the same way days ago! thank you
 to
   this
 group
  :)
 
  On Tue, Apr 6, 2010 at 10:57 PM, Yuping Zhong 
   littlezhong...@gmail.com
 wrote:
 
   Great!
   That works fine! Thanks Moises!
 
   On Wed, Apr 7, 2010 at 12:01 PM, Moises Siles 
   moises.si...@gmail.com
 

Re: [wtr-general] Simple Ruby script not working on Windows Vista IE8 configuration

2010-04-12 Thread Željko Filipin
On Mon, Apr 12, 2010 at 7:47 AM, Vijay Shinde shindevija...@gmail.com
wrote:
 WINDOWS VISTA and IE8

I remember hearing that people having problems on Vista if they did not
install Watir as administrator, or if they do not run it as administrator.

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] File Download on Mac

2010-04-12 Thread Željko Filipin
On Mon, Apr 12, 2010 at 2:53 AM, Lonny Eachus lon...@gmail.com wrote:
 My jssh and FireWatir are working just fine.

Have you tried with SafariWatir? Maybe it works there, or you could see how
it has implemented it. In any case, if you get it working, please let us
know.

Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] Grrr! click_no_wait does not work :-(

2010-04-12 Thread Rats
I've been looking at ways of handling pop ups and it appears the way
to go is via click_no_wait. Unfortunately this is not working for me
as when I run the click_no_wait command it just flashes the button and
does not click it hence no popup window.

I'm running:

ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
watir (1.6.5)

Any ideas? Thanks.

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Grrr! click_no_wait does not work :-(

2010-04-12 Thread Eric Mathiesen
Might be a simplistic answer, but have you set focus to the child popup
window?

On Mon, Apr 12, 2010 at 1:56 PM, Rats crapats...@yahoo.com.au wrote:

 I've been looking at ways of handling pop ups and it appears the way
 to go is via click_no_wait. Unfortunately this is not working for me
 as when I run the click_no_wait command it just flashes the button and
 does not click it hence no popup window.

 I'm running:

 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 watir (1.6.5)

 Any ideas? Thanks.

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


Re: [wtr-general] Grrr! click_no_wait does not work :-(

2010-04-12 Thread Ethan
Is the popup triggered by an onclick event, or an onmouseup or onmousedown
event? If it's the latter, watir won't trigger it; #click and #click_no_wait
don't do those events. you'll have to explicitly
fire_event_no_wait('onmousedown') or mouseup.

On Mon, Apr 12, 2010 at 16:57, Eric Mathiesen mathiese...@gmail.com wrote:

 Might be a simplistic answer, but have you set focus to the child popup
 window?


 On Mon, Apr 12, 2010 at 1:56 PM, Rats crapats...@yahoo.com.au wrote:

 I've been looking at ways of handling pop ups and it appears the way
 to go is via click_no_wait. Unfortunately this is not working for me
 as when I run the click_no_wait command it just flashes the button and
 does not click it hence no popup window.

 I'm running:

 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 watir (1.6.5)

 Any ideas? Thanks.

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com


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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] Re: Grrr! click_no_wait does not work :-(

2010-04-12 Thread Rats
On Apr 13, 8:57 am, Eric Mathiesen mathiese...@gmail.com wrote:
 Might be a simplistic answer, but have you set focus to the child popup
 window?

I am fairly sure it's not a hidden pop up or anything like that as if
I manually click the button (after click_no_wait flashes it) the pop
up is displayed.

.click by itself works fine it's only click_no_wait which flashes the
button and does not click it.

This is turning into a real nightmare as we've introduced confirm pop
ups in a number of places and all my scripts are stalling at this
point. :-(

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] Re: Grrr! click_no_wait does not work :-(

2010-04-12 Thread Rats
On Apr 13, 9:11 am, Ethan notet...@gmail.com wrote:
 Is the popup triggered by an onclick event, or an onmouseup or onmousedown
 event? If it's the latter, watir won't trigger it; #click and #click_no_wait
 don't do those events. you'll have to explicitly
 fire_event_no_wait('onmousedown') or mouseup.

All I can say is that .click works.

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] The click_no_wait flashing issue

2010-04-12 Thread Rats
Ok, I've done much research into this and it appears to be a current
issue:

http://jira.openqa.org/browse/WTR-320

It was thought to have been resolved but the ticket was reopened in
later March as many people are still reporting issues with
click_no_wait.

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] Handling popups without using click_no_wait

2010-04-12 Thread Rats
Given I simply cannot get click_no_wait working with my current
configuration are there any other ways of handling js popups?

Currently I'm using:

Win7
IE8
Watir 1.6.5
Ruby 1.8.6 (1 click installer version)

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Handling popups without using click_no_wait

2010-04-12 Thread Bill Agee
There are several different approaches to this - I'd start with the examples
on the pop-up FAQ pages, hopefully one of them will work for you:

http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups

http://wiki.openqa.org/display/WTR/Pop+Ups

http://wiki.openqa.org/display/WTR/Security+Alerts

When dealing with dialogs that block the browser window, the common thread
(no pun intended, I swear!) in each approach is to start a separate process
to send input to the dialog _before_ sending the click (or other input) that
will cause the dialog to appear.

This is where things get confusing, since there are several different ways
to launch a detached, separate process, and many, many different ways to
implement a separate popup killer program.  But it can be made to work. :)

Thanks
Bill

On Mon, Apr 12, 2010 at 6:07 PM, Rats crapats...@yahoo.com.au wrote:

 Given I simply cannot get click_no_wait working with my current
 configuration are there any other ways of handling js popups?

 Currently I'm using:

 Win7
 IE8
 Watir 1.6.5
 Ruby 1.8.6 (1 click installer version)

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


Re: [wtr-general] Re: Grrr! click_no_wait does not work :-(

2010-04-12 Thread pallavi shashidhar
Hi,
There is an issue with click_no_wait in 1.6.5 . Pls read this
http://jira.openqa.org/browse/WTR-320
Try adding the patch to page_container.rb
This fix should get your click_no_wait working.

Regards,
Pallavi

On Tue, Apr 13, 2010 at 3:23 AM, Rats crapats...@yahoo.com.au wrote:

 On Apr 13, 9:11 am, Ethan notet...@gmail.com wrote:
  Is the popup triggered by an onclick event, or an onmouseup or
 onmousedown
  event? If it's the latter, watir won't trigger it; #click and
 #click_no_wait
  don't do those events. you'll have to explicitly
  fire_event_no_wait('onmousedown') or mouseup.


 I've tried fire_event_no_wait without any success. Again it does the
 same thing by flashing the button and the pop up down not launch.

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com