Re: [Wtr-general] Installing watir 1.5 actually installs 1.4.1 again

2007-07-20 Thread Bret Pettichord
marekj wrote:
 One word of caution with downloaded gems.
 Use 'gem install watir --local' option to to pick up the downloaded 
 gem and not the --remote

Actually, this only matters if you didn't actually download the gem to 
the current directory.

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


[Wtr-general] Discussion has Moved to Google Groups

2007-07-19 Thread Bret Pettichord
This discussion has moved to the Watir-General Google Group. This forum will be 
shut down shortly. Please post your questions here.

http://groups.google.com/group/watir-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Recommended version of Ruby

2007-07-17 Thread Bret Pettichord
Derek Wong wrote:
 I remember in an earlier discussion thread that there was something about 
 re-compiling some library to support modal dialogs on different versions of 
 Ruby (correct me if I've misunderstood).  Is there a better more maintainable 
 way to do this without coupling WATIR to a particular version of Ruby to 
 support modal dialogs?
   
Yes there is. The best solution would be to rewrite the iedialog.dll so 
that it was an activex control (not a dll) and therefore would not 
require a modified WIN32OLE. I don't know how to do this myself.

Another option would be to migrate our changes to the win32ole library 
to a newer version of Ruby, which would still result in a hard-coded 
dependency.

Both solutions require a C/C++ programmer. I have no plans to do either, 
but will gladly accept contributions.

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


Re: [Wtr-general] How to deal with the copyrihgt symbol

2007-07-13 Thread Bret Pettichord
Željko Filipin wrote:
 On 7/13/07, *jhe* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Now, it seems that the difference is that your $ie.text will
 return \251, but my $ie.text only return ?, is it caused by
 ruby version?

 This is out of my league. Sorry. Maybe somebody else will have an answer.
Another possibility is that this depends on the code page settings for 
your use of COM. I suspect that Zeljko has these worked out, since it is 
required to support his native language.

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

Re: [Wtr-general] OO framework?

2007-07-12 Thread Bret Pettichord
aidy lewis wrote:
 I am concerned about hierarchy. In each class I hold methods relating
 to a specific HTML page. However, each HTML page does not inherit
 another by nature. My dilemma is should I inherit through a sequence
 of actions (i.e. a use-case)? A use-case is not OO.

 Login = Main_Page = Submit_Page etc

 Should I say:

 class Main_Page  Login

 Because in the test script the login is an antecedent to the main
 page.

 class Submit_Page  Main_Page
   
I see no reason to do this.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Watir General is moving to Google

2007-07-12 Thread Bret Pettichord
This discussion is currently hosted as a Rubyforge mailing list and an 
OpenQA forum, gatewayed to each other, sometimes imperfectly. We are 
shutting down both the list and the forum and moving the Watir General 
discussion to a new group hosted on Google. This move results from a 
community decision.
http://forums.openqa.org/thread.jspa?messageID=25211

If you would like to continue to be part of this discussion, please 
subscribe to the Google group. Many of you received an invitation from 
the Google group (and me) directly. You can also subscribe here:
http://groups.google.com/group/watir-general

I thank Patrick Lightbody (OpenQA) and Tom Copeland (Rubyforge) for 
their continued support of the Watir community.

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


Re: [Wtr-general] Watir General is moving to Google

2007-07-12 Thread Bret Pettichord
Angrez Singh wrote:
 HI Bret,

 I tried subscribing to the group with subscription type as  Email - 
 Send each message to me as it arrives but not able to subscribe.
 Got error message  There is a problem with your choice of 
 subscription type 

 Is there problem with group settings?

 Regards,
 Angrez
First of all, there was a problem with the email being sent to the 
google group was actually being forwarded here (rubyforge/openqa). That 
problem is now fixed.

I see you listed as a member of the Google group. Please try again.

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


Re: [Wtr-general] Selecting controls in a dialog box

2007-07-10 Thread Bret Pettichord
Paul Rogers wrote:
 have you looked at the modal_dialog stuff in watir? Ive never used it 
 so cant help you much, but its there.
+1
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Recovery System in WATIR

2007-07-09 Thread Bret Pettichord
Lavanya Lakshman wrote:
 I would appreciate if you could give more inputs on the features?

I added the IE.find command to support error recovery.

You also may want to look at Aslak Hellesoy's post on how he captured 
screens when watir tests failed.

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


Re: [Wtr-general] NoMethodError for verify method in assertions.rb

2007-07-09 Thread Bret Pettichord
Tiffany Fodor wrote:
 I just added that line to the rest of the require/include statements at the 
 beginning of my script and it did the trick.
   
It is a common practice to put the require and include statements 
together, but I don't recommend it. I intend to remove all examples of 
this from the Watir unit tests and examples.

My view is that it is best to put the includes where you need them. If 
you put them on the top of the file, you are modifying the global Object 
class, which, someday, could have unfortunate consequences.

Include is a mixin and supports a form of multiple inheritance. I 
think it should be used in this context.

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


[Wtr-general] Recommended version of Ruby

2007-07-09 Thread Bret Pettichord
What version of Ruby should we recommend?

After a recent discussion we agreed that the rdoc (readme.rb) should read:

   Best is to use Ruby 1.8.2-14 or later.
   However, if you are using the Watir::IE#modal_dialog method, you must 
use Ruby 1.8.2-14 and not a more recent version.
   Watir (in general) will not work with Ruby 1.8.1-13. (This version of 
Ruby has a bad WIN32OLE library.)

I revised this recommendation to this thus in the new (unpublished) website:

First you need to install
Ruby:http://rubyforge.org/frs/?group_id=167 using
the one-click installer for Windows.
*We recommend Ruby 1.8.2-14 or later.*

However, if you wish to use Watir's support for the *IE web modal
dialog*
then you must use Ruby
1.8.2-14:http://wiki.openqa.org/display/WTR/Installation
and not a more recent version. This dialog is
posted with the showModalDialog() JavaScript command and is
supported with Watir's
ie.modal_dialog command.

However, the wiki page for installing recommends 1.8.2-14 for everyone.
http://wiki.openqa.org/display/WTR/Install+Ruby

I was surprised when i found this and started a discussion with Zeljko 
on the page, but thought the issue might be of more general interest.

Personally, i think that people should be using the latest generally 
available version of Ruby. There continue to be improvements with it. 
For example I recently reported several Ruby bugs that interfered with 
integrating Watir with Cruise Control. 
http://www.io.com/~wazmo/blog/archives/2007_04.html. At this point, we 
see problems in both 1.8.5 and 1.8.6, but expect that 1.8.7 will have 
these problems fixed and will be encouraging a move there when it happens.

Should our recommendation for newer versions of Ruby be more emphatic?

Another question regards the modal dialog support. I don't know if the 
community understands that at this point i am abandoning this 
functionality. I would love to see someone take it over and make it so 
that it was dependent on a specific version of Ruby. But i don't expect 
that to happen. But we can't allow this to say that all users should 
stick with 1.8.2 until the end of time.

For example, rubygems in 1.8.2 does not support the --install-depencies 
argument, which makes installing via gem much more complicated (esp. 
when i publish the gem to rubyforge.org). So once this is done, i will 
probably be telling people NOT to use 1.8.2, because i think it is more 
important to make our install instructions simple. We can have alternate 
instructions for the people who need the modal_dialog support.

I'd appreciate your thoughts and questions.

Bret



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


Re: [Wtr-general] Modal Dialog/Vista -- undefined method `hwnd'

2007-07-05 Thread Bret Pettichord
I think the error message may be misleading. I think the problem may 
actually be caused by the use of frames. Can you show us the code that 
is failing?

Bret

Michael Kernaghan wrote:

 Interesting.

 I think I have worked out my understanding problems but now I get this 
 problem. Maybe I need an older rev of Ruby 1.8.2?

 / Environment  /

 Ruby 1.8.2-15

 MS Vista

 watir-1.5.1.1166

  Error Message 

 NoMethodError: IE#modal_dialog not supported with the current version 
 of Ruby (1.8.2).

 See http://jira.openqa.org/browse/WTR-2 for details.

 undefined method `hwnd' for #Watir::Frame:0x30a0580

 c:/ruby182/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:2815:in 
 `initialize'

 c:/ruby182/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:351:in 
 `new'

 c:/ruby182/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:351:in 
 `modal_dialog'

 Michael Kernaghan

 Quality Control Tester

 Meridian Systems

 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

 604-609-0833 #103

 * *

 *Read what IDC believes to be the key to the success of engineering, 
 construction  RE industries. *

 IDC Analyst Connection “Integrated Project and Portfolio Management: 
 Improving Efficiency, Lowering Risk

 for Engineering, Construction and Real Estate Firms” Visit 
 www.meridiansystems.com/performance 
 http://www.meridiansystems.com/performance

 

 ___
 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] NoMethodError for verify method in assertions.rb

2007-07-05 Thread Bret Pettichord
Tiffany Fodor wrote:
 Hi all!

 I'm trying to use the verify method from assertions.rb, but I keep getting 
 the following error:

 undefined method 'verify' for main:Object (NoMethodError)

 I've added 
 require watir/assertions 
 to the beginning of my script, but still can't use the verify method.  Is 
 anyone else using this successfully?
   
You will also need to add an
  Include Watir::Assertions
to your test code.

If you show us your test code, we can show you where it goes.

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


Re: [Wtr-general] Recovery System in WATIR

2007-07-05 Thread Bret Pettichord
Lavanya Lakshman wrote:
 Whenever we consider any tool for automation, the first and the foremost 
 critical part is the recovery system. 

 Unfortunately I didn't get much info related to this on the website. 

 I would appreciate your thoughts and experience related to this. 
   
I agree. Watir has many features that make it easy to create recovery 
systems. I created an extensive recovery system for the automation 
system we used at DataCert.

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


Re: [Wtr-general] How can I click h4 headline?

2007-07-03 Thread Bret Pettichord
Zeljko wrote:
 I have a h4 headline that I have to click.

 h4 id=addprojectCreate a new project/h4

 This does not work.

 ie.h4(:id, addproject).click

 Is there a way to click it?
   

  class H4  NonControlElement
TAG = 'H4'
  end
 
  module Container
def h4(how, what)
  return H4.new(self, how, what)
end
  end

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


Re: [Wtr-general] Problem with attach using :title

2007-07-03 Thread Bret Pettichord
marekj wrote:

 hmmm... I was thinking that if I have 3 scripts running at the same 
 time with -b switch they would get confused at which window to talk to.
Take a look at concurrent_search.rb:

require 'thread'
require 'watir' 

def test_google
  ie = Watir::IE.start('http://www.google.com')
  ie.text_field(:name, q).set(pickaxe)   
  ie.button(:value, Google Search).click  
  ie.close
end

# run the same test three times concurrently in separate browsers
threads = []
3.times do
  threads  Thread.new {test_google}
end
threads.each {|x| x.join}
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Why Watir Has Bugs, was: Can't install Watir - Error opening file for writing: \watir\AboutItx.chm

2007-07-03 Thread Bret Pettichord
Željko Filipin wrote:
 On 6/26/07, *Chris McMahon* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Far better to have a test tool that actually works, with some non-core
 tests pointing the way to make it better.  :-)

 So true. :)
 (But confusing to new users.)

 Zeljko

It is important to understand why this happens.

Watir started out as an experimental project. Some of the features were 
simply proofs of concept, or in reality non-proofs of concept, because 
they did not work reliably. Other parts have been made of commercial 
quality.

I've thought about pulling out some of this experimental functionality 
that works intermittently and whose tests fail intermittently. But a lot 
of people are using this functionality. The best example is the 
javascript popup support. I've actually never used this on my own 
projects, and frankly would rewrite it and make it work more reliably if 
i did. But other people find that they are able to use it in the state 
that it is.

Someday, i plan to take all the marginally working functionally and put 
it in a separate gem. People who want the old functionality can use it. 
And people who want stuff that is very reliable can stick to the core code.

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

Re: [Wtr-general] Problem with attach using :title

2007-07-02 Thread Bret Pettichord
marekj wrote:
 a quick question about attaching to the session of IE.
 I am currently relying on attaching to one window on the desktop but I 
 want to move towards running -b(ackground) option of Watir and running 
 multiple IE windows. The best way I think I can do this is to maintain 
 a handle to each IE instance. On my setup script that starts IE 
 instance I can write out :hwnd and mainaint my test session based on 
 that so each script talk to the correct window.

 Before I jump into doing this I want to find out if it's possible to 
 do in with -b option and if I am on the right track.

 so for example
 I will do this in my startup
 $ie = Watir.start()
 $ie_hwnd = $ie.hwnd()

 then in my test cases I attach to the instance
 $ie = Watir::IE.attach(:hwnd, $ie_hwnd)

 Then I can run another script file containing testCases with the same 
 code.

 So this will create another thread of execution and each thread will 
 have $ie attached to different instance of IE in memory.
 Am I on the right track?
 Your ideas are much appreciated.
 Thanks
 marekj
I don't understand why you don't just use the $ie value directly.

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


Re: [Wtr-general] Possible to run scripts when not logged in?

2007-07-01 Thread Bret Pettichord
Bill Agee wrote:
 I believe in most cases, your script will run fine if no Windows user
 is logged in.

 However, in my experience, there can be problems with the
 Watir::IE.attach method if no one is logged in to the machine.  I
 believe this is because IE.attach uses the Shell.Application OLE
 object, which behaves differently if it's not run from an interactive
 user session.  Specifically, what I've seen is that attach isn't able
 to get a list of open IE windows belonging to the shell unless it's
 running as a logged-in user.

 Anyway, as far as I know, all the other Watir methods should work fine
 in this case.
   
This is correct. The IE.attach, IE.new_process, IE.each and 
ie.modal_dialog methods won't work if run as a service. However, IE.new 
will. I've updated the rdocs to reflect this.

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


Re: [Wtr-general] Problem with attach using :title

2007-06-30 Thread Bret Pettichord
jim_matt wrote:
 I wanted to share something I discovered.  I had reported earlier that 
 I sometimes I had problems attaching a browser using :title.  The 
 problem turns out to be that title is part of the HTML.  The 
 confusion comes because if the HTML does not have a title,  IE 
 displays the URL in the title bar of the browser.  This makes it look 
 like you should be able to attach the IE browser using :title, but 
 the attach will fail with an error like:
  
 Watir::Exception::NoMatchingWindowFoundException: Unable to locate a 
 window with title of (?i-mx:whatever you used to match)
  
 This is worth a note in the documentation for matching on :title 
 because it certainly looks like it should work.
  
This report is correct (we've discussed this offline). Both the 
IE.attach and the ie.title method are consistent in this regard -- both 
consider the title to be the HTML title of the page, which is not 
necessarily what appears in the title bar.

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


Re: [Wtr-general] ci_reporter usage of xml files

2007-06-29 Thread Bret Pettichord
marekj wrote:
 How do you guys read the reports, do you have some custom formatters 
 to translate into HTML? I am new to ci_reporter and we don't run CI 
 here. I just want to hook up some presentation layer to reports 
 generated by ci. Can I specify some formatter options to ci_reporter 
 at run time about where to put the report files rather than the 
 default place?
Yes there is an option to change where the reports are generated. It is 
described in the ci_reporter documentation.
 How do you consolidate the reports into one summary file?
I use cruise control.net.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Best Combination - for Modal Dialog/Vista

2007-06-29 Thread Bret Pettichord
Michael Kernaghan wrote:
 I am looking for a good test example somewhere. I have got a simple 
 one to work so far. The modal dialogs I actually have to test for real 
 are more complex, and in fact involve stacked frames in modal dialogs.
Have you looked at our unit tests?

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


Re: [Wtr-general] IE.new_process hangs my program

2007-06-27 Thread Bret Pettichord
Shawn Anderson wrote:
 When running IE.new_process, my process hangs.  On my parallels XP it works 
 fine, on my other machine (hardware)XP it hangs.

 Both machines are running ruby 1.8.6, with the 1192 gem.  Are there any 
 machine or IE settings that could cause this to happen?
   
There are some changes to the code in trunk in this area that might 
cause different behavior.

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


Re: [Wtr-general] Problems with Test::Unit in Eclipse

2007-06-27 Thread Bret Pettichord
jim_matt wrote:
 Either I don't get it, or I am not making myself clear.  I am running 
 Eclipse 3.2.2 and the latest version of RDT.

 I have statements in my files like the

 $:  File.expand_path(File.dirname(__FILE__))

 That is not the problem!  YOU HAVE TO BE ABLE TO OPEN A FILE BEFORE THE 
 ABOVE LINE WORKS!
 When I try to run my top level suite file that requires all my other test 
 files from Test::Unit inside Eclipse, it cannot find the top level file.  If 
 I run the top level suite file from Run Ruby, it finds the file and executes 
 it.

 The problem is that Test::Unit in Eclipse cannot find the first file to run 
 so it never gets a chance to execute the

 $:  File.expand_path(File.dirname(__FILE__))

 Jim
   
At this point it sounds like you need to reinstall Eclipse.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Bret Pettichord
Lennart Borgman (gmail) wrote:
 Actually IO#sync means that you should call the sync method on an object 
 that belongs to the IO class. It does not represent executable Ruby 
 code. In your case it means to do $stdout.sync, as originally suggested.
 

 Thanks, I had no idea of that. Is that some kind of meta language for 
 Ruby or is it more general?
   
It is a Ruby-specific meta language. It is often used in rdoc. I've seen 
this lead to lots of confusion.

I would express this idea (IO#sync) thus:
  io.sync = true

And the reader would then have to understand that io was an instance 
of the IO class.

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


Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Bret Pettichord
Lennart Borgman (gmail) wrote:
 Bret Pettichord wrote:
   
 It is a Ruby-specific meta language. It is often used in rdoc. I've seen 
 this lead to lots of confusion.

 I would express this idea (IO#sync) thus:
   io.sync = true

 And the reader would then have to understand that io was an instance 
 of the IO class.

 Bret
 


 In my case I believe it would have lead to even more confusion. Maybe I 
 could have understood something like

#IO#.sync = true

   
Actually we use the alternate i'm suggesting all the time on this list, 
when we do

ie.text_field(:id, 'foo').set('bar')

I suspect that people find this easier to understand than

#IE#.text_field(:id, 'foo').set('bar')

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


Re: [Wtr-general] Hiding IE

2007-06-25 Thread Bret Pettichord
Lennart Borgman (gmail) wrote:
 [EMAIL PROTECTED] wrote:
   
 Yes.  Either pass -b to watir as a command line option, or set
 $HIDE_IE = true before calling Watir::IE.new.
 

 Thanks. That worked nicely.
I'm surprised to hear that. Those mechanisms are just automatic ways of 
doing what you tried in the first place.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bret Pettichord
Ah, good call. Another way to cure it might be to disable buffering
 for $stdout completely, with:

  $stdout.sync = true
 


 Thanks. I looked for the syntax for that. I saw something like

IO#sync =  true

 That did not seem to work. Has it changed?
Actually IO#sync means that you should call the sync method on an object 
that belongs to the IO class. It does not represent executable Ruby 
code. In your case it means to do $stdout.sync, as originally suggested.

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


Re: [Wtr-general] UnknownObject Exception when running test cases

2007-06-25 Thread Bret Pettichord
Tiffany Fodor wrote:
 Am I missing something?  Any help would be appreciated!
   
You'll have to share more of your code with us for us to help.

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


Re: [Wtr-general] Hiding IE

2007-06-25 Thread Bret Pettichord
Lennart Borgman (gmail) wrote:
 Bret Pettichord wrote:
   
 Lennart Borgman (gmail) wrote:
 
 [EMAIL PROTECTED] wrote:
   
   
 Yes.  Either pass -b to watir as a command line option, or set
 $HIDE_IE = true before calling Watir::IE.new.
 
 
 Thanks. That worked nicely.
   
 I'm surprised to hear that. Those mechanisms are just automatic ways of 
 doing what you tried in the first place.
 


 The difference is that I now do not see IE flashing bye. Is that surprising?
Yes, it is. But it tells me something interested about Watir. Thanks.

I actually made a recent change with the slim hope that it might have 
this effect, but mostly was pessimistic and didn't notice an improvement 
in my own tests. But maybe it really did work.

Bret

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


Re: [Wtr-general] Ruby/Watir on Vista : watir-1.5.1.1192 and windows-pr-0.6.2 : SetConsoleCommandHistoryMode : RuntimeError

2007-06-25 Thread Bret Pettichord
Michael Kernaghan wrote:

 I have no trouble on Vista with Ruby and Watir 1.4.1. However, in my 
 efforts to do UI with modal Dialog I need to use recent Watir Gem. I 
 installed Ruby and then the latest Gem according to the instructions.

 I get these errors:

 c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.6.2/lib/windows/console.rb:76:in 
 `initialize': GetProcAddress: SetConsoleCommandHistoryMode or 
 SetConsoleCommandHistoryModeA (RuntimeError)

 from 
 c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.6.2/lib/windows/console.rb:76:in 
 `new'

 from 
 c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.6.2/lib/windows/console.rb:76

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `gem_original_require'

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `require'

 from 
 c:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.1/lib/win32/process.rb:6

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `gem_original_require'

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `require'

 from 
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir/ie-process.rb:1

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `gem_original_require'

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
 `require'

 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:47

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in 
 `gem_original_require'

 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in 
 `require'

 This is interesting: 
 http://rubyforge.org/frs/shownotes.php?release_id=11482

 *Notes: *


   Release Name: 0.6.6 http://rubyforge.org/frs/?group_id=85

 *Notes:*  
 * Added the Windows::MSVCRT::IO module  
 * Removed a method from the Windows::Console module  



   

 *Changes:*  
 * Added the Windows::MSVCRT::IO module.  
 * Removed the SetConsoleCommandHistoryMode method from the Windows::Console  
   module. This was a preliminary function for Vista only, and it has since  
   been removed. Thanks go to Drew Colthorp for the spot.  

 Can anyone explain this? Thanks.

 Is it as simple as not having turned off some annoying Vista security 
 poo? I thought I had got them all …


Your error is with windows-pr 0.6.2 and the documentation is from 0.6.6. 
In any case the problem is with the gem. I have both versions installed 
on my vista laptop. Can you track down the problem to a specific version 
of this gem?

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


Re: [Wtr-general] test/unit argument error

2007-06-25 Thread Bret Pettichord
maung aung wrote:
 Hi, 
 When i wrote the following statement and run ruby, i got this message: 
 c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:64:in `initialize': wrong number 
 of arguments (1 for 3) ArgumentError). When i run without test/unit case, it 
 run just fine and no complaints. Could anyone help me with this? 


 require 'watir'
 require 'test/unit'

 class Login  Test::Unit::TestCase

def initialize(site, user_name, passwd)
 @site=site
 @user_name=user_name
 @passwd=passwd
 end
 end

 myLogin1 = Login.ne.testing.com, tester, pwd)
   
That is not the right way to use test unit.

Depending on what the rest of your code looks like, this might work, though:

require 'watir'
require 'test/unit'

class Login  Test::Unit::TestCase

   def setup
@site=$site
@user_name=$user_name
@passwd=$passwd
end
end

$site, $user_name, $passwd = www.testing.com, tester, pwd


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


Re: [Wtr-general] A novel use of Watir

2007-06-25 Thread Bret Pettichord
Manish Sapariya wrote:
 So here we need Apache httpclient, NekoHTML and some Ruby component.
 Does this Ruby component expose IEBrowser?
   
Not as i understand it. They created an emulator instead. They did not 
use IE.

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


[Wtr-general] A novel use of Watir

2007-06-23 Thread Bret Pettichord

I thought you all might find this to be of interest.

Bret

-- Forwarded message --
From: Andrew Geweke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Fri, 22 Jun 2007 10:15:25 -0700
Subject: Re: [jruby-user] Eclipse, JIRB, and long-run production
development.
On Jun 22, 2007, at 6:56 AM, [EMAIL PROTECTED] wrote:

I guess he felt the java folks were in an envious position because
of the
tools available to them for diagnosing the non-functional problems
that
arise when scaling the app. Perhaps there are plenty of tools and best
practices out there for diagnosing/resolving these problems with
jruby that
we're not aware of?? Would you have any suggestions?


I know this isn't exactly what you're asking, but I believe the exact
same things that make Ruby/JRuby a superb language for developing
software can also make it superb for testing that same software,
whether it's functional tests, performance tests, scalability tests,
or whatever.

No language wars, *please*, but here's an interesting concrete
example: we have here an enormous legacy web app written in Java with
a very complex HTML UI that lets users conduct sophisticated
transactions. We need to test its scalability for an upcoming
deployment to tens or hundreds of thousands of users.

Any load-testing tool we have is going to have to 'learn' about how
to manipulate the HTML UI in many complex ways. (You can't just run
prerecorded scripts against it, because there are literally tens of
thousands of different possible user behaviors.) We considered using
JMeter, but this would've involved an enormous amount of time writing
JMeter scripts, maintaining them over time, and probably wouldn't
have been flexible enough anyway. (One of the limitations of JMeter
is that 1 session = 1 thread; if you have 50 users pounding your
server, it's fine. But if you need to simulate 100,000 users over a
week, you lose -- I'm pretty sure you can't create 100,000 threads on
any mainstream OS these days. :-)

Using JRuby, we solved the problem in a novel way, by leveraging our
existing WATIR codebase that was used for functional tests. We
grafted a new backend onto WATIR (easier than it sounds, actually)
that talks not to IE but to the Apache Commons HTTPClient (Java) and
uses the NekoHTML parser (Java) to generate an XML DOM tree (Java).
We have a Ruby layer that emulates enough of the IE DOM on top of
that to allow WATIR to work just fine. Couple that with a nice
scheduler and thread pool, and you suddenly really can instantiate
very large numbers of clients (an Apache Commons HTTPClient object
instance is *much* more lightweight than an IE process) that each run
plain-vanilla WATIR client code to do some very serious scalability
testing.

In this case, JRuby made it all possible -- leveraging existing
mature Java libraries (Apache Commons HTTPClient and NekoHTML) and a
powerful, growing Ruby tool (WATIR) together to get the results we
wanted a *lot* faster than any equivalent solution (and especially in
the future, as using some other tool would've given us two duplicate
very large codebases of testing code that each had to be updated for
every single UI change).

Anyway, in this case, the ability of Ruby to so quickly build and
adapt the tools we needed vastly outweighed any benefit of existing
tools already being built...


-
To unsubscribe from this list please visit:

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

Re: [Wtr-general] display errors without exiting the script?

2007-06-23 Thread Bret Pettichord
mihai wrote:
 i have a link in $ie wich opens me a new window 
 i attach that window to a variable $ie1 like that: $ie1=IE.attach(:title, 
 /bla bla bla/) and i must verify if that window really exist or not
 how do i do that because if that window exist is ok, but if is not exist the 
 script is interrupted and stoped and i dont want that: 
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1192/./watir.rb:1642:in 
 `attach_browser_window': Unable to locate a window with title of (?-mix:bla 
 bla bla) (Watir::Exception::NoMatchingWindowFoundException)
   
Instead of attach use the find method -- it will return false (not 
raise an exception) if it cannot find a window with the specified name. 
Thus:

$ie1 = IE.find(:title, /blah/)
print 'window not found' unless $ie1
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Checking for pending XHRs and timers

2007-06-21 Thread Bret Pettichord
Jeff Fry wrote:
 Hey all,

 Watir.wait() listens to whether IE thinks its done loading, and then 
 checks to see that the main document and any sub documents/frames have 
 finished loading. More and more, there are pages that on load also 
 kick off various XHRs http://en.wikipedia.org/wiki/XMLHttpRequest 
 and timers http://www.w3schools.com/js/js_timing.asp. For me - and 
 possibly for a growing number of folks, testing more AJAXy 
 applications - it would be great to expand wait() to check if there 
 are any XHRs or timers pending, in additional to the checks it 
 currently makes.

 Several questions:
 1. Do you think that expanding wait() to check that all pending XHRs 
 and timers are complete would be a useful change in Watir itself 
 (either in general or as an option for some users)? Or do you think 
 that the problem I'm describing is better solved another way? (Would 
 this be a valuable addition to Watir?)
 2. What would one need to do to get wait() to wait for XHRs and 
 timers? How difficult do you think this would be to add to Watir?
 3. If the changes I'm suggesting don't make sense for watir (e.g. 
 harmful for some users, more difficult to implement than it's 
 worth,...) another alternative I've been discussing with developers 
 here is adding a JS function that my scripts could call. This could be 
 either (A) a function I would call every 0.2 seconds or so that would 
 return true once all XHRs and timers were done, or (B) a JS function 
 that I would call once that would wait for the page to reply that it 
 was done executing all pending XHRs and timers. Any thoughts about 
 which of these would be better / easier to implement?
The first step is to figure out how to do it. Then we can deal with your 
other questions. We would either build the solution into Watir or else 
provide an easy to way to hook the required code in. Actually i think 
the existing error_checker hook might be able to be used for this (maybe 
it should be renamed).

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


Re: [Wtr-general] Where to find watir classes and their methods

2007-06-20 Thread Bret Pettichord
maung aung wrote:
 I am new to ruby and watir. Can any one direct me where I can get more info 
 about watir classes and their methods? Especially related to ie class and its 
 methods. I have been to this site http://wtr.rubyforge.org/rdoc/index.html, 
 but seems like it doesn't contain most updated methods. Or did i not know how 
 to find the info in there. For example, I am looking for the method from 
 watir::ie, button or text_field and its affiliated methods, but it is not in 
 the page I mention earlier. Is there any other places where I can find more 
 information about it? 
   
Load the recent gem (see our Development Builds page on our Wiki), and 
then Start the Rdoc Server and Look at the Rdoc for Watir. Or you can 
download the bonus-zip file and look at the Rdoc there. We've been 
making lots of updates and fixes to the Rdoc lately, so be sure to get 
the latest version.

If these instructions aren't clear, check google for clarification and 
then (if that doesn't help) ask again for details -- i realize this is a 
breezy note.

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


[Wtr-general] And now Rbehave

2007-06-19 Thread Bret Pettichord
I've been using Rspec more and more lately and am working on a article 
describing how i use it. But today, I see this: 
http://dannorth.net/2007/06/introducing-rbehave 
http://dannorth.net/2007/06/introducing-rbehave and realize that 
things are really moving in the Ruby world!

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


Re: [Wtr-general] From comp.lang.ruby

2007-06-19 Thread Bret Pettichord
Paul Rogers wrote:
 From: Kev Jackson [EMAIL PROTECTED]
 Date: Thu, 24 Nov 2005 17:24:33 +0900
 Local: Thurs, Nov 24 2005 2:24 am
 Subject: Watir - evaluation...
 Reply to author | Forward | Print | Individual message | Show original | 
 Report this message | Find messages by this author
 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
   
This post is a little dated.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] frames and url()

2007-06-19 Thread Bret Pettichord
Chong Jiang wrote:
 Sorry, I do not know how to append this message to my previous one in 
 threaded form.
Whatever you did worked, so no worries.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] frames and url()

2007-06-19 Thread Bret Pettichord
Charley Baker wrote:
 I just added url to frame, you might want to download the latest code. 
 Check the wiki faq for installing building the latest gem from source.
Thanks!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Understanding IE's wait method

2007-06-19 Thread Bret Pettichord
Jeff Fry wrote:

 I've been searching for but am unable to find the definition of the 
 .busy and .readyState methods IE is calling. Can you let me know where 
 they are declared (and ideally, how I might discover where they're 
 declared). I assume they are included from something else, but I 
 couldn't figure out where.

These are part of the COM API to the WebBrowser control. They are 
documented here.

http://msdn2.microsoft.com/en-us/library/aa752602.aspx

Well i can't find the doc for busy, but it is somewhere in the MSDN 
weeds. To a large degree, the value of Watir rests in the fact that Paul 
and I waded through this jungle, found the good bits and made them easy 
to find and use.

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


Re: [Wtr-general] Watir no longer always waits for all frames to load completely (gem 1.5.1.1166)

2007-06-19 Thread Bret Pettichord
Brown, David wrote:
 I've been using the development gem 1.5.1.1166 which includes the
 re-written wait logic to test a complex SAP web application.  The main
 content that I am automating is nested 4 frames deep.  Up until this
 past Friday this version of watir seemed to handle waiting for all of
 the inner frames to load properly.  Now however this wait logic isn't
 always waiting until the pages load completely which causes my scripts
 to fail.  I don't think there have been any changes in the web app I'm
 testing which would cause this. I did happen to install the
 important/critical Microsoft security patches for June which could have
 effected watir?
  http://www.microsoft.com/technet/security/bulletin/ms07-jun.mspx

 Has any one else experienced this problem with the new wait logic not
 waiting quite long enough when there are many nested frames?
   
What happens if you use an earlier Watir gem, before we rewrote the 
frame wait logic?

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


Re: [Wtr-general] Watir no longer always waits for all frames to load

2007-06-19 Thread Bret Pettichord
Brown, David wrote:
 Gems prior to 1.5.1.1166 would either give me the access denied errors
 as it tried to wait for the inner frames to load - or if those were
 suppressed, I had to put in a manual wait whenever I navigated to a new
 page:  sleep 0.1 until some_element_on_inner_frame.exists?.  After
 installing 1166 all of these delay problems were fixed... Until now.  

 Now that this issue has surfaced I'm forced to put the manual delays in
 again. It is not a big deal to do this, but, it's always cleaner if
 watir handles the delays properly.

   
Could you please open up a jira ticket for this problem?

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


Re: [Wtr-general] Load Error

2007-06-18 Thread Bret Pettichord
Max Russell wrote:

  can you post your test script? it would help to diagnose your problem.

  

 # Simple test harness

What was your original question? Your reply was not indexed with the 
original post.

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


Re: [Wtr-general] OT: Is cruisecontrol.rb by thoughworks is withdrawn

2007-06-18 Thread Bret Pettichord
Manish Sapariya wrote:
 I am trying to access following url for last two days,
 but no success.

 http://cruisecontrolrb.thoughtworks.com/

   
See http://rubyforge.org/projects/cruisecontrolrb/

Both Alexey and Jeremy have made commits in the past week, but it does 
look like the project has lost some degree of support from TW.

Here's the place to ask: 
http://rubyforge.org/pipermail/cruisecontrolrb-users/
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Not able to find the title of newly opened window.

2007-06-18 Thread Bret Pettichord
kumari wrote:
 i think the window doesn't have URL ,it has only tiltle which can't be 
 caputred before clicking the link.And the title is with respect to name of 
 the person which changes depending on the link which we r clicking.
Every browser window has a URL. Sometimes the browser will hide the URL 
widget. But it still has a URL and watir can use it.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Method Precedence confusion

2007-06-18 Thread Bret Pettichord
Adam Reed wrote:
 Glad I could help.  One thing you'd have most likely noticed if you were
 to run those 66 separate functions is an RPC Error that would stop
 your testing cold.  Eventually IE can't open/close fast enough to keep
 up with the script, and basically crashes itself.  So, you're already
 one step ahead on best practices there.
   
Actually, this problem can be avoided if you use the latest version of 
Watir and the new IE.new_process method. This is what i am using in my 
tests when i have to close and re-open the browser.

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


Re: [Wtr-general] Breaking code into several classes and methods

2007-06-17 Thread Bret Pettichord
Jeff Fry wrote:
 It complains about this line in particular:
   if $ie.link(:text, page.link_to_text).exists?

 But when I try it in irb it seems that page.link_to_text shouldn't be 
 a problem:
 irb(main):040:0 $page = Page.new(c_eastwood, 
 /view?id=%239202a8c04000641f8056de6, Mystic River)
 = #Page:0x2dafe24 @link_to_test=Mystic River, 
 @url=/view?id=%239202a8c0400641f80056de6, @key=c_eastwood
 irb(main):041:0 $page.link_to_test
 = Mystic River
you've confused link_to_text for link_to_test
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Understanding down_load_time on AJAXy pages

2007-06-17 Thread Bret Pettichord
Jeff Fry wrote:
 100.times do
   url = $url_root + /view?id=%239202a8c04000641f80056de6
   start = Time.now
   $ie.goto(url)
   if $ie.link(:text,'Million Dollar Baby').exists?
 $results_array  $ie.down_load_time.to_s
 p '$ie.down_load_time: '+$ie.down_load_time.to_s
   else # there's a problem with the page
 $results_array  'e'
 p 'e'
   end #if
   took = Time.now - start

 I'm curious why I get up to .5 seconds more for 'took' than I do for 
 down_load_time. Does down_load_time have a way of knowing when 
 everything on the page has finished loading on a page where various 
 elements render in phases?
You should take a look at the code in the wait method that compiles the 
download_time (which really is the page load time).

ie.goto calls navigate before starting the counter, you could measure it 
to see how much time it is taking.

You are also calling ie.link().exists? before stopping your counter and 
it is also probably taking some time.

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


Re: [Wtr-general] how to properly use the snippet function?

2007-06-17 Thread Bret Pettichord
reinier wrote:
 I am trying to get rid of all cookies via a function.
 On this forum I found the Snippet thingy.
 http://rubyforge.org/snippet/detail.php?type=snippetid=26
 So I included that code in my script and trying to use it, but I can't figure 
 out how.

 this is the code:
 [code]
 DeleteUrlCacheEntry = Win32API.new(wininet, DeleteUrlCacheEntry, ['P'], 
 'V')
 [/code]

 So what function should be called to delete all the cookies
main

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


Re: [Wtr-general] Our contribution to Watir

2007-06-16 Thread Bret Pettichord
Bach Le wrote:
 The details can be found at  
 [http://jira.openqa.org/browse/WTR-162|http://jira.openqa.org/browse/WTR-162] 

 Please take a look and contribute any comments or code where you can. Any 
 help would be appreciated.
   
Thanks for the contribution. We will be looking at it.

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


Re: [Wtr-general] Our contribution to Watir

2007-06-16 Thread Bret Pettichord
Charley Baker wrote:
 It's great to have user contributions, I haven't had a chance to look 
 at it yet,  but will soon. Instead of adding it to a jira ticket, you 
 should add it to the user contribution area of the wiki on openqa. 
 http://wiki.openqa.org/display/WTR/Contributions
I've been talking the people at Webmetrics off-list. They would like 
their enhancements to be bundled in the watir gem. I explained that we 
would need unit tests and need to review the enhancements for 
consistency with the Watir design principles. Submissions via Jira are 
appropriate for this kind of thing. For changes, we prefer a patch file, 
but since this submission amounts to a monkey patch, it's current form 
is acceptable.

Just for the record, we don't have these constraints (tests, 
consistency) for code that submitted to the contributions page of the wiki.

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


Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-15 Thread Bret Pettichord
Jeff Fry wrote:

1. When we say if you are using the Watir::IE#modal_dialog method,
   you must use Ruby 1.8.2-14 and not a more recent version. Do we
   really mean 1.8.2-14? It sounds like 1.8.2-15 worked correctly
   with --include-dependencies. Can we safely just change
   references from 1.8.2-14 to 1.8.2-15?
2. If not, should we change the above to:

Yeah, i'm wondering if we should just tell people not to use 1.8.2-14.
 To Install Watir:
Best way to install is to use the gem.
From your command line:
   gem install win32-process
You will be prompted to install dependencies. Say yes.
   gem install watir
This will download and install watir, win32-process and all 
 dependencies.

 One more question: Do these instructions change in any way if you have 
 a previous version installed? If so, what should I know to add?

Yes. See here for details: 
http://wiki.openqa.org/display/WTR/Development+Builds
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] OT-ish: How many reqistered OpenQA Watir users?

2007-06-15 Thread Bret Pettichord
Chris McMahon wrote:
 I'm interested in how many registered users the project has.
 Other information like page traffic, downloads, would be fun to know also.
   
I don't believe users register for specific projects. You can ask 
Patrick for the other information.

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


Re: [Wtr-general] Microsoft Tab Strip Issues - urgent

2007-06-15 Thread Bret Pettichord
Can you find the session key in the page itself?

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


Re: [Wtr-general] frames and url()

2007-06-15 Thread Bret Pettichord
Chong Jiang wrote:
 Is there some way to return the url of a frame, for example, 
 ie.frame(:index, 1), so I can navigate to the page with a goto?
ie.frame(:index, 1).url
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Microsoft Tab Strip Issues - urgent

2007-06-14 Thread Bret Pettichord
imran wrote:
 Actually its a Microsoft Tab Strip, the better way to explain it i found a 
 link.
 Please follow it.

 http://msdn2.microsoft.com/en-us/library/ms529257.aspx

 Thanks waiting for the response.
   
OK. That is not ActiveX (i guessed wrong). It is a server-side code. 
When it hits the browser, it will be transformed into traditional HTML 
elements. You can see them using View Source. That is what Watir works with.

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


Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-13 Thread Bret Pettichord
Željko Filipin wrote:
 On 6/8/07, *Bret Pettichord* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:
 I just installed ruby182-14.exe on clean xp pro machine. Components: 
 only RubyGems Package Manager. Then I tried to install 
 watir-1.5.1.1192.gem. I first executed

 Y:\gem install win32-process --include-dependencies

 and got this error message.

 Y:\c:\ruby\bin\ruby.exe c:\ruby\bin\gem install win32-process 
 --include-dep
 endencies
 ERROR:  While executing gem ... (OptionParser::InvalidOption)
 invalid option: --include-dependencies

 I uninstalled ruby182-14.exe and installed ruby182-15.exe and did not 
 get that error message. Am I doing something wrong?
Probably not. My guess is that you have run into a problem with the 
version of rubygems installed with 182-14. What happens if you don't use 
the --include-dependencies option?

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

Re: [Wtr-general] Upgrading the gem for watir 1.5.1.1192

2007-06-13 Thread Bret Pettichord
imran wrote:
 But there is another query.
   
If you have a new question, please submit it under a (different) subject 
line that describes the problem.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] NoMethodError :Undefined method Process_id for 1808:Fixnum

2007-06-13 Thread Bret Pettichord
Simba wrote:
 When i Run Below is code in IRB ,its throwinf error 
 require 'watir'
 ie=Watir::IE.start(www.google.com)

 Error :
 NoMethodError :Undefined method Process_id for 1808:Fixnum

 Please some body tell me why this error is coming?

 Before Going into IRB , I had installed Win32-process 0.4.0  
 Watir-1.5.1.1158.gem
   
Could you please provide a stack trace?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Microsoft Tab Strip Issues - urgent

2007-06-13 Thread Bret Pettichord
This looks like an ActiveX control. I don't know how to handle ActiveX 
controls with Watir. Can you point us to a page that includes this control?

Bret

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


Re: [Wtr-general] $ie show/hide?

2007-06-12 Thread Bret Pettichord
mihai wrote:
 can i hide my IE page while its being test?
 something like:

 $ie.hide
 #test command
 $ie.show
$ie.visible = false
# test
$ie.visible = true
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Concurrent tests, different regions...

2007-06-11 Thread Bret Pettichord
eisdrache wrote:
 I understand what you are saying about the global variables, but in this case 
 they are a necessary evil as I am using the following code in order to handle 
 javascript pop-ups:

 def startClicker( button , waitTime= 9, user_input=nil )
  hwnd = $ie.enabled_popup(waitTime)  
  if (hwnd) 
   w = WinClicker.new
   if ( user_input ) 
w.setTextValueForFileNameField( hwnd, #{user_input} )
   end
   sleep 3 
   w.clickWindowsButton_hwnd( hwnd, #{button} )
   w=nil
  end
 end
Using this code with multiple threads will eventually fail 
unpredictably. You need to pass in the ie object as a parameter to avoid 
this.

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


Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-09 Thread Bret Pettichord
Jeff Fry wrote:

 Looks good to me...and now checked in.
Thanks. I can never remember what is documented where.

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


Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-08 Thread Bret Pettichord
Simba wrote:
 Since one month I have been trying to implement Watir in our project , but 
 still now i am struggling to decide which combiniation of ruby  watir suites 
 my project.Presently i am using Raby 1.8.2  Watir-1.5.1.1158 this will work 
 fine for javascriptscript alert box 's but won't support Modal_Dialog  
 Javascript events,Please some body tell me in which combination of ruby and 
 watir i can get these Modal_Dialog  Javascript events features.
The IE#modal_dialog command only works with Ruby 1.8.2. You can use the 
latest version of Watir 1.5.

Bret


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


Re: [Wtr-general] Best Combination of Ruby and Watir

2007-06-08 Thread Bret Pettichord
I suggest this:

quote
Best is to use Ruby 1.8.2-14 or later.
However, if you are using the Watir::IE#modal_dialog method, you must 
use Ruby 1.8.2-14 and not a more recent version.
Watir (in general) will not work with Ruby 1.8.1-13. (This version of 
Ruby has a bad WIN32OLE library.)
/quote

Jeff Fry wrote:
 Thanks. Is this an accurate correction then?

 To Install Ruby:http://ruby-lang.org
Best is to use Ruby 1.8.2-14.
Most of Watir works with newer versions of ruby as well, but 
 IE#modal_dialog requires the 1.8.2 WIN32OLE library.
It will NOT work with Ruby 1.8.1-13. (This version of Ruby has a 
 bad WIN32OLE library.)

 Jeff

 On 6/8/07, *Charley Baker* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 modal_dialog only works for 1.8.2 currently since that's the
 version of Ruby that the win32ole.so library was compiled against.
 Bret added an error if you try to use this feature in newer
 versions of Ruby. If you need modal_dialog, you're limited to 1.8.2.

 -c

 On 6/8/07, *Jeff Fry*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:



 On 6/8/07, *Bret Pettichord* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:


 The IE#modal_dialog command only works with Ruby 1.8.2.
 You can use the
 latest version of Watir 1.5.

 Oops. This may not be clear in the rdocs. To be clear, are you
 saying that the IE#modal_dialog command works with ruby 1.8.2
 but not with earlier OR later versions?

 Currently readme.rb says:
 Best is to use Ruby 1.8.2-14 or later.

 Should I change that?


 -- 
 http://testingjeff.wordpress.com
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org mailto:Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general



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




 -- 
 http://testingjeff.wordpress.com
 

 ___
 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] Concurrent tests, different regions...

2007-06-08 Thread Bret Pettichord
Paul Carvalho wrote:
 Without seeing more of the code, I'm pretty sure you need to start by 
 moving away from using Global variables.
I agree. You also will want to run each test in a separate thread.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] forum do not get the postings made using the mailing list

2007-06-07 Thread Bret Pettichord
Manish Sapariya wrote:
 This particular mail is targeted to the admin of watir-general
 forum on openqa.org. This may be known issue, but I observed that the 
 postings
 done using mailing list mail id, does not get reflected in the
 forum and many user's are using just forum for discussing the
 queries.

 Is there any way to make sure that the postings do get copied
 to forum?
   
Thanks for the report. The admin of the openqa forums is Patrick 
Lightbody and he does not read this list. He can be contacted at 
[EMAIL PROTECTED]

Because of the increased traffic on this list and the ongoing troubles 
we have had keeping the forums and mailing list synchronized, I have 
been considering migrating watir-general to google groups. I would like 
to hear comments on this idea, as well as other suggestions.

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


Re: [Wtr-general] Modal dialog

2007-06-07 Thread Bret Pettichord
Hayato wrote:
 Does anyone know how to resolve this issue? Please let me know.
   
Don't use threads. Blocking COM calls will block ALL ruby threads. 
You'll have to spawn code to run in a separate process instead.

Bret



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


Re: [Wtr-general] Upgrading the gem for watir 1.5.1.1192

2007-06-05 Thread Bret Pettichord
imran wrote:
 But still the code asking me to upgrade to 1.5.1.1100.
   
What message are you seeing? What is the exact language?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] gem error installing 'builder'

2007-06-05 Thread Bret Pettichord
jim_matt wrote:
 So far, all my scripts are working without a problem.
  
Thanks for the report.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Wait issue with file_field.set, solution

2007-06-04 Thread Bret Pettichord
I'm responding to an old thread -- catching up on my email. In this 
proposal (from March), Ethan provided a Jira ticket and code patches. 
http://jira.openqa.org/browse/WTR-146

My understanding is that this proposal can be summarized in two points.

1. Provide the same options to Filefield#set as currently exist for 
Element#click.
2. Change the API.

If this is correct, then i would like to consider the two parts of 
proposal separately. If not, i would like to know what else is being 
proposed.

Bret

Ethan Jewett wrote:
 I think that the addition of the click to file_field.set in this
 change (see thread below) is causing one of my tests to hang during
 the @container.wait in the click method.  However, this problem
 didn't show up until after the changes to the wait functionality in
 mid-February.  Or so my theory goes . . .

 The fix, in my case, is to change the click to a click! in
 file_field.set, by-passing the @container.wait in the click method.  I
 suppose I could use a time-out technique instead.

 I can't provide a test case, unfortunately, because I don't have a
 handle on all the javascript eventing and fancy ajax-y reload in
 various frames that's going on in a generated SAP business server
 pages app.  I think this is a relatively well-known issue with
 ajax-like apps.  Please correct me if I'm wrong.

 Attached is a patch to the 1.5.1163 revision that illustrates the way
 I've modified watir.rb to allow me to specify wait behavior in the
 file_field.set method.  The watir 1.5.1163 - no_wait option in
 file_field.set.patch basically throws any extra arguments on
 file_field.set into an args_hash Hash.  The set method then checks
 for the :no_wait key and either clicks or click!s based on that
 key.

 So,

 file_field.set(path)  results in a click
 file_field.set(path, :no_wait = false) results in a click
 file_field.set(path, :no_wait = true) results in a click!

 The upside here is that this doesn't change existing behavior.  The
 downside is that it is kind of a hack as it stands.

 I think that implementing this sort of functionality in a more general
 (and perhaps better thought-out) way would give a lot of flexibility
 to those of us dealing with ajax goodness to manually override wait
 functionality when necessary.  It might also be a reasonably standard
 way to allow granular control of other functionality on a method-call
 by method-call basis.

 Is this reasonable?  Has something like this been decided against in
 the past?  Is it too big a change for 1.5?  Thoughts on problems?
 Improvements?  Maybe using :wait = false instead of :no_wait = true
 would be more intuitive?

 I don't think this patch is ready to go into the code-base as it
 stands, even if people think it is a reasonable approach, but I'll
 submit a Jira ticket once I have something that I think will work.

 Thanks,
 Ethan

 On 1/10/07, Bret Pettichord [EMAIL PROTECTED] wrote:
 John Lolis wrote:
  I registered AutoItX3.dll using regsvr32 and it got rid of the 
 error message, the problem now is it doesn't fill in the field with 
 any text. I can flash it, so i know I have the right field - I just 
 can't put anything in there.
 
  any more ideas?
 

 Today I checked in fixes for both this and the other problem (autoit
 registration). These are NOT in today's dev gem, but will be in the next
 one. You can pull them from trunk if you like.

 A workaround for this problem  for earlier versions of 1.5 is this:

 1. Manually register autoit:

  regsvr32 AutoItX3.dll

 2. Add a call to click:

 ie.file_field(:id, 
 'DriverFileUpload_DriverFileUpload').set(filename)
 ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').click

 Please let us know if either of these solutions does not fix this
 problem for anyone.

 Bret
 ___
 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 mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-06-03 Thread Bret Pettichord
Paul Rogers wrote:
 why not put your login code into a login class, and have th test class 
 instantiate that
   
+ 1
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Microsoft Support for Ruby

2007-06-01 Thread Bret Pettichord
Bret Pettichord wrote:
 Some of you may have seen some of the recent announcements from 
 Microsoft regarding their plans to support Ruby in the .Net environment. 
 This is an excellent post that analyzes the impact that this may have: 
 http://martinfowler.com/bliki/RubyMicrosoft.html
   
Here is a response from Microsoft's lead Ruby developer.

http://www.iunknown.com/2007/05/microsoft_and_i.html
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Fox Test Runner

2007-06-01 Thread Bret Pettichord
Have any of you gotten the Fox Test Runner to work? This is used if you 
run your Test::Unit based tests using the  -rf command line switch.

I have installed fxruby-1.6.11.gem and RXRuby-1.6.11-ruby186.exe, but 
still get this error:

  no such file to load -- fox (LoadError)

I'm guessing that this is a version problem with Fox. Wdyt?

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


Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-05-31 Thread Bret Pettichord
aidy lewis wrote:
 If I write this

 code
 require 'test\unit'

 class Login  Test::Unit::TestCase

 end

 login = Login.new
 /code

 I receive

 'in `initialize': wrong number of arguments (0 for 1) (ArgumentError)'
   
You will want to review the rdoc for test-unit: 
http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html

And specifically for Test::Unit::TestCase: 
http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestCase.html

Thus:

require 'test\unit'

class Login  Test::Unit::TestCase
  def test_nothing
  end
end

login = Login.new 'test_nothing'


However, i still have no idea what you are trying to do. Why do you want 
to instantiate a test case?

Bret



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


Re: [Wtr-general] maxLength Validation

2007-05-31 Thread Bret Pettichord
Paul Rogers wrote:
 I added the patch for watir.rb to the jira ticket
   
thanks for the patch. I committed it to trunk.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Bret Pettichord
Fletch wrote:
 I have created a couple of large test suites, which use LOTS of requires

 require 'dir/test1'
 require 'dir/test2'
 ...
 require 'dir/test25'

 In an effort to create tidier looking code, is it possible to use something 
 like Java would have to import, or 'require' all the files in one line.

 import dir.*
   
Replace your require's with this:

Dir['dir/*.rb'].each{|x| require x}
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] instantiate a class that inherits from Test::Unit

2007-05-30 Thread Bret Pettichord
aidy lewis wrote:
 #Is it possible to instantiate a class that inherits from Test::Unit
   
Yes it is. Why do you ask? Did you try this and run into trouble? What 
kind of trouble?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Microsoft Support for Ruby

2007-05-30 Thread Bret Pettichord
Some of you may have seen some of the recent announcements from 
Microsoft regarding their plans to support Ruby in the .Net environment. 
This is an excellent post that analyzes the impact that this may have: 
http://martinfowler.com/bliki/RubyMicrosoft.html

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


Re: [Wtr-general] maxLength Validation

2007-05-29 Thread Bret Pettichord
Fletch wrote:
 I have been looking for a solution to this problem, and was wondering if 
 anyone could give me some advice.
 I noticed yesterday that WATIR did not pay any attention to the maxLength of 
 the text_field.

 I have tried using name.set(abc) and name.value = abc but both are still 
 going over the allowed limit.

 The solution that I have come up with (and it is not a good solution) is to 
 truncate the name.

 nameSize = name.size
 maxSize = frame.text_field(:name, 'Name').maxLength
 if (vinSize  maxSize)
 puts(Bigger than maxLength - #{vinSize} -- #{maxSize})
 name = name[0, maxSize]
 end

 This does the job in so far as the maxLength limits are observed, but is 
 there a better solution to the problem?

   
This has been a frequently mentioned problem. I think we should consider 
it a defect in Watir. Please go ahead and open a Jira ticket on it, and 
we can go ahead and fix it.

The TextField#set method should limit to max length automatically.

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


Re: [Wtr-general] maxLength Validation

2007-05-29 Thread Bret Pettichord
Paul Rogers wrote:
 Im sure there is code in the set method to limit it to the max size - did it 
 somehow get broken?

   
It's certainly possible. We don't have any unit tests for this feature, 
and the code supporting it is wrapped in a begin/rescue block. So if it 
fails, it would fail silently.

Bret

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


Re: [Wtr-general] Losing ie handle on multiple concurrencies

2007-05-27 Thread Bret Pettichord
Michael Sofaer wrote:
 The newest gem has fixed the problem I was having with segmentation
 faults, and I have been able to get up to 8 concurrent windows running,
 but now I am hitting a new problem when I try to get to 12.

   
Michael,

Please start a new thread for this. You replied to the RDOC thread, 
changing the subject. But i use a threaded newsreader, that watches the 
reply to ID's and therefore can tell (despite the title change) that it 
is part of the RDOC thread.

Bret

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


Re: [Wtr-general] want to enter URL manualy

2007-05-25 Thread Bret Pettichord
Shalini,

Could you please try to include more information in your posts to this 
list. It can try the patience of the few people we have who are 
answering questions here when incomplete information is posted.

In your case, you need to take another look at the stack trace you 
posted and then you tell us what it means to you. If you don't 
understand it at all, then that is the first problem.

Bret

SHALINI GUPTA wrote:
 hi,

 it just start ruby.exe and with in a  second  it  ends.
 and gives this error
 1) Error:
 test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
 Watir::Exception::UnknownObjectException: Unable to locate object, 
 using name and Login
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:2413:in 
 `assert_exists'
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:2642:in 
 `enabled?'
 c:/ruby/lib/ruby/gems/1.8/gems/watir- 
 1.5.1.1166/./watir.rb:2417:in `assert_enabled'
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir.rb:4016:in 
 `set'
 homepage.rb:90:in `adg_Homepage_launch'
 homepage.rb:51:in `start_ADGDashboard'
 homepage.rb:60:in `test_ADGDashboard_Homepage'
  Regards
 shalini Gupta

 On 5/24/07, *Charley Baker*  [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi Shalini,

   There shouldn't be a need to use $ie.wait

 $ie = IE.new   # creates a new browser window

 Now you can enter your url manually if you want. How is this not
 working?

 -Charley

 On 5/24/07, *SHALINI GUPTA*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Hi all,

 I want to enter URL in address bar of my project manually.so i
 have tried this
 $ie=IE.new()
 $ie.wait()

 But previously it was working but now its not working.
 i have changed my watir version from 1.5.1127 to 1.5.1166

 is it the problem??

 Please help
 Thanks In advance!!

 Regards
 Shalini Gupta

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



 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org mailto: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 mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bret Pettichord
Bach Le wrote:
 I thought the two problems are related because in neither instance was watir 
 able to find the window after it was created (I didn't look into the 
 specifics). I did look into it some more after this post and I found out that 
 it was Vista's security settings that caused watir to break. Turning off 
 these security settings fixed it. I don't remember the details right now but 
 as soon as I get my vista box up and running again, I will update the JIRA 
 ticket and this thread with the details. I'm back on my old machine now which 
 is running XP. I'll switch back a little later in the day so I'll update in a 
 few hours.
It would be great if you could get us that information. We've had a lot 
of vista-related complaints lately and this will surely help.

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


Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-25 Thread Bret Pettichord
Jeff Fry wrote:
 Hey y'all, I'm resending these in the hopes of getting info from folks 
 who know what watir actually does better than I do. If you are up for 
 updating the wiki chart, great...but if you just want to email me some 
 corrections, that'd be totally fine too. I'll happily update the chart.
If you want further review, i think someone will need to read through 
the unit tests and compare what is in them with what is in your chart. 
Thanks for putting this together. I think people will find it very useful.

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


Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-25 Thread Bret Pettichord

  Hey Charley - thanks for adding the :action and :method info.

 And thanks to both Charley and Bret for the kind words. I do hope the 
 chart proves useful. In the new version of the Rdoc (not yet checked 
 in) I have replaced lists of supported attributes for each method with 
 a link to this wiki page. Hopefully that will make it easier for us to 
 keep this info current.

 BTW, I just added :href as a supported attribute for links. I don't 
 recall if I ever saw this documented anywhere (it may be something I 
 just tried one day, and it worked). I don't think it was in the most 
 recent version of the rdoc, but it's on the wiki now. If anyone out 
 there looks at this chart and sees a supported attribute that's not 
 listed, please chime in or just add it.
Rather than spend too much effort trying to keep the rdoc and the wiki 
in sync, i suggest that you embed a link to the wiki in the rdoc.

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


Re: [Wtr-general] ie-new-process and rubyw.exe? bug?

2007-05-24 Thread Bret Pettichord
Norm wrote:
 Arg, same thing on my other computer. Must be a bug in the version of watir I 
 am using. Looking at CVS it looks like the ie-new-process has had a lot of 
 changes... I guess I'll wait for the next gem to be released and try a new 
 build, until then I'll have to live with the stray console windows I 
 suppose...
   
None of the changes should make a difference for the issues you are having.

Have you reproduced the problem running ruby from the command line? Or 
have you only tried launching ruby from another tool (e.g. an editor or 
ide)?

 Does anyone know of a way to install watir (gem) to the same directory 
 everytime? For example instead of 
 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1164 just use 
 C:\ruby\lib\ruby\gems\1.8\gems\watir? That would be HUGE for me.
   
The answer is that you would have to manually install watir instead of 
using the gem system. But you shouldn't be doing this unless you already 
know what you are doing -- in which case you wouldn't be asking us the 
question.

Why do you care where Watir is installed?

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


Re: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE

2007-05-24 Thread Bret Pettichord
Željko Filipin wrote:
 On 5/24/07, *Bret Pettichord* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 ie.link(:after, ie.image(:id, 'foo')).click


 Bret, this does not work for me. Am I doing something wrong?
My mistake. Try this instead.

ie.link(:after?, ie.image(:id, 'foo')).click



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

Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bret Pettichord
Bach Le wrote:
 I've installed watir 1165 and tried using IE.new_process on Windows Vista and 
 in both tests and irb, IE.new_process fails. It fails after creating the 
 window when it tries to get the process id from hwnd. 

 I have a coworker who installed this on his Vista machine and it works fine. 


 The problem is that Shell.Application.windows does not get all of the windows 
 but just the ones that are browsing the file system so the IE windows do not 
 show up in this list. It ends up doing in an infinite loop and never breaks 
 out of it.


 Does anyone have any idea how to fix this?
   
Thanks for the report. I've logged this as 
http://jira.openqa.org/browse/WTR-156

I am in the process of migrating this functionality into core watir and 
would like to get problems like this fixed.

I guess the next step is to figure out why the Shell.Application windows 
are not including any of the IE windows. That is definitely a problem, 
and, as stated, would be a core MS bug.

The other possibility might be that it actually is showing up in this 
list, but there could be a flaw in the logic we are using to decide 
whether it is an IE window or not (there have been other flaws in the past).

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


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bret Pettichord
Bach Le wrote:
 Bret, the problem actually exists for IE.new as well. I create a new IE 
 window with IE.new and it creates the window but when I call the goto method 
 to navigate to any page, a new IE window shows up and the navigation is done 
 in that window.


 I've updated the ticket to include this information.
Why do you think the two problems are related?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] ie-new-process and rubyw.exe? bug?

2007-05-24 Thread Bret Pettichord
Norm wrote:
 Does it have something to do with the fact that ie-new-process puts the 
 process id to stdout? Maybe that is what is crashing it when running under 
 rubyw.exe?
   
I recently changed the code in trunk to stop printing the process id, so 
that might explain something...

I'm having a little bit of trouble following the thread and 
understanding exactly what is and isn't working for you. If you could 
summarize, that would help me.

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


[Wtr-general] Watir Development Gem 1.5.1.1192 Released

2007-05-24 Thread Bret Pettichord
A new gem is ready for download. This is the latest pull from Subversion 
trunk, tagged at 1.5.1.1192. This gem has a new install process, due to 
a new dependency on other gems.

  http://wiki.openqa.org/display/WTR/Development+Builds

After downloading the gem, execute the following commands in the same 
directory as the gem:

   gem install win32-process --include-dependencies
   gem install watir

Changes in this release include:

* Migrated IE.new_process from watir/contrib and improved its 
reliability. We now recommend IE.new_process over IE.new as a way to 
avoid numerous errors detailed in http://jira.openqa.org/browse/WTR-150.
* Added IE.start_process. This works like IE.start, but uses the 
new_process mechanism to start IE.
* Added IE.new_window and IE.start_window. This are synonyms for IE.new 
and IE.start.
* Added dependency on the win32-process gem.
* Rdoc updates from Jeff Fry
* Added IE.each, which iterates through the various IE windows currently 
open.
* Updated WindowHelper and watir/dialog to work with IE7


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


Re: [Wtr-general] Seg-faults with 4 ie windows (hello)

2007-05-23 Thread Bret Pettichord
Chris McMahon wrote:
 Maybe try using threads instead of ie-new-process?
   
Not really a good idea. If you want separate sessions you must use 
IE.new_process. Indeed, in trunk, i have changed the default IE.new 
method to actually use the IE.new_process implementation because it 
behaves more reliably and better matches tester/user expectations.

Chris might be thinking of Perl threads, which are native, and can 
accomplish things that Ruby threads (which are green) cannot.

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


Re: [Wtr-general] handling multiple IE

2007-05-23 Thread Bret Pettichord
Jungwhan Kim wrote:
 Thanks for the info. But let's say that the default is IE 7. But how 
 should I start the instance of IE6 in Watir?
  
 Watir starts an IE instance like this,
 ie = IE.new
  
 Is there any way to tell Watir to open a specific version of IE after 
 multiple versions of IE is installed in a single machine?
  
Look at IE.new_process in watir/contrib/ie-new-process.rb.

Bret

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


Re: [Wtr-general] ie-new-process and rubyw.exe? bug?

2007-05-23 Thread Bret Pettichord
Norm wrote:
 Using ruby 1.8.5 and watir 1.5.1.1164. When I use the following code the 
 script stops after opening the browser and doesn't set the text field and 
 move on with the script, can't figure out why!:

 ===
 require 'watir'
 require 'watir/contrib/ie-new-process' 

 $ie = Watir::IE.new_process
 $ie.logger.level = Logger::ERROR
 $ie.goto('www.google.com')
 $ie.text_field(:name, q).set(test)
 ===

 If I use ruby.exe instead of rubyw.exe it works fine!

   
This works fine for me using rubyw.exe, ruby 1.8.5 and the trunk version 
of watir. Would it be possible for you to narrow down the problem a bit 
more?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to clear cache from within watir script?

2007-05-23 Thread Bret Pettichord
Bill Agee wrote:
 Give the script from this page a try:

 http://rubyforge.org/snippet/detail.php?type=snippetid=26

 For a quick demo just copy/paste the whole thing into a file, name it 
 del_cache.rb, and run it.  It always worked fine for me on XP SP2.
   
Thanks for the tip!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE

2007-05-23 Thread Bret Pettichord
SHALINI GUPTA wrote:
 In my project i want to click a link that is variable.i.e user 
 dependent.But always it comes after an image...
 so is there any way to click a link just next to an image.
 please help.Its very urgent
There is an little known feature in 1.5 that supports this:

  ie.link(:after, ie.image(:id, 'foo')).click

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


Re: [Wtr-general] RDOC - Help determining what needs documentation

2007-05-22 Thread Bret Pettichord
Jeff Fry wrote:
 I tried commenting out the empty class in changes.rb as an experiment. 
 I still see changes.rb in Files (as I'd hoped) and no longer see it 
 under Classes (as I'd also hoped). Is there something I'm missing 
 here, or is it alright for me to remove the empty class from 
 changes.rb, license.rb and readme.rb so that they list only under 
 Files, not under Classes?
Your plan sounds fine.

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


  1   2   3   4   5   6   7   8   9   10   >