[wtr-general] Error while running Watir

2009-03-04 Thread amit

Hello,

  I had successfully install watir 1.6.2.

  Now when i try to run an application i get an error which says

This application has failed to start because msvcr80-ruby18.dll was
not found.Re-installing the application may fix the problem

But when i re-installed it i get the same error.I searched on the net
for the above file but couldn't find it.

If anyone had found the solution please let me know.

Thanks,

Amit

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Error while running Watir

2009-03-04 Thread amit

Hello,

The problem which had occurred has been resolved.

Thanks to all those posts regarding the same.

What i had done is..

1:Open the command prompt.
2:gem uninstall win32-api
3:gem install win32-api
4:Various option appeared which are

Select which gem to install for your platform (i386-mswin32)
 1. win32-api 1.4.0 (x86-mswin32-80)
 2. win32-api 1.4.0 (ruby)
 3. win32-api 1.4.0 (x86-mswin32-60)
 4. win32-api 1.3.0 (x86-mswin32-80)
 5. win32-api 1.3.0 (ruby)
 6. win32-api 1.3.0 (x86-mswin32-60)
 7. Skip this gem
 8. Cancel installation
 3
Successfully installed win32-api-1.4.0-x86-mswin32-60
Installing ri documentation for win32-api-1.4.0-x86-mswin32-60...
Installing RDoc documentation for win32-api-1.4.0-x86-mswin32-60...

After successful installation,file had executed successfully

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Error while running Watir

2009-03-04 Thread ray

I have tried like you said, seems not work.:(
My OS is win2003_X64 server.
Any one have occurred this?

On 3月4日, 下午5时10分, amit bemyfriend.a...@gmail.com wrote:
 Hello,

 The problem which had occurred has been resolved.

 Thanks to all those posts regarding the same.

 What i had done is..

 1:Open the command prompt.
 2:gem uninstall win32-api
 3:gem install win32-api
 4:Various option appeared which are

 Select which gem to install for your platform (i386-mswin32)
  1. win32-api 1.4.0 (x86-mswin32-80)
  2. win32-api 1.4.0 (ruby)
  3. win32-api 1.4.0 (x86-mswin32-60)
  4. win32-api 1.3.0 (x86-mswin32-80)
  5. win32-api 1.3.0 (ruby)
  6. win32-api 1.3.0 (x86-mswin32-60)
  7. Skip this gem
  8. Cancel installation 3

 Successfully installed win32-api-1.4.0-x86-mswin32-60
 Installing ri documentation for win32-api-1.4.0-x86-mswin32-60...
 Installing RDoc documentation for win32-api-1.4.0-x86-mswin32-60...

 After successful installation,file had executed successfully

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Can we check Modal dialog's properties by using Watir

2009-03-04 Thread Prince3105

Hi any idea??

On Mar 3, 10:58 am, Prince3105 prince3...@gmail.com wrote:
 Hi Experts,

 Just i want to check the modalDialog's properties like enabled,
 readonly... I have searched enough but cant get a solution. If is it
 possible of validating the properties of a ModalDialog, please post
 the reference url .

 Thanks,
 Prince3105
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] clicking on a link, with certain parameters changing every time

2009-03-04 Thread Rasika

Hi All,

The web page I am accessing has all links as 'href', no name, no id.
 Most of the links I can access by text
 But there is a specific link, where text as well as certain parameters in 
 href also change
 right now I can access it with index, but that is also subject to change.

below is the link,
http://a3.alienaa.com/cgibin/fish.fcgiemail=yobtuol...@hotmail.co.ukpass=step=load2row=4col=5hooks=lhookrod=logbbait=doughloc=oceanwanting=fking4,5

now the issue is, I have to grab, numbers (4,5) at the end of the link
and us them at next page.

How do I do that?

looking for a helpful response.
Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] does watir supports silverlight?

2009-03-04 Thread POS

Hi

I am trying to automate silverlight applications. currently am working
with Testpartner tool. Testpartner doesnt supports SilverLight.

Does Watir supports Silverlight?
So can somebody help me with necessary information regarding this?

Thanks in advance

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: popup handling

2009-03-04 Thread bwaybandit

what browser are you using?

On Mar 3, 6:45 am, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi friends,
 I am getting an error while handling the popup. I have attached the
 code and following is the error message��

 :/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
 enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32
 (NameError)
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/
 custom_require.rb:31:in `gem_original_require'
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/
 custom_require.rb:31:in `require'
 from Login.rb:3

 Exit code: 1

 My code is--

 
 require 'watir'
 require 'test/unit'
 require 'watir/contrib/enabled_popup'

 def startClicker( button , waitTime, user_input=nil )
   # get a handle if one exists
   hwnd = $ie.enabled_popup(waitTime)
   if (hwnd)  # yes there is a popup
 w = WinClicker.new
 if (user_input )
   w.setTextValueForFileNameField( hwnd, #{user_input} )
 end
 # I put this in to see the text being input it is not necessary to
 work
 sleep 3
 # OK or whatever the name on the button is
 w.clickWindowsButton_hwnd( hwnd, #{button} )
 #
 # this is just cleanup
 w=nil
   end
 end

 def test_03_TC_RR_003
   $ie.text_field(:name, userName).set()
   $ie.button(:name, Submit).click
startClicker( Ok , 5)

 

 Please help me if anyone has any idea.

 Thanks
 Vikas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Does Watir work with ruby 1.9.1

2009-03-04 Thread German

Hi,

I was trying the same and got errors too. I add more details below.

There problems are caused by required libs that were yet not migrated
to Ruby 1.9.

Here is what i got after i installed a fresh Ruby (1.9.1), then
RubyGems (1.3.1), then Watir (1.6.2):

c:/ruby1.9/lib/ruby/gems/1.9.1/gems/user-choices-1.1.6/lib/user-
choices/arglist-strategies.rb:152: warning: else without rescue is
useless
c:/ruby1.9/lib/ruby/gems/1.9.1/gems/user-choices-1.1.6/lib/user-
choices.rb:1:in `require': c:/ruby1.9/lib/ruby/gems/1.9.1/gems/user-
choices-1.1.6/lib/user-choices/arglist-strategies.rb:148: syntax
error, unexpected ':', expecting keyword_then or ',' or ';' or
'\n' (SyntaxError)
  when 0: # This is not considered an error because another source
 ^
c:/ruby1.9/lib/ruby/gems/1.9.1/gems/user-choices-1.1.6/lib/user-
choices/arglist-strategies.rb:178: syntax error, unexpected
keyword_end, expecting $end
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/user-choices-1.1.6/lib/
user-choices.rb:1:in `top (required)'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir/options.rb:3:in `require'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir/options.rb:3:in `top (required)'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir/browser.rb:2:in `require'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir/browser.rb:2:in `top (required)'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir.rb:6:in `require'
from c:/ruby1.9/lib/ruby/gems/1.9.1/gems/commonwatir-1.6.2/lib/
watir.rb:6:in `top (required)'


The problem is that (the installed version of) the user-choices lib
is not migrated to Ruby 1.9.
The error is described here:
   http://intertwingly.net/slides/2008/oscon/ruby19/17

Bye,

German

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: clicking on a link, with certain parameters changing every time

2009-03-04 Thread bwaybandit

you need to use ruby string functions to get to this.

in this case for example you could (assuming your url is in a variable
called foo), use foo.slice(foo.length-3,3). this would return 4,5. you
can split this off a comma delimiter and get back [4] and [5].  -
test.split','

this will not work for example if you have more than single digits.
for that you will have to know a little more about the urls you are
dealing with. assuming you have these urls you are testing with. you
can use index to get the position of that last value and then use
slice above to get the digits.

this should give you a starting point. you will have to brush up on
ruby string functions though.

On Mar 4, 7:23 am, Rasika rasika.bahiram...@gmail.com wrote:
 Hi All,

 The web page I am accessing has all links as 'href', no name, no id.
  Most of the links I can access by text
  But there is a specific link, where text as well as certain parameters in 
  href also change
  right now I can access it with index, but that is also subject to change.

 below is the link,
 http://a3.alienaa.com/cgibin/fish.fcgiemail=yobtuol...@hotmail.co.ukpass=step=load2row=4col=5hooks=lhookrod=logbbait=doughloc=oceanwanting=fking4,5

 now the issue is, I have to grab, numbers (4,5) at the end of the link
 and us them at next page.

 How do I do that?

 looking for a helpful response.
 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: popup handling

2009-03-04 Thread bwaybandit

k never mind the browser.

require 'watir/contrib/enabled_popup'

that statement needs to move into your class where you are doing your
popup stuff. those global requires kill ya.

On Mar 3, 6:45 am, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi friends,
 I am getting an error while handling the popup. I have attached the
 code and following is the error message��

 :/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
 enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32
 (NameError)
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/
 custom_require.rb:31:in `gem_original_require'
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/
 custom_require.rb:31:in `require'
 from Login.rb:3

 Exit code: 1

 My code is--

 
 require 'watir'
 require 'test/unit'
 require 'watir/contrib/enabled_popup'

 def startClicker( button , waitTime, user_input=nil )
   # get a handle if one exists
   hwnd = $ie.enabled_popup(waitTime)
   if (hwnd)  # yes there is a popup
 w = WinClicker.new
 if (user_input )
   w.setTextValueForFileNameField( hwnd, #{user_input} )
 end
 # I put this in to see the text being input it is not necessary to
 work
 sleep 3
 # OK or whatever the name on the button is
 w.clickWindowsButton_hwnd( hwnd, #{button} )
 #
 # this is just cleanup
 w=nil
   end
 end

 def test_03_TC_RR_003
   $ie.text_field(:name, userName).set()
   $ie.button(:name, Submit).click
startClicker( Ok , 5)

 

 Please help me if anyone has any idea.

 Thanks
 Vikas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Comparing Tag Text when a BR Exists

2009-03-04 Thread Moochie

html
P
   #text   - 123 fake street
   BR
   #text - Crookston, MN 56716

From Excell
text = 123 fake street
  Crookston, MN 56716

$ie.p(:text=text,:index=index).exists?
  puts Pass
else
  puts Failed  - Makes it here.
end

So I had the function insert the text into excel using: to see what
the text actually looks like with BR tages
ts_worksheet.range($results+$ts_row_nbr.to_s).Value =$ie.p
(:index=1).text

It displayed the text Like
123 Fake Street 
Crookston, MN 56716 

If I copy that excel cell to the required cell the excel spread sheet
and run the test again it will pass.

The squares in the above were created using Expanded Ascii, but they
don't work when I manually add them in excel cell, so tell the maual
testers to use that when they see a BR take will not work.

Does anyone know a way to handle this?

I was thinking maybe using wild cards excel
123 Fake Street*
Crookston, MN 56716*

So everytime I see a * i use .gsub('*',/\.*/) but this will doesn't
work because I cannot convert a regular expression into a string.

Or I could create a function that formats the text to look like.
$ie.p(:text=/\123 Fake Street/.*/Crookston, MN
56716,:index=index).exists?

Can anyone help with a soluction to this?

Thanks,

Darin








--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread Jim Matthews

From your first post, I am not sure how you are trying to use
ie.enabled_popup.

I assume you are trying to something like what is described on the
wiki:

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

I do not know which example you are following.  If you take this one
for example,

require 'watir/contrib/enabled_popup'

def popupChecker(text)
Timeout::timeout(2)do
begin
if ie.enabled_popup
hwnd = ie.enabled_popup(5)
w = WinClicker.new
w.makeWindowActive(hwnd)
w.clickWindowsButton_hWnd(hwnd,text)
end
rescue Timeout::Error
puts 'No popup existed'
end
end
end

The strange thing to me is that the error you show references a Watir
frame.  A frame would not have an hwnd associated with it directly, so
I am not sure how you even got the error.

I am trying to use the routine above and am finding that there must be
some things on my system that keep it from working all the time.
Sometimes it dismisses the popup and sometimes it doesn't.

Jim

On Mar 4, 5:26 am, andrew.d...@lthree.com wrote:
 Its not my code that is throwing the error. Here is the code for
 enabled popup from my watir install. The line generating the error is
 hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) - hwnd is
 undefined.

 module Watir
   module PageContainer
     include Win32
     def enabled_popup(timeout=4)
       # Use handle of our parent window to see if we have any
 currently
       # enabled popup.
       hwnd_modal = 0
       Waiter.wait_until(timeout) do
         hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP)
         hwnd_modal  0
       end
       # use hwnd() method to find the IE or Container hwnd (overriden
 by IE)
       if hwnd_modal == hwnd() || 0 == hwnd_modal
         hwnd_modal = nil
       end
       hwnd_modal
     end
   end
 end

 On Mar 3, 1:49 pm, Jim Matthews jim_m...@swbell.net wrote:

  I thought you were having the same problem I am with popups, but I
  think yours is different at this point.

  The window handle is going to be on the browser and not a part of the
  DOM.

  You have to get the hwnd off the browser and go from there.

  Jim

  On Mar 3, 1:16 pm, andrew.d...@lthree.com wrote:

   Trying to execute enabled_popup and it is throwing an exception

    undefined local variable or method `hwnd' for #Watir::Frame:
   0x3d7b4d4

   I checked the source for enabled_popup and it does seem to have an
   undeclared variable. Is this working for other people. Working on
   latest version of watir.- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Comparing Tag Text when a BR Exists

2009-03-04 Thread Darin Duphorn

I've also tried to ignore the BR by using Regexp and wildcards

#Excel Value
123 fake street*
Crookston, MN 56716

#I'm trying to replace * in excel with a wild card to ingnore the BR
tag 
regxmyvar = Regexp.new text.gsub(*,/\.*/) - Does this look correct? 

puts regxmyvar

?-mix:123 fake street\/.*
Crookston, MN 56716)

#This still didn't work.
if $ie.p(:text=/#{regxmyvar}/,:index=1).exists?  
puts MIH3
end



-Original Message-
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Moochie
Sent: Wednesday, March 04, 2009 8:30 AM
To: Watir General
Subject: [wtr-general] Comparing Tag Text when a BR Exists


html
P
   #text   - 123 fake street
   BR
   #text - Crookston, MN 56716

From Excell
text = 123 fake street
  Crookston, MN 56716

$ie.p(:text=text,:index=index).exists?
  puts Pass
else
  puts Failed  - Makes it here.
end

So I had the function insert the text into excel using: to see what
the text actually looks like with BR tages
ts_worksheet.range($results+$ts_row_nbr.to_s).Value =$ie.p
(:index=1).text

It displayed the text Like
123 Fake Street 
Crookston, MN 56716 

If I copy that excel cell to the required cell the excel spread sheet
and run the test again it will pass.

The squares in the above were created using Expanded Ascii, but they
don't work when I manually add them in excel cell, so tell the maual
testers to use that when they see a BR take will not work.

Does anyone know a way to handle this?

I was thinking maybe using wild cards excel
123 Fake Street*
Crookston, MN 56716*

So everytime I see a * i use .gsub('*',/\.*/) but this will doesn't
work because I cannot convert a regular expression into a string.

Or I could create a function that formats the text to look like.
$ie.p(:text=/\123 Fake Street/.*/Crookston, MN
56716,:index=index).exists?

Can anyone help with a soluction to this?

Thanks,

Darin











--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Comparing Tag Text when a BR Exists

2009-03-04 Thread Darin Duphorn

I figured it out.

regxmyvar = Regexp.new text.gsub(*,.*)




-Original Message-
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Darin Duphorn
Sent: Wednesday, March 04, 2009 9:38 AM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: Comparing Tag Text when a BR Exists


I've also tried to ignore the BR by using Regexp and wildcards

#Excel Value
123 fake street*
Crookston, MN 56716

#I'm trying to replace * in excel with a wild card to ingnore the BR
tag 
regxmyvar = Regexp.new text.gsub(*,/\.*/) - Does this look correct? 

puts regxmyvar

?-mix:123 fake street\/.*
Crookston, MN 56716)

#This still didn't work.
if $ie.p(:text=/#{regxmyvar}/,:index=1).exists?  
puts MIH3
end



-Original Message-
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Moochie
Sent: Wednesday, March 04, 2009 8:30 AM
To: Watir General
Subject: [wtr-general] Comparing Tag Text when a BR Exists


html
P
   #text   - 123 fake street
   BR
   #text - Crookston, MN 56716

From Excell
text = 123 fake street
  Crookston, MN 56716

$ie.p(:text=text,:index=index).exists?
  puts Pass
else
  puts Failed  - Makes it here.
end

So I had the function insert the text into excel using: to see what
the text actually looks like with BR tages
ts_worksheet.range($results+$ts_row_nbr.to_s).Value =$ie.p
(:index=1).text

It displayed the text Like
123 Fake Street 
Crookston, MN 56716 

If I copy that excel cell to the required cell the excel spread sheet
and run the test again it will pass.

The squares in the above were created using Expanded Ascii, but they
don't work when I manually add them in excel cell, so tell the maual
testers to use that when they see a BR take will not work.

Does anyone know a way to handle this?

I was thinking maybe using wild cards excel
123 Fake Street*
Crookston, MN 56716*

So everytime I see a * i use .gsub('*',/\.*/) but this will doesn't
work because I cannot convert a regular expression into a string.

Or I could create a function that formats the text to look like.
$ie.p(:text=/\123 Fake Street/.*/Crookston, MN
56716,:index=index).exists?

Can anyone help with a soluction to this?

Thanks,

Darin














--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Does Watir work with ruby 1.9.1

2009-03-04 Thread Thomas Preymesser

2009/2/20 Karthikeyan K mailkar...@gmail.com:

 Since Ruby 1.9.1 is out, I tried installing and it. Now I have problem
 with Watir is it is throwing error on loading libraries (syntax
 error). So my question is, is watir comapatible with Ruby 1.9.1?

in general you can look for 1.9 compatibility at http://isitruby19.com/

-Thomas

-- 
Thomas Preymesser
tho...@gmail.com
http://thopre.googlepages.com/
http://thopre.wordpress.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Sleep function

2009-03-04 Thread maximore

 Hi
I am curious  how the  Sleep  function works. let assume on a  500Mhz
processor   computer .. how is the delay  generated .

  Let say if I want a delay of   5min  or 5sec

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-04 Thread Lisa Crispin
Hi George,
I'm a tester, I have learned enough Ruby to maintain and write new Watir
scripts, and I know enough Java to sometimes be able to look at a traceback
and figure out what the problem might be!

It's a great question, I'm curious to know now too. Most Watir people I know
have solid programming skills, and I think that makes things much easier all
around for using Watir.
-- Lisa

On Wed, Mar 4, 2009 at 8:39 AM, george.sand...@gmail.com 
george.sand...@gmail.com wrote:


 I was just curious to know who is purely a QA tester (like myself) and
 who is both a tester and a developer...
 



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://lisacrispin.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread andrew . dahl

I was basing my code on example 4. Use click_no_wait on a button I
know will cause a popup, and then call enabled_popup. The call from
enabled_popup never returns. I can post the entire exception trace if
that helps.

On Mar 4, 8:26 am, Jim Matthews jim_m...@swbell.net wrote:
 From your first post, I am not sure how you are trying to use
 ie.enabled_popup.

 I assume you are trying to something like what is described on the
 wiki:

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

 I do not know which example you are following.  If you take this one
 for example,

 require 'watir/contrib/enabled_popup'

 def popupChecker(text)
     Timeout::timeout(2)do
         begin
             if ie.enabled_popup
                 hwnd = ie.enabled_popup(5)
                 w = WinClicker.new
                 w.makeWindowActive(hwnd)
                 w.clickWindowsButton_hWnd(hwnd,text)
             end
         rescue Timeout::Error
             puts 'No popup existed'
         end
     end
 end

 The strange thing to me is that the error you show references a Watir
 frame.  A frame would not have an hwnd associated with it directly, so
 I am not sure how you even got the error.

 I am trying to use the routine above and am finding that there must be
 some things on my system that keep it from working all the time.
 Sometimes it dismisses the popup and sometimes it doesn't.

 Jim

 On Mar 4, 5:26 am, andrew.d...@lthree.com wrote:



  Its not my code that is throwing the error. Here is the code for
  enabled popup from my watir install. The line generating the error is
  hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) - hwnd is
  undefined.

  module Watir
    module PageContainer
      include Win32
      def enabled_popup(timeout=4)
        # Use handle of our parent window to see if we have any
  currently
        # enabled popup.
        hwnd_modal = 0
        Waiter.wait_until(timeout) do
          hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP)
          hwnd_modal  0
        end
        # use hwnd() method to find the IE or Container hwnd (overriden
  by IE)
        if hwnd_modal == hwnd() || 0 == hwnd_modal
          hwnd_modal = nil
        end
        hwnd_modal
      end
    end
  end

  On Mar 3, 1:49 pm, Jim Matthews jim_m...@swbell.net wrote:

   I thought you were having the same problem I am with popups, but I
   think yours is different at this point.

   The window handle is going to be on the browser and not a part of the
   DOM.

   You have to get the hwnd off the browser and go from there.

   Jim

   On Mar 3, 1:16 pm, andrew.d...@lthree.com wrote:

Trying to execute enabled_popup and it is throwing an exception

 undefined local variable or method `hwnd' for #Watir::Frame:
0x3d7b4d4

I checked the source for enabled_popup and it does seem to have an
undeclared variable. Is this working for other people. Working on
latest version of watir.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-04 Thread JArkelen

Hi,
I'm a test automater en performance tester and use Watir for our
functional regression tests.

On Mar 4, 6:14 pm, Lisa Crispin lisa.cris...@gmail.com wrote:
 Hi George,
 I'm a tester, I have learned enough Ruby to maintain and write new Watir
 scripts, and I know enough Java to sometimes be able to look at a traceback
 and figure out what the problem might be!

 It's a great question, I'm curious to know now too. Most Watir people I know
 have solid programming skills, and I think that makes things much easier all
 around for using Watir.
 -- Lisa

 On Wed, Mar 4, 2009 at 8:39 AM, george.sand...@gmail.com 

 george.sand...@gmail.com wrote:

  I was just curious to know who is purely a QA tester (like myself) and
  who is both a tester and a developer...

 --
 Lisa Crispin
 Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
 and Agile Teams_ (Addison-Wesley 2009)http://lisacrispin.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Defa

2009-03-04 Thread venky

Hi

I am using

class Index_builderTest::Unit::TestCase
  ...
end

when the execution is finished
i am getting a failure like this


 1) Failure:
default_test(class_name) [test_case_name.rb:45]:
No tests were specified.


i tried my best to find this but i could't figure out. can any body
help in this


Thanks,
Venkat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Defa

2009-03-04 Thread Andy Sipe
The default Test::Unit behavior is to fail a test when there are no tests in
a class.  It does this by injecting a test case called 'default_test'.

What you are seeing is that default behavior.

-andy


On Wed, Mar 4, 2009 at 3:33 PM, venky venkatesh...@gmail.com wrote:


 Hi

 I am using

 class Index_builderTest::Unit::TestCase
  ...
 end

 when the execution is finished
 i am getting a failure like this

 
  1) Failure:
 default_test(class_name) [test_case_name.rb:45]:
 No tests were specified.
 

 i tried my best to find this but i could't figure out. can any body
 help in this


 Thanks,
 Venkat
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-04 Thread Zhimin

I am a developer. We use rWebUnit (extension of Watir) and iTest2 IDE
for our acceptance testing.
We classified test scripts into two parts:
  * high level test cases: written (and reviewed) by  Business
Analysts  Testers (who do not have programming skills)
  * web page classes and support functions: implemented by developers
And it does need close cooperation between BA/testers and developers.
It actually worked quite well for us.

Example test case:

story Login do
  home_page = login_as(tester)
  home_page.click_radio_option(marriage, Single)
  home_page.assert_question_hidden(How many children do you have?)
end


Example page class:  home_page.rb

@@question_lookups = { How many children do you have? = 2 }

def assert_question_hidden(question)
  elem = browser.row(:id, row#{@@question_lookups[question]})
  assert(elem.visible? == false, question #{question} invisible)
end


---
Zhimin Zhan
http://itest2.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-04 Thread Charley Baker
 I'm a test developer, with a background in testing as well as development.
Test scripts and automation testing should be run as development projects -
scm, code reviews, ideally paired programming, branch cuts, working with the
production code developers, running, creating and sharing tests.

There's a spectrum of where you place yourself on the scale between tester
and developer. The question definitely deserves a  longer answer. Something
we tried tackling at the td/dt conf a year or two back. As a side note, I
don't hire people who have no automation experience, there has to be some
scripting skills.

 It's an interesting question.


Charley Baker
blog: http://charleybakersblog.blogspot.com/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Wed, Mar 4, 2009 at 1:00 PM, JArkelen johnvanarke...@gmail.com wrote:


 Hi,
 I'm a test automater en performance tester and use Watir for our
 functional regression tests.

 On Mar 4, 6:14 pm, Lisa Crispin lisa.cris...@gmail.com wrote:
  Hi George,
  I'm a tester, I have learned enough Ruby to maintain and write new Watir
  scripts, and I know enough Java to sometimes be able to look at a
 traceback
  and figure out what the problem might be!
 
  It's a great question, I'm curious to know now too. Most Watir people I
 know
  have solid programming skills, and I think that makes things much easier
 all
  around for using Watir.
  -- Lisa
 
  On Wed, Mar 4, 2009 at 8:39 AM, george.sand...@gmail.com 
 - Show quoted text -
 
  george.sand...@gmail.com wrote:
 
   I was just curious to know who is purely a QA tester (like myself) and
   who is both a tester and a developer...
 
  --
  Lisa Crispin
  Co-author with Janet Gregory, _Agile Testing: A Practical Guide for
 Testers
  and Agile Teams_ (Addison-Wesley 2009)http://lisacrispin.com
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir users: What is your role at work?

2009-03-04 Thread Zhimin

Lisa, Thanks for your comments.

You mentioned Java developers, I am a one (likes programming in Ruby
better though). From personal experiences and observations, I found
programmers tend to not to write as easy-to-read test scripts as
testers because of programming habits.

For example,

Java programmers might write tests like below:

  // in Java, new Date() returns current date
  assertEquals(new SimpleDateFormat(dd/mm/).format(new Date()),
dateValue);

But the following syntax might be better:

  assertEquals(getToday(), dateValue()); // testers don't understand
new Date()

  date_value.should == today # or even better if using Watir and RSpec

Zhimin


On Mar 5, 8:57 am, Lisa Crispin lisa.cris...@gmail.com wrote:
 We do treat the test scripts same as production code, checked in, tagged
 with the builds, pairing etc. But the programmers won't work on the Watir
 scripts much because they prefer working in Java - in hindsight maybe we
 should have gone with a different tool. However, we testers prefer Ruby!

 Zhimin makes a good point that collaboration is a good thing and any tool
 that promotes it is a winner in my book. I like his approach.

 We also wouldn't hire a tester without some scripting skills, but still you
 could have scripting skills and identify yourself as a tester, as I do.
 -- Lisa

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: clicking on a link, with certain parameters changing every time

2009-03-04 Thread Rasika

Thanks for rresponses
I used
ie.link(index,2).text
to fetch the values
value.split to use them in next step.

But another issue,
Index of link always changes, and there is no other attribute to
identify this link.
How can I make sure I am clicking on correct link every time?


On Mar 5, 2:53 am, SuperKevy kpe...@scholarshipamerica.org wrote:
 You want the URL I'm assuming.. then parse that for the info at the
 end

 ---Sample of Google.  Whats the URL to the Privacy link --
 require 'watir'
 include Watir
 ie. = IE.new
 ie.goto('http://www.google.com')
 puts ie.link(:text,'Privacy').attribute_value('href')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Unable to Load mysql.so file

2009-03-04 Thread piyush_pahuja

I want to connect my Ruby code with mysql.
I am working with Windows OS.
I have installed dbi and mysql gem.

But require 'mysql' is not working fine.
It is giving error :-

Invalid access to memory location.  - c:/ruby/lib/ruby/gems/1.8/gems/
mysql-2.7.3-x86-mswin32/ext/mysql.so (LoadError) from c:/ruby/lib/ruby/
site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from
DB_Connect.rb

mysql.so Exists at that location.Then what is the reason for unable to
load.
Can anyone tell me the solution for this problem.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---