[wtr-general] Name of the currently running methods

2009-04-07 Thread Vikas Tulashyam

Hi,
Can I get the name of the currently running methods with the class and
package name. like--

class A

def method()
  puts nameofThecurrentMethod

end

end


let suppose there is a method nameofThecurrentMethod which prints the
name of the currently running method. Is it possible in Watir?

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: How to Drag and Drop a DIV element in Watir

2009-04-07 Thread al3kc

try to check out this one

http://feedraider.com/item/24826/Z-Bar-Zone/Drag-and-Drop-with-Watir/


--~--~-~--~~~---~--~~
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: How to Drag and Drop a DIV element in Watir

2009-04-07 Thread al3kc

try to check out this one

http://feedraider.com/item/24826/Z-Bar-Zone/Drag-and-Drop-with-Watir/


--~--~-~--~~~---~--~~
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] Failing to update gem

2009-04-07 Thread spike

Hi

I'm trying to update gem using the command

gem update

but its failing to update and i'm getting following error.

ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
RUBYLIBDI
R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
ruby mkrf_conf.rb
(in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1)
call rake --nosearch
cl -nologo  -MD -Zi -O2b2xg- -G6  -DWIN32 -DRUBY_VERSION=186  -IC:/
Ruby/include
-IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 -
I. -c gl-1
.0-1.1.c
(in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl)
'cl' is not recognized as an internal or external command,
operable program or batch file.
rake aborted!
Command failed with status (1): [cl -nologo  -MD -Zi -O2b2xg- -G6  -
DWIN32 ...]

(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [call rake --nosearch...]

(See full trace by running task with --trace)


Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-
opengl-0.
60.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/
gem_make.out

please suggest a solution

thankingyou
--~--~-~--~~~---~--~~
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: uninitialized constant Windows::API::Error (NameError)

2009-04-07 Thread frank.li

This issue is windows-pr version
resolution:
Gem uninstall windows-pr
Gem install windows-pr

answer from  http://www.zhuaijun.cn/archives/53

On 3月30日, 下午11时22分, Dennis I. ideler.den...@gmail.com wrote:
 I tried installing Watir at home a while ago and kept getting an
 error. I followed some instructions here from a different discussion
 that mentioned installing and reinstalling some gems.
 That didn't work. And today I tried again. Here is the error that I
 get.

 ruby test.rb

 C:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb:
 59: uninitialized constant Windows::API::Error (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 C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/
 process.rb:3
 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 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
 process.rb:1
 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 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:45
 from test.rb:22
 Test executed on Mon Mar 30 12:14:05 -0300 2009

 Here is the code until where it gets stuck:

 require 'watir'

 time = Time.now.to_s
 puts Test executed on +time

 test_site = http://www.google.com;

 ie = Watir::IE.open(test_site) # this is line 22

--~--~-~--~~~---~--~~
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: Failing to update gem

2009-04-07 Thread JArkelen

If you want to do a general update on all your gems, use gem update --
system
If you want to update a specific gem use gem update gem name

Cheers,
John

On Apr 7, 9:24 am, spike vinaykumarl...@gmail.com wrote:
 Hi

 I'm trying to update gem using the command

 gem update

 but its failing to update and i'm getting following error.

 ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
     ERROR: Failed to build gem native extension.

 rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
 RUBYLIBDI
 R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
 ruby mkrf_conf.rb
 (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1)
 call rake --nosearch
 cl -nologo  -MD -Zi -O2b2xg- -G6  -DWIN32 -DRUBY_VERSION=186  -IC:/
 Ruby/include
 -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 -
 I. -c gl-1
 .0-1.1.c
 (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl)
 'cl' is not recognized as an internal or external command,
 operable program or batch file.
 rake aborted!
 Command failed with status (1): [cl -nologo  -MD -Zi -O2b2xg- -G6  -
 DWIN32 ...]

 (See full trace by running task with --trace)
 rake aborted!
 Command failed with status (1): [call rake --nosearch...]

 (See full trace by running task with --trace)

 Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-
 opengl-0.
 60.1 for inspection.
 Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/
 gem_make.out

 please suggest a solution

 thankingyou
--~--~-~--~~~---~--~~
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: SelectList behaves differently with 1.6.2?

2009-04-07 Thread Jarmo Pertman

As I've stated already on my previous post, I already diffed wait
method and only difference was one additional rescue NoMethodError.
But my problem is not related with that fix, because I'm not receiving
any NoMethodErrors. I still guess that the logic may be behind the
fact that 1.6.2 is slightly faster and thus causing the problems,
maybe some JavaScript function is not doing it's work fast enough and
Watir already continues it's work before form POST parameters have all
been set or whatsoever.

Anyway, thank you for your responses. I will try to look deeper into
the problem and to fix my test.

Regards,
Jarmo

On Apr 6, 6:21 pm, Bret Pettichord b...@pettichord.com wrote:
 There was this fix to the wait logic:
 * Fix for undefined method 'document' error that was occuring when
 loading pages with frames that were slow to load. Reported 
 here:http://groups.google.com/group/watir-general/browse_thread/thread/ddd...

 Based on your previous description, I do not see your current issues as
 indicating a bug in Watir.

 If you want to diff code, you should diff the wait method.

 Bret
--~--~-~--~~~---~--~~
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: How to know if the checkbox is checked or not?

2009-04-07 Thread Jarmo Pertman

Why are you making it to string and comparing with string
representation of TrueClass? You also had only one '=', which makes
your if to be always true.

Correct would be of course
if $ie.checkbox(:name,blah).checked? == true
end

On Apr 3, 4:00 pm, Darin Duphorn dduph...@redbrickhealth.com
wrote:
 Sorry it was checked instead of set.  If you want to validate it true or
 false remember to set it to string.

 if $ie.checkbox(:name,blah).checked?.to_s = 'true'

 end
--~--~-~--~~~---~--~~
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] Problem with popup window

2009-04-07 Thread spike

Hi

I'm using the following code for a popup window,

ie.button(:text, Reset).click_no_wait

hwnd = ie.enabled_popup(5)
if (hwnd)  #yeah! a popup
  popup = WinClicker.new
  popup.makeWindowActive(hwnd)
  popup.clickWindowsButton(Windows Internet Explorer, OK, 30)
end

but i'm getting the following error

C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :text,
Reset (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
284:in `enabled?'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
56:in `assert_enabled'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
220:in `click_no_wait'
from Learntrack.rb:27

please suggest me any code that handles popup.


thankingyou

--~--~-~--~~~---~--~~
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: Failing to update gem

2009-04-07 Thread spike

when i'm using gem update --system
it says nothing to update,

On Apr 7, 1:22 pm, JArkelen johnvanarke...@gmail.com wrote:
 If you want to do a general update on all your gems, use gem update --
 system
 If you want to update a specific gem use gem update gem name

 Cheers,
 John

 On Apr 7, 9:24 am, spike vinaykumarl...@gmail.com wrote:



  Hi

  I'm trying to update gem using the command

  gem update

  but its failing to update and i'm getting following error.

  ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
      ERROR: Failed to build gem native extension.

  rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
  RUBYLIBDI
  R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
  ruby mkrf_conf.rb
  (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1)
  call rake --nosearch
  cl -nologo  -MD -Zi -O2b2xg- -G6  -DWIN32 -DRUBY_VERSION=186  -IC:/
  Ruby/include
  -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 -
  I. -c gl-1
  .0-1.1.c
  (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl)
  'cl' is not recognized as an internal or external command,
  operable program or batch file.
  rake aborted!
  Command failed with status (1): [cl -nologo  -MD -Zi -O2b2xg- -G6  -
  DWIN32 ...]

  (See full trace by running task with --trace)
  rake aborted!
  Command failed with status (1): [call rake --nosearch...]

  (See full trace by running task with --trace)

  Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-
  opengl-0.
  60.1 for inspection.
  Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/
  gem_make.out

  please suggest a solution

  thankingyou- 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: Basic Watir Help

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 12:13, catepillar cmay...@gmail.com wrote:
 div
 div4/2/div
 div97/div
 div95/div
 div100/div
 /div

Also, new questions in new threads. :)

Something like this:

date = ff.div(:index, 1).text

Read this and your eyes will open:

http://wiki.openqa.org/display/WTR/Quick+Start
http://wiki.openqa.org/display/WTR/Tutorial

Željko

--~--~-~--~~~---~--~~
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: Problem with popup window

2009-04-07 Thread spike

its not working for me please me some other solution.

On Apr 7, 2:22 pm, GJHmf graham.harb...@googlemail.com wrote:
 Edit:  These two lines should have been pasted into the WinClicker
 example, not the AutoIt example:

 require 'watir/ie'
 require 'watir/contrib/enabled_popup'
--~--~-~--~~~---~--~~
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: Basic Watir Help

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 11:58, catepillar cmay...@gmail.com wrote:
 div id=date title=Date4/2/div
 date = ff.text_field(:id, date)
 but that returns an error: Unable to locate element, using :id,
 date (Watir::Exception::UnknownObjectException)

You need to access div, not text field. Try this:

date = ff.div(:id, date).text

Željko
--
http://watirpodcast.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: Basic Watir Help

2009-04-07 Thread catepillar

Wow,  thank you very much!

On Apr 7, 5:03 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Apr 7, 2009 at 11:58, catepillar cmay...@gmail.com wrote:
  div id=date title=Date4/2/div
  date = ff.text_field(:id, date)
  but that returns an error: Unable to locate element, using :id,
  date (Watir::Exception::UnknownObjectException)

 You need to access div, not text field. Try this:

 date = ff.div(:id, date).text

 Željko
 --http://watirpodcast.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: Problem with popup window

2009-04-07 Thread GJHmf

Spike, you beat my post by mere minutes; as it seems I'm having
exactly the same issue as you.

After much searching on the group and other sources, I had two
different approaches to this (below); one using WinClicker, the other
using calls to AutoIt.  Both methods worked *sometimes* yesterday,
neither work today by just not seeing the presence of the confirmation/
alert box.  To add to the mix; no matter what I did when I did get it
working, I could never configure the scripts in a way for 'Cancel' to
be selected instead of 'OK'.

So if anyone out there has any reliable way of selecting 'OK' or
'Cancel' on an IE confirmation/alert box, I'll be very grateful.  As
I'm pulling my hair out, and there really isn't much left there to
pull.

Many thanks,


GJHmf


- - - - - - - -

# WinClicker method

def test_Delete
browser.button(:xpath, //i...@alt='delete']).click

hwnd = browser.enabled_popup(10)
if (hwnd)
w = WinClicker.new
w.makeWindowActive(hwnd)
w.clickWindowsButton_hwnd(hwnd, OK)
end
end

- - - - - - - -

# AutoIt method

require 'watir/ie'
require 'watir/contrib/enabled_popup'

def test_Delete
browser.button(:xpath, //i...@alt='delete']).click

th = Thread.new { system(rubyw clickConfirmOK.rb) }
sleep(2)
Thread.kill(th)
end

- - - - - - - -

# clickConfirmOK.rb

require 'watir/WindowHelper'
$helper = WindowHelper.new
$helper.push_confirm_button_ok()

--~--~-~--~~~---~--~~
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: Problem with popup window

2009-04-07 Thread GJHmf

 its not working for me please me some other solution.

My reply wasn't a solution; I was merely adding in my own own examples
for our mutual problem with popups.

--~--~-~--~~~---~--~~
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] Organization and execution of test cases.

2009-04-07 Thread James

Hi all.  I'm just getting into watir and so far enjoying the ride! I'm
wondering though, what are people using to organize and execute their
test cases?  Are you just writing it all custom in ruby, or is there
any sort of framework/application/gem that people are using to
organize and run their test cases?
--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:
 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will have data
 populated. I will have to select a row based on the 'Agency' I want,
 then only the OK button will get Enabled. Once I select a 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:



  is there something more inside the cell than just the text?   because
  normally 'selecting' a table cell does nothing.  If there's something
  in there that you can act on, maybe you should try to address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 'textIknow').click

  by the way I do the same kind of thing with divs..  say that the same
  link about appears in both a standard footer, and a page specific
  header, both of which are defined as divs, you can do things like this
  to make sure you are looking at or working with the correct one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

   I have atableinside that I have 3X3 rows/columns.
   I need to select a cellbasedontext.

   Please tell me how to deal with this.

   HTML tag for the cell is attached under TD tag as #text
   Ex:-
   Tableid=tableid
   TR id=tablerow
   TD id=tabledataWilmington /TD
   /TR
   /Table

   Thank you very much.

   Appreciate your help.
   Satish- 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: Basic Watir Help

2009-04-07 Thread catepillar

Hahaha.  Will do.

This is just a random question, but what would you do if there were no
id tag.

So the code looked something like:
div
div4/2/div
div97/div
div95/div
div100/div
/div

Now there is nothing to set them apart, but I would still need to set
them to individual variables.

On Apr 7, 5:06 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Apr 7, 2009 at 12:05, catepillar cmay...@gmail.com wrote:
  Wow,  thank you very much!

 No problem.

 The next time just use more descriptive title for your e-mail, everything
 here is about Watir help. :)

 Željko
--~--~-~--~~~---~--~~
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: Problem with popup window

2009-04-07 Thread GJHmf

Edit:  These two lines should have been pasted into the WinClicker
example, not the AutoIt example:

require 'watir/ie'
require 'watir/contrib/enabled_popup'
--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
 is there
 any sort of framework/application/gem

http://github.com/bret/watircraft/tree/master

Željko

--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread JArkelen

In most cases I use Rake to execute mulitple tests.

On Apr 7, 2:58 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
  is there
  any sort of framework/application/gem

 http://github.com/bret/watircraft/tree/master

 Željko
--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-07 Thread IDIEININIIS

The page is using js, that could be it.
I found a tool called JSLeak Detector (from MS).
The page it's on explains how memory leaks are created in IE; it's an
interesting read.
If anyone else is interested: 
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

I'll download it and check it out. Thanks Charley.

On Apr 6, 7:29 pm, Charley Baker charley.ba...@gmail.com wrote:
 SemiOT:     Javascript can also tend to cause memory leaks in browsers.
 There are some best practices out there as well as a tool called jsleaks I
 believe. If your pages are using js, then that's something to check into. It
 could actually be a bug.

 -c

 On Mon, Apr 6, 2009 at 3:11 PM, Chuck van der Linden sqa...@gmail.comwrote:



  the big question is what's using the memory.  its it IE itself, or
  something else.   (you might be able to tell by using taskman, or
  better yet perfmon to look at privatebytes of a few things  while the
  script runs)

  On Apr 6, 1:57 pm, IDIEININIIS ideler.den...@gmail.com wrote:
   Thanks guys.

   @Darin,

   There actually is a puts statement and a counter, I just didn't add it
   to the example code because puts seemed to be working fine (i.e. it
   wasn't printing out super large amounts of text).

   @Chuck,

   I noticed that as well, that it starts to hog memory.
   Closing and re-opening the browser after a set amount of iterations
   sounds like it would work.
   I'll try it tomorrow and let you guys know.

   On Apr 6, 5:28 pm, Chuck van der Linden sqa...@gmail.com wrote:

I would also look for opportunities where you could close and re-open
the browser.  IE can be a bit of a memory pig I've noticed, and if you
are going to page after page after page with it, it will eventually
grow to use a lot of memory.

if it really was the text method in watir (or some ie/windows code it
is calling), you'd be able to demonstrate it by having a small loop
with a lot of text method execution, but never navigate off the
current page, and you'd be able to watch the memory used by the
browser swelling as the loop executes.

On Apr 6, 12:52 pm, Darin Duphorn dduph...@redbrickhealth.com
wrote:

 I guess I would add a puts statement or add a counter to see which
  iteration it's failing on.

 -Original Message-
 From: watir-general@googlegroups.com [mailto:
  watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
 Sent: Monday, April 06, 2009 2:42 PM
 To: Watir General
 Subject: [wtr-general] Re: IE out of memory error (buffer overflow)

 My bad, I meant to say Here is the error message:.

 The line of code where the error originates from, basically looks
  like
 this:

    ie.div(path).text

 The command is in a loop and 'path' is a variable.

 On Apr 6, 4:24 pm, Dennis I. ideler.den...@gmail.com wrote:
  Hi everyone,

  I was running a script and after a while an IE message popped up
  saying it was out of memory.
  I believe it's a buffer overflow from using the text method a lot.

  Here is the code:
  ---
  The remote procedure call failed.

          from (eval):3:in `class_name'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:67:in `call'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:67:in `match?'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:43:in `locate'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:41:in `each'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:41:in `locate'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:40:in `catch'

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  locator.rb:40:in `locate'

           ... 7 levels...

          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:115:in `text'
  ---

  I'm new to Ruby as I learned it just to work with Watir.

  Is there anyway how to prevent this error?- 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: uninitialized constant Windows::API::Error (NameError)

2009-04-07 Thread satish

That is correct. I ran into same issue and got it resolved with same
command.


On Apr 7, 4:13 am, frank.li lizhiguoem...@gmail.com wrote:
 This issue is windows-pr version
 resolution:
 Gem uninstall windows-pr
 Gem install windows-pr

 answer from  http://www.zhuaijun.cn/archives/53

 On 3月30日, 下午11时22分, Dennis I. ideler.den...@gmail.com wrote:



  I tried installing Watir at home a while ago and kept getting an
  error. I followed some instructions here from a different discussion
  that mentioned installing and reinstalling some gems.
  That didn't work. And today I tried again. Here is the error that I
  get.

  ruby test.rb

  C:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb:
  59: uninitialized constant Windows::API::Error (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 C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/
  process.rb:3
  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 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
  process.rb:1
  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 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:45
  from test.rb:22
  Test executed on Mon Mar 30 12:14:05 -0300 2009

  Here is the code until where it gets stuck:

  require 'watir'

  time = Time.now.to_s
  puts Test executed on +time

  test_site = http://www.google.com;

  ie = Watir::IE.open(test_site) # this is line 22- 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: Failing to update gem

2009-04-07 Thread Bret Pettichord

Which gem are you trying to update? Are you trying to update the gem 
system? The command for that is gem update --system.

Bret

spike wrote:
 Hi

 I'm trying to update gem using the command

 gem update

 but its failing to update and i'm getting following error.

 ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
 ERROR: Failed to build gem native extension.

 rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
 RUBYLIBDI
 R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
 ruby mkrf_conf.rb
 (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1)
 call rake --nosearch
 cl -nologo  -MD -Zi -O2b2xg- -G6  -DWIN32 -DRUBY_VERSION=186  -IC:/
 Ruby/include
 -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 -
 I. -c gl-1
 .0-1.1.c
 (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl)
 'cl' is not recognized as an internal or external command,
 operable program or batch file.
 rake aborted!
 Command failed with status (1): [cl -nologo  -MD -Zi -O2b2xg- -G6  -
 DWIN32 ...]

 (See full trace by running task with --trace)
 rake aborted!
 Command failed with status (1): [call rake --nosearch...]

 (See full trace by running task with --trace)


 Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-
 opengl-0.
 60.1 for inspection.
 Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/
 gem_make.out

 please suggest a solution

 thankingyou
 
   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: How to know if the checkbox is checked or not?

2009-04-07 Thread Bret Pettichord

Jarmo Pertman wrote:
 Correct would be of course
 if $ie.checkbox(:name,blah).checked? == true
 end
   
Even better:

  if $ie.checkbox(:name,blah).checked?
  end

-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-07 Thread Dennis I.

Just an update:

I figured I had the following three options.

1. Close IE and then reopen where I left off, after a set amount of
iterations. Most likely a few times to be safe.
2. Use Firefox
3. Disable JS (as long as it doesn't affect the relevant data).

I tried option 2 at first. It seemed to work longer and was quicker
but then I suddenly got an error message from Firefox (it was
something about firefox.exe being closed).
So then I tried it again, but this time with JS disabled. It flew
through the tests with no problem.

By the way, I tested the site, and it did have memory leaks. Not sure
how big the leaks were, but they seemed to affect me after about the
100th something iteration in IE and the 204th iteration in FF. The
iterations are from a loop that goes through all pages of results
returned.

IDIEININIIS wrote:
 The page is using js, that could be it.
 I found a tool called JSLeak Detector (from MS).
 The page it's on explains how memory leaks are created in IE; it's an
 interesting read.
 If anyone else is interested: 
 http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

 I'll download it and check it out. Thanks Charley.

 On Apr 6, 7:29 pm, Charley Baker charley.ba...@gmail.com wrote:
  SemiOT:     Javascript can also tend to cause memory leaks in browsers.
  There are some best practices out there as well as a tool called jsleaks I
  believe. If your pages are using js, then that's something to check into. It
  could actually be a bug.
 
  -c
 
  On Mon, Apr 6, 2009 at 3:11 PM, Chuck van der Linden 
  sqa...@gmail.comwrote:
 
 
 
   the big question is what's using the memory.  its it IE itself, or
   something else.   (you might be able to tell by using taskman, or
   better yet perfmon to look at privatebytes of a few things  while the
   script runs)
 
   On Apr 6, 1:57 pm, IDIEININIIS ideler.den...@gmail.com wrote:
Thanks guys.
 
@Darin,
 
There actually is a puts statement and a counter, I just didn't add it
to the example code because puts seemed to be working fine (i.e. it
wasn't printing out super large amounts of text).
 
@Chuck,
 
I noticed that as well, that it starts to hog memory.
Closing and re-opening the browser after a set amount of iterations
sounds like it would work.
I'll try it tomorrow and let you guys know.
 
On Apr 6, 5:28 pm, Chuck van der Linden sqa...@gmail.com wrote:
 
 I would also look for opportunities where you could close and re-open
 the browser.  IE can be a bit of a memory pig I've noticed, and if you
 are going to page after page after page with it, it will eventually
 grow to use a lot of memory.
 
 if it really was the text method in watir (or some ie/windows code it
 is calling), you'd be able to demonstrate it by having a small loop
 with a lot of text method execution, but never navigate off the
 current page, and you'd be able to watch the memory used by the
 browser swelling as the loop executes.
 
 On Apr 6, 12:52 pm, Darin Duphorn dduph...@redbrickhealth.com
 wrote:
 
  I guess I would add a puts statement or add a counter to see which
   iteration it's failing on.
 
  -Original Message-
  From: watir-general@googlegroups.com [mailto:
   watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
  Sent: Monday, April 06, 2009 2:42 PM
  To: Watir General
  Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
 
  My bad, I meant to say Here is the error message:.
 
  The line of code where the error originates from, basically looks
   like
  this:
 
     ie.div(path).text
 
  The command is in a loop and 'path' is a variable.
 
  On Apr 6, 4:24 pm, Dennis I. ideler.den...@gmail.com wrote:
   Hi everyone,
 
   I was running a script and after a while an IE message popped up
   saying it was out of memory.
   I believe it's a buffer overflow from using the text method a lot.
 
   Here is the code:
   ---
   The remote procedure call failed.
 
           from (eval):3:in `class_name'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:67:in `call'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:67:in `match?'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:43:in `locate'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:41:in `each'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:41:in `locate'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:40:in `catch'
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   locator.rb:40:in `locate'
 
            ... 7 levels...
 
           from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   

[wtr-general] Re: Is there a Watir Recorder similar to Selenium IDE

2009-04-07 Thread Chuck van der Linden

try searching the group for the word 'recorder'  you'll find some
threads that should answer your question.

note that as far as I know, none of the recorder projects is very
active, and none have been updated to support the current version of
Watir.


On Apr 7, 8:23 am, Tester78 hmtest...@gmail.com wrote:
 I am new to Watir and have been reading Brian Marick's Scripting book.
 I downloaded the recent Ruby and Watir. I verified that I  have Watir
 installed by running: require 'watir' =true

 Is there a recorder similar to Selenium's IDE so I can get use to
 recording scripts as I learn Ruby.
--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Chuck van der Linden

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)


On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:
 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:



  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   because
   normally 'selecting' a table cell does nothing.  If there's something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the same
   link about appears in both a standard footer, and a page specific
   header, both of which are defined as divs, you can do things like this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- 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: Failing to update gem

2009-04-07 Thread Chuck van der Linden

generally speaking, if it says 'nothing to update' then it's updated.

On Apr 7, 2:08 am, spike vinaykumarl...@gmail.com wrote:
 when i'm using gem update --system
 it says nothing to update,

 On Apr 7, 1:22 pm, JArkelen johnvanarke...@gmail.com wrote:



  If you want to do a general update on all your gems, use gem update --
  system
  If you want to update a specific gem use gem update gem name

  Cheers,
  John

  On Apr 7, 9:24 am, spike vinaykumarl...@gmail.com wrote:

   Hi

   I'm trying to update gem using the command

   gem update

   but its failing to update and i'm getting following error.

   ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
       ERROR: Failed to build gem native extension.

   rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
   RUBYLIBDI
   R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib
   ruby mkrf_conf.rb
   (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1)
   call rake --nosearch
   cl -nologo  -MD -Zi -O2b2xg- -G6  -DWIN32 -DRUBY_VERSION=186  -IC:/
   Ruby/include
   -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 -
   I. -c gl-1
   .0-1.1.c
   (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl)
   'cl' is not recognized as an internal or external command,
   operable program or batch file.
   rake aborted!
   Command failed with status (1): [cl -nologo  -MD -Zi -O2b2xg- -G6  -
   DWIN32 ...]

   (See full trace by running task with --trace)
   rake aborted!
   Command failed with status (1): [call rake --nosearch...]

   (See full trace by running task with --trace)

   Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-
   opengl-0.
   60.1 for inspection.
   Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/
   gem_make.out

   please suggest a solution

   thankingyou- 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: Basic Watir Help

2009-04-07 Thread Chuck van der Linden

On Apr 7, 3:13 am, catepillar cmay...@gmail.com wrote:
 Hahaha.  Will do.

 This is just a random question, but what would you do if there were no
 id tag.

 So the code looked something like:
 div
 div4/2/div
 div97/div
 div95/div
 div100/div
 /div

 Now there is nothing to set them apart, but I would still need to set
 them to individual variables.


What Would I do?

The first thing I'd do is have a serious talk with my developers about
this concept called 'testability'Then I'd ask to see their unit
tests for this stuff and try to figure out how they are not going to
break the first time the dev refactors the page.

because yes you can access these by index, but since the index could
easily change with the addition of just one more div above it on the
page, it creates a test that tends to be very fragile, high
maintainance, and prone to false alarms.   None of that is good...

having something simple like an ID or Title in the divs so that they
can be easily identified will make life easier for everyone.
--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-07 Thread Bret Pettichord

If you want to close and reopen IE, I suggest you use IE.new_process 
instead of IE.new. This is more reliable and will ensure that the 
process terminates.

Dennis I. wrote:
 Just an update:

 I figured I had the following three options.

 1. Close IE and then reopen where I left off, after a set amount of
 iterations. Most likely a few times to be safe.
 2. Use Firefox
 3. Disable JS (as long as it doesn't affect the relevant data).

 I tried option 2 at first. It seemed to work longer and was quicker
 but then I suddenly got an error message from Firefox (it was
 something about firefox.exe being closed).
 So then I tried it again, but this time with JS disabled. It flew
 through the tests with no problem.

 By the way, I tested the site, and it did have memory leaks. Not sure
 how big the leaks were, but they seemed to affect me after about the
 100th something iteration in IE and the 204th iteration in FF. The
 iterations are from a loop that goes through all pages of results
 returned.

 IDIEININIIS wrote:
   
 The page is using js, that could be it.
 I found a tool called JSLeak Detector (from MS).
 The page it's on explains how memory leaks are created in IE; it's an
 interesting read.
 If anyone else is interested: 
 http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

 I'll download it and check it out. Thanks Charley.

 On Apr 6, 7:29 pm, Charley Baker charley.ba...@gmail.com wrote:
 
 SemiOT: Javascript can also tend to cause memory leaks in browsers.
 There are some best practices out there as well as a tool called jsleaks I
 believe. If your pages are using js, then that's something to check into. It
 could actually be a bug.

 -c

 On Mon, Apr 6, 2009 at 3:11 PM, Chuck van der Linden 
 sqa...@gmail.comwrote:



   
 the big question is what's using the memory.  its it IE itself, or
 something else.   (you might be able to tell by using taskman, or
 better yet perfmon to look at privatebytes of a few things  while the
 script runs)
 
 On Apr 6, 1:57 pm, IDIEININIIS ideler.den...@gmail.com wrote:
 
 Thanks guys.
   
 @Darin,
   
 There actually is a puts statement and a counter, I just didn't add it
 to the example code because puts seemed to be working fine (i.e. it
 wasn't printing out super large amounts of text).
   
 @Chuck,
   
 I noticed that as well, that it starts to hog memory.
 Closing and re-opening the browser after a set amount of iterations
 sounds like it would work.
 I'll try it tomorrow and let you guys know.
   
 On Apr 6, 5:28 pm, Chuck van der Linden sqa...@gmail.com wrote:
   
 I would also look for opportunities where you could close and re-open
 the browser.  IE can be a bit of a memory pig I've noticed, and if you
 are going to page after page after page with it, it will eventually
 grow to use a lot of memory.
 
 if it really was the text method in watir (or some ie/windows code it
 is calling), you'd be able to demonstrate it by having a small loop
 with a lot of text method execution, but never navigate off the
 current page, and you'd be able to watch the memory used by the
 browser swelling as the loop executes.
 
 On Apr 6, 12:52 pm, Darin Duphorn dduph...@redbrickhealth.com
 wrote:
 
 I guess I would add a puts statement or add a counter to see which
   
 iteration it's failing on.
 
 -Original Message-
 From: watir-general@googlegroups.com [mailto:
   
 watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
 
 Sent: Monday, April 06, 2009 2:42 PM
 To: Watir General
 Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
   
 My bad, I meant to say Here is the error message:.
   
 The line of code where the error originates from, basically looks
   
 like
 
 this:
   
ie.div(path).text
   
 The command is in a loop and 'path' is a variable.
   
 On Apr 6, 4:24 pm, Dennis I. ideler.den...@gmail.com wrote:
   
 Hi everyone,
 
 I was running a script and after a while an IE message popped up
 saying it was out of memory.
 I believe it's a buffer overflow from using the text method a lot.
 
 Here is the code:
 ---
 The remote procedure call failed.
 
 from (eval):3:in `class_name'
 
 from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 locator.rb:67:in `call'
 
 from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 locator.rb:67:in `match?'
 
 from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 locator.rb:43:in `locate'
 
 from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 locator.rb:41:in `each'
 
 from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 locator.rb:41:in 

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread James

Thanks!

Is there any documentation available for this anywhere?  What's on
that site is pretty slim, and there's some questions I don't have
answers for (for instance, I can see how to configure it for different
environments, but how do I choose which environment I run in?)

Anyways, I'm wondering if there is more complete documentation rather
than the short Getting Started blurb and the short (and incomplete)
Browser Configuration blurb on that site.

Thanks,
James


On Apr 7, 8:58 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
  is there
  any sort of framework/application/gem

 http://github.com/bret/watircraft/tree/master

 Željko
--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread Chuck van der Linden

On Apr 7, 6:13 am, JArkelen johnvanarke...@gmail.com wrote:
 In most cases I use Rake to execute mulitple tests.


Which is great advice, but might as well be speaking greek to someone
just starting work with Watir and Ruby.

If you are a programmer type I can probably tell you Rake is Ruby's
version of a MAKE file
 and you'll be able to proceed from that point.

If you're a tester like me and never used a make file, you'll probably
want to do some googling on phrases like 'how to use ruby rake or
ruby rake tutorial  in order for that advice to make sense to you
--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread Chuck van der Linden

On Apr 7, 5:58 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
  is there
  any sort of framework/application/gem

 http://github.com/bret/watircraft/tree/master


+1
--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread Maura van der Linden
The Wiki on that site is being worked on as well, at the moment. Just so you
know :)

- Maura

On Tue, Apr 7, 2009 at 10:02 AM, James jgcpal...@gmail.com wrote:


 Thanks!

 Is there any documentation available for this anywhere?  What's on
 that site is pretty slim, and there's some questions I don't have
 answers for (for instance, I can see how to configure it for different
 environments, but how do I choose which environment I run in?)

 Anyways, I'm wondering if there is more complete documentation rather
 than the short Getting Started blurb and the short (and incomplete)
 Browser Configuration blurb on that site.

 Thanks,
 James


 On Apr 7, 8:58 am, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:
   On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
   is there
   any sort of framework/application/gem
 
  http://github.com/bret/watircraft/tree/master
 
  Željko
 


--~--~-~--~~~---~--~~
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] WatirCraft Environment config file.

2009-04-07 Thread James

I'm just getting into WatirCraft and finding very little documentation
around for it.

How do I run my tests in different environments?  I can see I can set
up different environments in the environment config file, but I don't
know how to actually run any environment except for the test
environment.

Also, can I set up different variables in the environment config
table?

For instance, what if I want one environment to be Site A with Login
A, and the other environment to be Site B with Login B?  I know how to
set the URL for the different environments, but can I set other
variables that I use within my tests within that file?

Any help or direction would be much appreciated!

Thanks,
James
--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread SuperKevy

Tiffany has the method.
Here's the equivalent as a stupid dog trick

Assume a 2 column table the lookup is column 2.
Assume there is only 1 table on the page.
The action I want is an associated image click in column 1

  findUser=Wilmington
  myTable=ie.table(:index,1)
  iRows=myTable.row_count()  # Rows in the table
  i=1
  while i = iRows do
user=myTable[i][2].text
if user == findUser then
myTable [i][2].document.scrollIntoView
myTable [i][1].flash
myTable [i][1].image(:alt,'Edit').focus
myTable [i][1].image(:alt,'Edit').click
break   # Found Break the While Loop
end
i=i+1
  end



On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 
  'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   
   because
   normally 'selecting' a table cell does nothing.  If there's 
   something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it 
   that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the 
   same
   link about appears in both a standard footer, and a page 
   specific
   header, both of which are defined as divs, you can do things like 
   this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- 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 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Hi Satish!

This is just a stab in the dark, but is the text you want to click a
span rather than a link?  This has been the case for me from time to
time.  If it is the case for you, you should be able to click it like
this:

browser.span(:text, 'my text).click

or more specifically for a div:

browser.div(:id, 'div id').span(:text, 'my text').click

Hope this helps!

-Tiffany

On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:
 Thanks Chuck, I will work with our dev guys to figure it out.

 Thanks
 Satish

 On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

  There's probably some kind of javascript event being triggered  You'll
  likely need to look at the source to figure out what element it's
  attached to, figure out how to identify that element, and if the
  element type doesn't support a click method you'll have to try firing
  javascript events at it such as mouseup, or mousedown (mouseup is most
  frequently used to detect clicking on something)

  On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

   Any help on this is greatly appreciated.

   Thank you
   Satish

   On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have data
populated. I will have to select a row based on the 'Agency' I want,
then only the OK button will get Enabled. Once I select a 'Agency' I
could select OK button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

 is there something more inside the cell than just the text?   because
 normally 'selecting' a table cell does nothing.  If there's something
 in there that you can act on, maybe you should try to address that
 element, using (:text, 'textyouknow) to identify it.

 If you need to be sure it's inside the table you can specify it that
 way (again just like nested tables or frames)

 e.g if it was a link, then

 browser.table(stufftoidtable).link(:text, 'textIknow').click

 by the way I do the same kind of thing with divs..  say that the same
 link about appears in both a standard footer, and a page specific
 header, both of which are defined as divs, you can do things like this
 to make sure you are looking at or working with the correct one

 browser.div(:id, 'navheader').link(:text, 'about')
 browser.div(:id, 'footer').link(:text, 'about')

 On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

  I have atableinside that I have 3X3 rows/columns.
  I need to select a cellbasedontext.

  Please tell me how to deal with this.

  HTML tag for the cell is attached under TD tag as #text
  Ex:-
  Tableid=tableid
  TR id=tablerow
  TD id=tabledataWilmington /TD
  /TR
  /Table

  Thank you very much.

  Appreciate your help.
  Satish- Hide quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi SuperKevy,

I do not have image tags or any tags that I can call, I am struck
right there with your code.
I am dealing with pure text.

Is there any solution for my case?
Tiffany solution seems to be working, but that code have mouseover
only. Do you know whats the command for left click? is it MouseUp?
some thing like that?

Appreaciate your help.
Thank you very much,
Satish


On Apr 7, 2:48 pm, SuperKevy kpe...@scholarshipamerica.org wrote:
 Tiffany has the method.
 Here's the equivalent as a stupid dog trick

 Assume a 2 column table the lookup is column 2.
 Assume there is only 1 table on the page.
 The action I want is an associated image click in column 1

   findUser=Wilmington
   myTable=ie.table(:index,1)
   iRows=myTable.row_count()          # Rows in the table
   i=1
   while i = iRows do
     user=myTable[i][2].text
     if user == findUser then
         myTable [i][2].document.scrollIntoView
         myTable [i][1].flash
         myTable [i][1].image(:alt,'Edit').focus
         myTable [i][1].image(:alt,'Edit').click
         break   # Found Break the While Loop
     end
     i=i+1
   end

 On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Ah - I just looked at your html source and it's not a span.

  Sorry for the wild guess.

  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?

  You can parse through the rows in your table like this:

  my_table = browser.table(:id, 'table id')

  my_table.rows.each do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
    end
  end

  The row.fire_event('onmouseover') line will depend on what information
  you get from IE Dev Toolbar or Firebug.  How does the user interact
  with the row?  Do they just click on it?  You might be able to send a
  left click or enter with send_keys to select it.

  -Tiffany

  On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi Satish!

   This is just a stab in the dark, but is the text you want to click a
   span rather than a link?  This has been the case for me from time to
   time.  If it is the case for you, you should be able to click it like
   this:

   browser.span(:text, 'my text).click

   or more specifically for a div:

   browser.div(:id, 'div id').span(:text, 'my text').click

   Hope this helps!

   -Tiffany

   On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

Thanks Chuck, I will work with our dev guys to figure it out.

Thanks
Satish

On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

 There's probably some kind of javascript event being triggered  You'll
 likely need to look at the source to figure out what element it's
 attached to, figure out how to identify that element, and if the
 element type doesn't support a click method you'll have to try firing
 javascript events at it such as mouseup, or mousedown (mouseup is most
 frequently used to detect clicking on something)

 On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

  Any help on this is greatly appreciated.

  Thank you
  Satish

  On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

   Its actually just text not a link.

   My table  has columns 'Agency', City, State. Each row will have 
   data
   populated. I will have to select a row based on the 'Agency' I 
   want,
   then only the OK button will get Enabled. Once I select a 
   'Agency' I
   could select OK button.

   Thanks
   Satish

   On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

is there something more inside the cell than just the text?   
because
normally 'selecting' a table cell does nothing.  If there's 
something
in there that you can act on, maybe you should try to address 
that
element, using (:text, 'textyouknow) to identify it.

If you need to be sure it's inside the table you can specify it 
that
way (again just like nested tables or frames)

e.g if it was a link, then

browser.table(stufftoidtable).link(:text, 'textIknow').click

by the way I do the same kind of thing with divs..  say that 
the same
link about appears in both a standard footer, and a page 
specific
header, both of which are defined as divs, you can do things 
like this
to make sure you are looking at or working with the correct one

browser.div(:id, 'navheader').link(:text, 'about')
browser.div(:id, 'footer').link(:text, 'about')

On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

 I have atableinside that I have 3X3 rows/columns.
 I need to select a cellbasedontext.

 Please tell me how to deal with this.

 HTML tag for the cell is attached under TD tag as #text
 Ex:-
 Tableid=tableid
 TR id=tablerow
   

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi Tiffany,

This link has just keyboard commands. Do you know mouse commands?

Appreaciate your help.
Thank you very much,
Satish

On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Here's the list of send key actions:

 http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

 to send an Enter:
 ie.send_keys('{Enter}')

 I don't think it will work with Firefox, however

 Does this work?
 row[1].click  #clicking on column 1 of the row, pick any column you
 like

 -Tiffany

 On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:



  Hi Tiffany,

  I think your solution is going to work. I have to use left click now
  to select that text, can you please tell me what is the command for
  left clicking.
  is there any reference place for all the commands availabel?

  Thank you
  Appreciate your help.
  Satish

  On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Ah - I just looked at your html source and it's not a span.

   Sorry for the wild guess.

   Can you get IE Dev Toolbar or Firebug output for the row or element
   you're trying to select?

   You can parse through the rows in your table like this:

   my_table = browser.table(:id, 'table id')

   my_table.rows.each do |row|
     if row.text.include?('Wilmington')
       row.fire_event('onmouseover')
     end
   end

   The row.fire_event('onmouseover') line will depend on what information
   you get from IE Dev Toolbar or Firebug.  How does the user interact
   with the row?  Do they just click on it?  You might be able to send a
   left click or enter with send_keys to select it.

   -Tiffany

   On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Hi Satish!

This is just a stab in the dark, but is the text you want to click a
span rather than a link?  This has been the case for me from time to
time.  If it is the case for you, you should be able to click it like
this:

browser.span(:text, 'my text).click

or more specifically for a div:

browser.div(:id, 'div id').span(:text, 'my text').click

Hope this helps!

-Tiffany

On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

 Thanks Chuck, I will work with our dev guys to figure it out.

 Thanks
 Satish

 On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

  There's probably some kind of javascript event being triggered  
  You'll
  likely need to look at the source to figure out what element it's
  attached to, figure out how to identify that element, and if the
  element type doesn't support a click method you'll have to try 
  firing
  javascript events at it such as mouseup, or mousedown (mouseup is 
  most
  frequently used to detect clicking on something)

  On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

   Any help on this is greatly appreciated.

   Thank you
   Satish

   On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have 
data
populated. I will have to select a row based on the 'Agency' I 
want,
then only the OK button will get Enabled. Once I select a 
'Agency' I
could select OK button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com 
wrote:

 is there something more inside the cell than just the text?   
 because
 normally 'selecting' a table cell does nothing.  If there's 
 something
 in there that you can act on, maybe you should try to address 
 that
 element, using (:text, 'textyouknow) to identify it.

 If you need to be sure it's inside the table you can specify 
 it that
 way (again just like nested tables or frames)

 e.g if it was a link, then

 browser.table(stufftoidtable).link(:text, 'textIknow').click

 by the way I do the same kind of thing with divs..  say that 
 the same
 link about appears in both a standard footer, and a page 
 specific
 header, both of which are defined as divs, you can do things 
 like this
 to make sure you are looking at or working with the correct 
 one

 browser.div(:id, 'navheader').link(:text, 'about')
 browser.div(:id, 'footer').link(:text, 'about')

 On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

  I have atableinside that I have 3X3 rows/columns.
  I need to select a cellbasedontext.

  Please tell me how to deal with this.

  HTML tag for the cell is attached under TD tag as #text
  Ex:-
  Tableid=tableid
  TR id=tablerow
  TD id=tabledataWilmington /TD
  /TR
  /Table

  Thank you very much.

  Appreciate your help.
  Satish- Hide 

[wtr-general] Re: WatirCraft Environment config file.

2009-04-07 Thread James

Thanks for the quick reply, Bret.

I figured how to do different environments.

i.e.:

rake spec ENVIRONMENT=myenvironmentname

If you can get back to me on the other question, about setting up
environments in the environments config file and using them in my
scripts, that would be excellent.

I'll also check out the yahoo group!

Thanks!
James


On Apr 7, 3:07 pm, Bret Pettichord b...@pettichord.com wrote:
 James,

 Good questions.

 One way would be set an environment variable called ENVIRONMENT to be
 the name of the environment you want to test. I think you could also
 define which environment to test in your config.yml file.

 Can you set up other variables? You should, but let me check it out and
 get back to you on that.

 I've set up another list, watir-framework on yahoogroups for this. I'm
 getting a lot of questions there. You should join it.

 Bret



 James wrote:
  I'm just getting into WatirCraft and finding very little documentation
  around for it.

  How do I run my tests in different environments?  I can see I can set
  up different environments in the environment config file, but I don't
  know how to actually run any environment except for the test
  environment.

  Also, can I set up different variables in the environment config
  table?

  For instance, what if I want one environment to be Site A with Login
  A, and the other environment to be Site B with Login B?  I know how to
  set the URL for the different environments, but can I set other
  variables that I use within my tests within that file?

  Any help or direction would be much appreciated!

  Thanks,
  James

 --
 Bret Pettichord
 CTO, WatirCraft LLC,www.watircraft.com
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord

 Watir Training: Portland/Beaverton April 16-17www.watircraft.com/training
--~--~-~--~~~---~--~~
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: Organization and execution of test cases.

2009-04-07 Thread Bret Pettichord

I just posted more documentation.

James wrote:
 Thanks!

 Is there any documentation available for this anywhere?  What's on
 that site is pretty slim, and there's some questions I don't have
 answers for (for instance, I can see how to configure it for different
 environments, but how do I choose which environment I run in?)

 Anyways, I'm wondering if there is more complete documentation rather
 than the short Getting Started blurb and the short (and incomplete)
 Browser Configuration blurb on that site.

 Thanks,
 James


 On Apr 7, 8:58 am, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:
   
 On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote:
 
 is there
 any sort of framework/application/gem
   
 http://github.com/bret/watircraft/tree/master

 Željko
 
 
   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

I found this page with Google:

http://www.autohotkey.com/docs/commands/Send.htm

Does this work?

 ie.send_keys('{Click}')

It really seems like there should be another event you can fire
somewhere.  I'd navigate through the IE Dev Toolbar output at the
table, row and cell levels looking for it.

-Tiffany

On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:
 Hi Tiffany,

 This link has just keyboard commands. Do you know mouse commands?

 Appreaciate your help.
 Thank you very much,
 Satish

 On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Here's the list of send key actions:

 http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

  to send an Enter:
  ie.send_keys('{Enter}')

  I don't think it will work with Firefox, however

  Does this work?
  row[1].click  #clicking on column 1 of the row, pick any column you
  like

  -Tiffany

  On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

   Hi Tiffany,

   I think your solution is going to work. I have to use left click now
   to select that text, can you please tell me what is the command for
   left clicking.
   is there any reference place for all the commands availabel?

   Thank you
   Appreciate your help.
   Satish

   On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

Ah - I just looked at your html source and it's not a span.

Sorry for the wild guess.

Can you get IE Dev Toolbar or Firebug output for the row or element
you're trying to select?

You can parse through the rows in your table like this:

my_table = browser.table(:id, 'table id')

my_table.rows.each do |row|
  if row.text.include?('Wilmington')
    row.fire_event('onmouseover')
  end
end

The row.fire_event('onmouseover') line will depend on what information
you get from IE Dev Toolbar or Firebug.  How does the user interact
with the row?  Do they just click on it?  You might be able to send a
left click or enter with send_keys to select it.

-Tiffany

On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Hi Satish!

 This is just a stab in the dark, but is the text you want to click a
 span rather than a link?  This has been the case for me from time to
 time.  If it is the case for you, you should be able to click it like
 this:

 browser.span(:text, 'my text).click

 or more specifically for a div:

 browser.div(:id, 'div id').span(:text, 'my text').click

 Hope this helps!

 -Tiffany

 On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

  Thanks Chuck, I will work with our dev guys to figure it out.

  Thanks
  Satish

  On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

   There's probably some kind of javascript event being triggered  
   You'll
   likely need to look at the source to figure out what element it's
   attached to, figure out how to identify that element, and if the
   element type doesn't support a click method you'll have to try 
   firing
   javascript events at it such as mouseup, or mousedown (mouseup is 
   most
   frequently used to detect clicking on something)

   On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will 
 have data
 populated. I will have to select a row based on the 'Agency' 
 I want,
 then only the OK button will get Enabled. Once I select a 
 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com 
 wrote:

  is there something more inside the cell than just the text? 
    because
  normally 'selecting' a table cell does nothing.  If there's 
  something
  in there that you can act on, maybe you should try to 
  address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can 
  specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 
  'textIknow').click

  by the way I do the same kind of thing with divs..  say 
  that the same
  link about appears in both a standard footer, and a page 
  specific
  header, both of which are defined as divs, you can do 
  things like this
  to make sure you are looking at or working with the correct 
  one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Ah - I just looked at your html source and it's not a span.

Sorry for the wild guess.

Can you get IE Dev Toolbar or Firebug output for the row or element
you're trying to select?

You can parse through the rows in your table like this:

my_table = browser.table(:id, 'table id')

my_table.rows.each do |row|
  if row.text.include?('Wilmington')
row.fire_event('onmouseover')
  end
end


The row.fire_event('onmouseover') line will depend on what information
you get from IE Dev Toolbar or Firebug.  How does the user interact
with the row?  Do they just click on it?  You might be able to send a
left click or enter with send_keys to select it.

-Tiffany



On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi Satish!

 This is just a stab in the dark, but is the text you want to click a
 span rather than a link?  This has been the case for me from time to
 time.  If it is the case for you, you should be able to click it like
 this:

 browser.span(:text, 'my text).click

 or more specifically for a div:

 browser.div(:id, 'div id').span(:text, 'my text').click

 Hope this helps!

 -Tiffany

 On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

  Thanks Chuck, I will work with our dev guys to figure it out.

  Thanks
  Satish

  On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

   There's probably some kind of javascript event being triggered  You'll
   likely need to look at the source to figure out what element it's
   attached to, figure out how to identify that element, and if the
   element type doesn't support a click method you'll have to try firing
   javascript events at it such as mouseup, or mousedown (mouseup is most
   frequently used to detect clicking on something)

   On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

Any help on this is greatly appreciated.

Thank you
Satish

On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

 Its actually just text not a link.

 My table  has columns 'Agency', City, State. Each row will have data
 populated. I will have to select a row based on the 'Agency' I want,
 then only the OK button will get Enabled. Once I select a 'Agency' I
 could select OK button.

 Thanks
 Satish

 On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

  is there something more inside the cell than just the text?   
  because
  normally 'selecting' a table cell does nothing.  If there's 
  something
  in there that you can act on, maybe you should try to address that
  element, using (:text, 'textyouknow) to identify it.

  If you need to be sure it's inside the table you can specify it that
  way (again just like nested tables or frames)

  e.g if it was a link, then

  browser.table(stufftoidtable).link(:text, 'textIknow').click

  by the way I do the same kind of thing with divs..  say that the 
  same
  link about appears in both a standard footer, and a page specific
  header, both of which are defined as divs, you can do things like 
  this
  to make sure you are looking at or working with the correct one

  browser.div(:id, 'navheader').link(:text, 'about')
  browser.div(:id, 'footer').link(:text, 'about')

  On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

   I have atableinside that I have 3X3 rows/columns.
   I need to select a cellbasedontext.

   Please tell me how to deal with this.

   HTML tag for the cell is attached under TD tag as #text
   Ex:-
   Tableid=tableid
   TR id=tablerow
   TD id=tabledataWilmington /TD
   /TR
   /Table

   Thank you very much.

   Appreciate your help.
   Satish- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- 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: Organization and execution of test cases.

2009-04-07 Thread Bret Pettichord

Chuck van der Linden wrote:
 On Apr 7, 6:13 am, JArkelen johnvanarke...@gmail.com wrote:
   
 In most cases I use Rake to execute mulitple tests.
 

 Which is great advice, but might as well be speaking greek to someone
 just starting work with Watir and Ruby.

 If you are a programmer type I can probably tell you Rake is Ruby's
 version of a MAKE file
  and you'll be able to proceed from that point.

 If you're a tester like me and never used a make file, you'll probably
 want to do some googling on phrases like 'how to use ruby rake or
 ruby rake tutorial  in order for that advice to make sense to you

   
Calm down. The original poster asked what do people use.

People should be able to share what they are using, when asked, without 
being obliged to provide a tutorial.

Bret

-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: WatirCraft Environment config file.

2009-04-07 Thread Bret Pettichord

James,

Good questions.

One way would be set an environment variable called ENVIRONMENT to be 
the name of the environment you want to test. I think you could also 
define which environment to test in your config.yml file.

Can you set up other variables? You should, but let me check it out and 
get back to you on that.

I've set up another list, watir-framework on yahoogroups for this. I'm 
getting a lot of questions there. You should join it.

Bret

James wrote:
 I'm just getting into WatirCraft and finding very little documentation
 around for it.

 How do I run my tests in different environments?  I can see I can set
 up different environments in the environment config file, but I don't
 know how to actually run any environment except for the test
 environment.

 Also, can I set up different variables in the environment config
 table?

 For instance, what if I want one environment to be Site A with Login
 A, and the other environment to be Site B with Login B?  I know how to
 set the URL for the different environments, but can I set other
 variables that I use within my tests within that file?

 Any help or direction would be much appreciated!

 Thanks,
 James
 
   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor

Here's the list of send key actions:

http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

to send an Enter:
ie.send_keys('{Enter}')

I don't think it will work with Firefox, however

Does this work?
row[1].click  #clicking on column 1 of the row, pick any column you
like

-Tiffany


On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:
 Hi Tiffany,

 I think your solution is going to work. I have to use left click now
 to select that text, can you please tell me what is the command for
 left clicking.
 is there any reference place for all the commands availabel?

 Thank you
 Appreciate your help.
 Satish

 On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Ah - I just looked at your html source and it's not a span.

  Sorry for the wild guess.

  Can you get IE Dev Toolbar or Firebug output for the row or element
  you're trying to select?

  You can parse through the rows in your table like this:

  my_table = browser.table(:id, 'table id')

  my_table.rows.each do |row|
    if row.text.include?('Wilmington')
      row.fire_event('onmouseover')
    end
  end

  The row.fire_event('onmouseover') line will depend on what information
  you get from IE Dev Toolbar or Firebug.  How does the user interact
  with the row?  Do they just click on it?  You might be able to send a
  left click or enter with send_keys to select it.

  -Tiffany

  On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi Satish!

   This is just a stab in the dark, but is the text you want to click a
   span rather than a link?  This has been the case for me from time to
   time.  If it is the case for you, you should be able to click it like
   this:

   browser.span(:text, 'my text).click

   or more specifically for a div:

   browser.div(:id, 'div id').span(:text, 'my text').click

   Hope this helps!

   -Tiffany

   On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

Thanks Chuck, I will work with our dev guys to figure it out.

Thanks
Satish

On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

 There's probably some kind of javascript event being triggered  You'll
 likely need to look at the source to figure out what element it's
 attached to, figure out how to identify that element, and if the
 element type doesn't support a click method you'll have to try firing
 javascript events at it such as mouseup, or mousedown (mouseup is most
 frequently used to detect clicking on something)

 On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

  Any help on this is greatly appreciated.

  Thank you
  Satish

  On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

   Its actually just text not a link.

   My table  has columns 'Agency', City, State. Each row will have 
   data
   populated. I will have to select a row based on the 'Agency' I 
   want,
   then only the OK button will get Enabled. Once I select a 
   'Agency' I
   could select OK button.

   Thanks
   Satish

   On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

is there something more inside the cell than just the text?   
because
normally 'selecting' a table cell does nothing.  If there's 
something
in there that you can act on, maybe you should try to address 
that
element, using (:text, 'textyouknow) to identify it.

If you need to be sure it's inside the table you can specify it 
that
way (again just like nested tables or frames)

e.g if it was a link, then

browser.table(stufftoidtable).link(:text, 'textIknow').click

by the way I do the same kind of thing with divs..  say that 
the same
link about appears in both a standard footer, and a page 
specific
header, both of which are defined as divs, you can do things 
like this
to make sure you are looking at or working with the correct one

browser.div(:id, 'navheader').link(:text, 'about')
browser.div(:id, 'footer').link(:text, 'about')

On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

 I have atableinside that I have 3X3 rows/columns.
 I need to select a cellbasedontext.

 Please tell me how to deal with this.

 HTML tag for the cell is attached under TD tag as #text
 Ex:-
 Tableid=tableid
 TR id=tablerow
 TD id=tabledataWilmington /TD
 /TR
 /Table

 Thank you very much.

 Appreciate your help.
 Satish- Hide quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Hi Tiffany,

I think your solution is going to work. I have to use left click now
to select that text, can you please tell me what is the command for
left clicking.
is there any reference place for all the commands availabel?

Thank you
Appreciate your help.
Satish

On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  You'll
likely need to look at the source to figure out what element it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try firing
javascript events at it such as mouseup, or mousedown (mouseup is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will have data
  populated. I will have to select a row based on the 'Agency' I want,
  then only the OK button will get Enabled. Once I select a 
  'Agency' I
  could select OK button.

  Thanks
  Satish

  On Apr 6, 6:56 pm, Chuck van der Linden sqa...@gmail.com wrote:

   is there something more inside the cell than just the text?   
   because
   normally 'selecting' a table cell does nothing.  If there's 
   something
   in there that you can act on, maybe you should try to address that
   element, using (:text, 'textyouknow) to identify it.

   If you need to be sure it's inside the table you can specify it 
   that
   way (again just like nested tables or frames)

   e.g if it was a link, then

   browser.table(stufftoidtable).link(:text, 'textIknow').click

   by the way I do the same kind of thing with divs..  say that the 
   same
   link about appears in both a standard footer, and a page 
   specific
   header, both of which are defined as divs, you can do things like 
   this
   to make sure you are looking at or working with the correct one

   browser.div(:id, 'navheader').link(:text, 'about')
   browser.div(:id, 'footer').link(:text, 'about')

   On Apr 6, 3:27 pm, satish spanchumar...@gmail.com wrote:

I have atableinside that I have 3X3 rows/columns.
I need to select a cellbasedontext.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-
Tableid=tableid
TR id=tablerow
TD id=tabledataWilmington /TD
/TR
/Table

Thank you very much.

Appreciate your help.
Satish- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -- 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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish

Thank you Tiffany and SuperKevy,

Both solutions are wonderful. Appreciate your help on this. I had to
make some changes to work for my schenario.
Here is both with changes.

# SuperKevy solution.##
findUser=Charlotte
  myTable=ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
  iRows=myTable.row_count()  # Rows in the table
  i=1
  while i = iRows do
user=myTable[i][1].text
puts Row Number: #{i} : Agency Name: #{user}: 

if user == findUser then
myTable [i][1].document.scrollIntoView
myTable [i][1].flash
myTable [i][1].focus
myTable [i][1].click
break   # Found Break the While Loop

end
i=i+1
  end

#Tiffany solution.#
# OnMouse over to 'Wilmongton' string, then click on it.
i=1
ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable') .rows.each
do |row|
  if row.text.include?('Wilmington')
row.fire_event('onmouseover')
ie.table(:id,
'dlgSelectAgency_popup_dlgSelectAgency_gvAgencies_ctl00_DXMainTable')
[i][1].click
  end
  i=i+1
end
=

Thank you very much,
Satish

On Apr 7, 3:59 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 I found this page with Google:

 http://www.autohotkey.com/docs/commands/Send.htm

 Does this work?

  ie.send_keys('{Click}')

 It really seems like there should be another event you can fire
 somewhere.  I'd navigate through the IE Dev Toolbar output at the
 table, row and cell levels looking for it.

 -Tiffany

 On Apr 7, 1:39 pm, satish spanchumar...@gmail.com wrote:



  Hi Tiffany,

  This link has just keyboard commands. Do you know mouse commands?

  Appreaciate your help.
  Thank you very much,
  Satish

  On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Here's the list of send key actions:

  http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

   to send an Enter:
   ie.send_keys('{Enter}')

   I don't think it will work with Firefox, however

   Does this work?
   row[1].click  #clicking on column 1 of the row, pick any column you
   like

   -Tiffany

   On Apr 7, 12:51 pm, satish spanchumar...@gmail.com wrote:

Hi Tiffany,

I think your solution is going to work. I have to use left click now
to select that text, can you please tell me what is the command for
left clicking.
is there any reference place for all the commands availabel?

Thank you
Appreciate your help.
Satish

On Apr 7, 2:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Ah - I just looked at your html source and it's not a span.

 Sorry for the wild guess.

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?

 You can parse through the rows in your table like this:

 my_table = browser.table(:id, 'table id')

 my_table.rows.each do |row|
   if row.text.include?('Wilmington')
     row.fire_event('onmouseover')
   end
 end

 The row.fire_event('onmouseover') line will depend on what information
 you get from IE Dev Toolbar or Firebug.  How does the user interact
 with the row?  Do they just click on it?  You might be able to send a
 left click or enter with send_keys to select it.

 -Tiffany

 On Apr 7, 12:02 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Hi Satish!

  This is just a stab in the dark, but is the text you want to click a
  span rather than a link?  This has been the case for me from time to
  time.  If it is the case for you, you should be able to click it 
  like
  this:

  browser.span(:text, 'my text).click

  or more specifically for a div:

  browser.div(:id, 'div id').span(:text, 'my text').click

  Hope this helps!

  -Tiffany

  On Apr 7, 11:34 am, satish spanchumar...@gmail.com wrote:

   Thanks Chuck, I will work with our dev guys to figure it out.

   Thanks
   Satish

   On Apr 7, 12:37 pm, Chuck van der Linden sqa...@gmail.com wrote:

There's probably some kind of javascript event being triggered  
You'll
likely need to look at the source to figure out what element 
it's
attached to, figure out how to identify that element, and if the
element type doesn't support a click method you'll have to try 
firing
javascript events at it such as mouseup, or mousedown (mouseup 
is most
frequently used to detect clicking on something)

On Apr 7, 5:53 am, satish spanchumar...@gmail.com wrote:

 Any help on this is greatly appreciated.

 Thank you
 Satish

 On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote:

  Its actually just text not a link.

  My table  has columns 'Agency', City, State. Each row will 
  have data
  populated. I will have to select a row based 

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread catepillar

Yea, it is really bad code.  And, I have just been told to see if its
easy to reverse make a spreadsheet of what has already been made.  I
do what I am told.

There probably wont be any changes to the code, and if there is, I can
manage it.  The script I am writing really is not all that complex.

Thank you for all the help!
Chris

On Apr 7, 11:56 am, Chuck van der Linden sqa...@gmail.com wrote:
 On Apr 7, 3:13 am, catepillar cmay...@gmail.com wrote:



  Hahaha.  Will do.

  This is just a random question, but what would you do if there were no
  id tag.

  So the code looked something like:
  div
  div4/2/div
  div97/div
  div95/div
  div100/div
  /div

  Now there is nothing to set them apart, but I would still need to set
  them to individual variables.

 What Would I do?

 The first thing I'd do is have a serious talk with my developers about
 this concept called 'testability'    Then I'd ask to see their unit
 tests for this stuff and try to figure out how they are not going to
 break the first time the dev refactors the page.

 because yes you can access these by index, but since the index could
 easily change with the addition of just one more div above it on the
 page, it creates a test that tends to be very fragile, high
 maintainance, and prone to false alarms.   None of that is good...

 having something simple like an ID or Title in the divs so that they
 can be easily identified will make life easier for everyone.
--~--~-~--~~~---~--~~
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: WatirCraft Environment config file.

2009-04-07 Thread Bret Pettichord

James wrote:
 Also, can I set up different variables in the environment config
 table?

 For instance, what if I want one environment to be Site A with Login
 A, and the other environment to be Site B with Login B?  I know how to
 set the URL for the different environments, but can I set other
 variables that I use within my tests within that file?
   

Yes you can. Details: 
http://wiki.github.com/bret/watircraft/configuration-options


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread KimBrown

One other way that I figure out how to select a certain cell or button
is to use a freeware capture/playback tool called Script Recorder.
I'll set it to record and click on what I want and the code will
almost always be generated (it doesn't handle java popups). Then I cut
it and paste it into what I'm working on. You can find it at
http://www.webmetrics.com/products/script_recorder.html.

Kim


On Apr 7, 1:33 pm, Tiffany Fodor tcfo...@comcast.net wrote:

 Can you get IE Dev Toolbar or Firebug output for the row or element
 you're trying to select?


--~--~-~--~~~---~--~~
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: Is there a Watir Recorder similar to Selenium IDE

2009-04-07 Thread Eileen

Record/Playback is a good way to start to generate tedious test
steps (such as a long list of checkboxes in a survey), but do NOT rely
on it, otherwise might end up no-supportable test scripts.

iTest2/Watir recorder (http://www.itest2.com/downloads) does exactly I
want.


On Apr 8, 1:23 am, Tester78 hmtest...@gmail.com wrote:
 I am new to Watir and have been reading Brian Marick's Scripting book.
 I downloaded the recent Ruby and Watir. I verified that I  have Watir
 installed by running: require 'watir' =true

 Is there a recorder similar to Selenium's IDE so I can get use to
 recording scripts as I learn Ruby.

--~--~-~--~~~---~--~~
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] Popup for File downlaods

2009-04-07 Thread spike

Hi

I'm really confused working with Pop Up's i'm not able to find any
solution for it wat ever script i'm trying its not working for me.

The following is the script i used for a file downlaod popup

prompt_message = Do you want to open or save this file?
window_title = File Download
save_dialog = WIN32OLE.new(AutoItX3.Control)
sleep 1
save_dialog_obtained = save_dialog.WinWaitActive
(window_title,prompt_message, 25)
save_dialog.ControlFocus(window_title, prompt_message, Save)
sleep 1
save_dialog.Send(S)
save_dialog.ControlClick(window_title, prompt_message, Save)
save_dialog.WinSetTitle(window_title, prompt_message, This is
ForTesting )
saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5)
sleep 1
path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName
save_dialog.ControlSend(Save As, , Edit1,path)
sleep 4
save_dialog.ControlClick(Save As, Save in, Save)
save_fileAlreadyExists = save_dialog.WinWait(Save As,  , 5)

But it isnt working for me,
I have the following doubts
Should i run the popup script in seperate file?
Should i include the popup script in the Main script itself at the
position where popup occurs?

Please give me solution to the above problem and also clear my doubts.
Suggest me any tutorial for popup which is easy to understand and has
good descritpiton about handling popup's.

thankingyou

--~--~-~--~~~---~--~~
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] Can I get the content in the boolean left and right value??

2009-04-07 Thread Wesley Chen
Hi, All,
Suppose I would like to write a method like.

def test(boolean, message)
   if boolean
   puts message
   else
   puts boolean.left_value
   puts boolean.right_value
   end
end

Sometimes, I have to invoke the methods like:
test(arra.include?(arrb), arra includes arrb)

test(arra.eql?(arrb), arra equals to arrb)

When the boolean is not true, I would like to get the info why they don't
match/equal/include.


Any suggestion would be quite appreciated.

Thanks.
Wesley Chen.

--~--~-~--~~~---~--~~
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 I get the content in the boolean left and right value??

2009-04-07 Thread Anna Gabutero

On Wed, Apr 08, 2009 at 01:10:57PM +0800, Wesley Chen wrote:
 Hi, All,
 Suppose I would like to write a method like.
 
 def test(boolean, message)
if boolean
puts message
else
puts boolean.left_value
puts boolean.right_value
end
 end
 
 Sometimes, I have to invoke the methods like:
 test(arra.include?(arrb), arra includes arrb)
 
 test(arra.eql?(arrb), arra equals to arrb)
 
 When the boolean is not true, I would like to get the info why they don't
 match/equal/include.

It's not possible within the method you defined since it only receives
the boolean value.  You'll have to pass in arra and arrb if you want to
get at them within the method.

You can look at the different Test::Unit::Assertions for inspiration:
http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html

In particular:

  * assert_equal(arra, arrb, message goes here)
  * assert_operator(arra, :include?, arrb, message goes here)



HTH,
Anna


--~--~-~--~~~---~--~~
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] Handling popups

2009-04-07 Thread spike

Hi

I'm tried to run Popups_test.rb script but its not working im getting
the following error

C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- unittests/setup
(LoadError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from popups_test.rb:4

suggest me a solution

thanking yu
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---