[Wtr-general] ie.minimize broken in watir-1.5.1.1127

2006-11-22 Thread Željko Filipin

I have just installed watir-1.5.1.1127.gem and it crashes when I use
ie.minimize. I do not have autoit installed. Does watir require it now?
Should I log this to jira?

Steps to reproduce:

C:\Documents and Settings\limited>ruby -v
ruby 1.8.5 (2006-08-25) [i386-mswin32]
C:\Documents and Settings\limited>irb
irb(main):001:0> require 'watir'
=> true
irb(main):002:0> Watir::IE::VERSION
=> "1.5.1.1127"
irb(main):003:0> ie = Watir::IE.start("http://www.google.com/";)
=> #
irb(main):004:0> ie.minimize
WIN32OLERuntimeError: Failed to create WIN32OLE object from
`AutoItX3.Control'
   HRESULT error code:0x8007007e
 The specified module could not be found.
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:4356:in
`initialize'
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:4356:in
`new'
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:4356:in
`autoit'
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1644:in
`autoit'
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1641:in
`set_window_state'
   from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1622:in
`minimize'
   from (irb):4


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

Re: [Wtr-general] about command window

2006-11-22 Thread Chris McMahon

That's one of the advantages of using a real programming language like
Ruby.  You can go along using Watir, but when it's time to telnet, you can
use Ruby's 'net/telnet' library, too:
http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/index.html

Likewise database connections, SOAP clients, etc., Ruby has all sorts of
useful libraries.
-Chris

On 11/21/06, Dou Yifan <[EMAIL PROTECTED]> wrote:


I don't know whether it's suitable to ask this question here.
Watir is good tool for web testing, but during testing, usually there are
a lot more things to do other than operating the web browser. It may be
telnet to another machine to execute some commands, or just exec some
command on the local machine.

Some person mentioned about application map(
http://www.mail-archive.com/wtr-general@rubyforge.org/msg03439.html), and
that's exactly what I want the test to be.

the test table will look something like this

test,   win objectAction
 Arg#header

T,googlewin,  SearchField,  set, "PickAxe"
T,googlewin,  SearchButon, click
T,cmdwin,  cmdwin execCmd"net user newUser /add"

For operations on the IE browser, it's easy to implement this kind of
testing, since there is already a class Watir::IE in the Watir lib, but for
the command window, I don't know whether there is a class that can represent
this, or how to implement such a class.

--
Do You Yahoo!?
捇誥轎煤G蚘眊ㄜ笢弊菴珨橈拸嶼僵蚘璃玊閉湮蚘眊 


___
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] about command window

2006-11-22 Thread Charley Baker
Dou,
   There are a lot of libraries for Ruby that you can use along with
the Watir libraries for other pieces of your testing. If you're
looking for telnet for example you might want to take a look at Ruby's
builtin net/telnet documentation:
http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/index.html
Running system commands locally can be done with system or exec. Take
a look at the docs, run ri at the command prompt:

ri Kernel#system

-Charley

On 11/21/06, Dou Yifan <[EMAIL PROTECTED]> wrote:
> I don't know whether it's suitable to ask this question here.
> Watir is good tool for web testing, but during testing, usually there are a
> lot more things to do other than operating the web browser. It may be telnet
> to another machine to execute some commands, or just exec some command on
> the local machine.
>
> Some person mentioned about application
> map(http://www.mail-archive.com/wtr-general@rubyforge.org/msg03439.html),
> and that's exactly what I want the test to be.
>
> the test table will look something like this
>
> test,   win objectAction Arg
>#header
>
> T,googlewin,  SearchField,  set, "PickAxe"
> T,googlewin,  SearchButon, click
> T,cmdwin,  cmdwin execCmd"net user newUser /add"
>
> For operations on the IE browser, it's easy to implement this kind of
> testing, since there is already a class Watir::IE in the Watir lib, but for
> the command window, I don't know whether there is a class that can represent
> this, or how to implement such a class.
>
>  
> Do You Yahoo!?
>  捇誥轎煤G蚘眊ㄜ笢弊菴珨橈拸嶼僵蚘璃玊閉湮蚘眊
>
>
> ___
> 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] [Wtr-General] Problem with set_text and dialog boxes

2006-11-22 Thread Howard
I have spent several days debugging to locate a problem with the file open 
dialog box that is presented by an html "file" type.

I am getting a valid handle to the control on the file open dialog, but, when 
winClicker attempts to (ultimately) use set_text, the text is not put into the 
combo box text on the dialog box, and the message is never acknowledged, 
leaving the Open File dialog sitting there.

The code is as follows:

 adoc = $ie.frame("main").image(:src, 
"https://alinea.inmar.com/alinea/images/adddocument.gif";)
sleep 2

adoc.click_no_wait
sleep 2

modal = $ie.modal_dialog
assert_not_nil modal
$path = "C\:\\LogTest.txt"
puts "starting autoit"
$autoit = WIN32OLE.new("AutoItX3.Control") 
sleep 1
ffld = modal.fileField(:name, "selectDoc")
ffld.set($path)
  
success = $autoit.WinWait("Choose file", "", 10)
if success == 0
  puts "Failed to find Choose file"
end
$autoit.WinActivate("Choose file")
$autoit.Send("{TAB 3}{ENTER}")

modal.text_field(:name, "Subject").set("Test Subject")
modal.select_list(:id,"LB1").set("hward")
modal.select_list(:id,"LB1").fire_event("onDblClick")
modal.button(:value, "Add Document").click
sleep 2

modal = $ie.modal_dialog
modal.button(:value, "Close").click

The error message about not finding "Choose file" occurs frequently and the 
autoit code appears to do nothing.  The fields in the modal dialog under the 
File Open will work as long as a file name is manually entered.  I was able, 
one time, to get autoit to push something into the File Name field, but I have 
not been able to get it to work again.

Is there a way to get this process to complete?
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5403&messageID=15064#15064
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [Wtr-General] Problem with set_text and dialog boxes

2006-11-22 Thread Cain, Mark
If you are using 1.5.1070 or newer (if not you can get it here
http://wiki.openqa.org/display/WTR/Development+Builds) you can use:

 

   require 'watir/contrib/enabled_popup'

   

   $path = "C\:\\watir_bonus\\working\\MyDoc.txt"

 

   def startClicker( button , waitTime=9, user_input=nil)

hwnd = $ie.enabled_popup(waitTime)  # get a handle if one exists 

if (hwnd)  # yes there is a popup

  w = WinClicker.new

  if ( user_input )

w.setTextValueForFileNameField(hwnd, "#{user_input}")

  end

  sleep 3  # I put this in to see the text being input it is not
necessary to work

  w.clickWindowsButton_hwnd(hwnd, "#{button}")  # "OK" or whatever
the name on the button is

  w=nil# this is just cleanup

end

  end

 

  adoc = $ie.frame("main").image(:src,
"https://alinea.inmar.com/alinea/images/adddocument.gif";)

  sleep 2

 

  adoc.click_no_wait

 

  startClicker( '&Open', 9, $path)

 

You may need to tweak this to work in your situation.  I tested this and
it works.

 

--Mark

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Howard
Sent: Wednesday, November 22, 2006 1:31 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] [Wtr-General] Problem with set_text and dialog
boxes

 

I have spent several days debugging to locate a problem with the file
open dialog box that is presented by an html "file" type.

 

I am getting a valid handle to the control on the file open dialog, but,
when winClicker attempts to (ultimately) use set_text, the text is not
put into the combo box text on the dialog box, and the message is never
acknowledged, leaving the Open File dialog sitting there.

 

The code is as follows:

 

 adoc = $ie.frame("main").image(:src,
"https://alinea.inmar.com/alinea/images/adddocument.gif";)

sleep 2

 

adoc.click_no_wait

sleep 2

 

modal = $ie.modal_dialog

assert_not_nil modal

$path = "C\:\\LogTest.txt"

puts "starting autoit"

$autoit = WIN32OLE.new("AutoItX3.Control") 

sleep 1

ffld = modal.fileField(:name, "selectDoc")

ffld.set($path)

  

success = $autoit.WinWait("Choose file", "", 10)

if success == 0

  puts "Failed to find Choose file"

end

$autoit.WinActivate("Choose file")

$autoit.Send("{TAB 3}{ENTER}")

 

modal.text_field(:name, "Subject").set("Test Subject")

modal.select_list(:id,"LB1").set("hward")

modal.select_list(:id,"LB1").fire_event("onDblClick")

modal.button(:value, "Add Document").click

sleep 2

 

modal = $ie.modal_dialog

modal.button(:value, "Close").click

 

The error message about not finding "Choose file" occurs frequently and
the autoit code appears to do nothing.  The fields in the modal dialog
under the File Open will work as long as a file name is manually
entered.  I was able, one time, to get autoit to push something into the
File Name field, but I have not been able to get it to work again.

 

Is there a way to get this process to complete?

-

Posted via Jive Forums

http://forums.openqa.org/thread.jspa?threadID=5403&messageID=15064#15064

___

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(ish): SafariWatir update

2006-11-22 Thread Chris McMahon

Mr. Hoover and company are at it again:
http://redsquirrel.com/cgi-bin/dave/2006/11/22#safari.watir.0.2.0
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [OT] Running scripts on machines without ruby

2006-11-22 Thread Michael Bolton
I've tried it. It's a little porky if you're compiling something small, but
the size of the executable didn't matter much when I used it and it might
not matter to you either.  Performance similarly wasn't an issue, so I don't
know about that either.  But I will say this:  it sure does the job nicely
without hassle.
 
---Michael B.

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon
Sent: November 21, 2006 5:06 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] [OT] Running scripts on machines without ruby




http://www.erikveen.dds.nl/rubyscript2exe/index.html
I hear good things about it.  



On 11/21/06, John Lolis <[EMAIL PROTECTED]> wrote: 

Looking for general input.

Is there any way to run a ruby script on a machine without first installing
ruby? (ie, could i just include the binaries need to run it?)

Having some trouble finding info on google :) 
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5390

&messageID=15015#15015 
___
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