[wtr-general] Test::Unit::TestCase used to override the results xml file but not anymore

2012-08-08 Thread Shlomit Gazit
I think after I upgrade Ruby to 1.9.3 it is not overriding anymore the test 
results, but keep adding a number next to the test results file name.
What happen is that I am not getting the correct results when getting 
results by mail.
Any idea?

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Test::Unit::TestCase used to override the results xml file but not anymore

2012-08-08 Thread Shlomit Gazit
Or maybe I have watir 2.0, not sure.

On Wednesday, August 8, 2012 11:26:18 AM UTC-7, Shlomit Gazit wrote:

 I think after I upgrade Ruby to 1.9.3 it is not overriding anymore the 
 test results, but keep adding a number next to the test results file name.
 What happen is that I am not getting the correct results when getting 
 results by mail.
 Any idea?



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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] browser.radio(:name,'email_frequency', 'weekly') is not working with watir 2.0.4

2012-04-16 Thread Shlomit Gazit
http://wtr.rubyforge.org/rdoc/1.6.5/.
It was working with previous watir version. Now I am getting an
error:
ArgumentError: wrong number of arguments (3 for 2).

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] ERROR: Failed to build gem native extension.

2012-03-27 Thread Shlomit Gazit
I dont remember doing it in the past, is that a new step?

Shlomit.

On Wed, Mar 21, 2012 at 12:30 PM, Željko Filipin
zeljko.fili...@gmail.comwrote:

 Did you install devkit?


 https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md


 Željko
 --
 watir.com/book - author



 On Wed, Mar 21, 2012 at 12:44 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:

 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: warning: toplevel constant VERSION referenced by Watir::IE::VERSION
 1.8.6

 C:\Documents and Settings\Administratorgem update watir
 Updating installed gems
 Updating commonwatir
 Successfully installed commonwatir-2.0.4
 Updating firewatir
 Successfully installed firewatir-1.9.4
 Updating watir
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable program or batch file.


 Gem files will remain installed in
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
  inspection.
 Results logged to
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
  ut
 Gems updated: commonwatir, firewatir
 Installing ri documentation for commonwatir-2.0.4...
 Installing ri documentation for firewatir-1.9.4...
 Installing RDoc documentation for commonwatir-2.0.4...
 Installing RDoc documentation for firewatir-1.9.4...

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administrator
 C:\Documents and Settings\Administratorgem update --system
 Updating RubyGems
 Updating rubygems-update
 ERROR:  Error installing rubygems-update:
 rubygems-update requires Ruby version = 1.8.7.
 Updating RubyGems to 1.3.7
 Installing RubyGems 1.3.7
 RubyGems 1.3.7 installed

 === 1.3.7 / 2010-05-13

 NOTE:

 http://rubygems.org is now the default source for downloading gems.

 You may have sources set via ~/.gemrc, so you should replace
 http://gems.rubyforge.org with http://rubygems.org

 http://gems.rubyforge.org will continue to work for the forseeable
 future.

 New features:

 * `gem` commands
   * `gem install` and `gem fetch` now report alternate platforms when a
 matching one couldn't be found.
   * `gem contents` --prefix is now the default as specified in --help.
  Bug
 #27211 by Mamoru Tasaka.
   * `gem fetch` can fetch of old versions again.  Bug #27960 by Eric
 Hankins.
   * `gem query` and friends output now lists platforms.  Bug #27856 by
 Greg
 Hazel.
   * `gem server` now allows specification of multiple gem dirs for
 documentation.  Bug #27573 by Yuki Sonoda.
   * `gem unpack` can unpack gems again.  Bug #27872 by Timothy Jones.
   * `gem unpack` now unpacks remote gems.
   * --user-install is no longer the default.  If you really liked it, see
 Gem::ConfigFile to learn how to set it by default.  (This change was
 made
 in 1.3.6)
 * RubyGems now has platform support for IronRuby.  Patch #27951 by Will
 Green.

 Bug fixes:

 * Require rubygems/custom_require if --disable-gem was set.  Bug #27700 by
   Roger Pack.
 * RubyGems now protects against exceptions being raised by plugins.
 * rubygems/builder now requires user_interaction.  Ruby Bug #1040 by
 Phillip
   Toland.
 * Gem::Dependency support #version_requirements= with a warning.  Fix for
 old
   Rails versions.  Bug #27868 by Wei Jen Lu.
 * Gem::PackageTask depends on the package dir like the other rake package
   tasks so dependencies can be hooked up correctly.



 --

 RubyGems installed the following executables:
 C:/Ruby/bin/gem

 RubyGems system software updated

 C:\Documents and Settings\Administratorgem install watir
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable

Re: [wtr-general] ERROR: Failed to build gem native extension.

2012-03-27 Thread Shlomit Gazit
After installing devkit, I am still getting an error installing watir:
After I failed with the above installation, I downgrade ruby and watir but
still failing with the same error:

C:\devkitgem install watir --no-ri --no-rdoc
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for #include ffi.h
... no
checking for rb_thread_blocking_region()... no
checking for ruby_thread_has_gvl_p()... no
checking for ruby_native_thread_p()... no
checking for rb_thread_call_with_gvl()... no
creating extconf.h
creating Makefile

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.


Gem files will remain installed in
C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
 inspection.
Results logged to
C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
ut

C:\devkit










On Tue, Mar 27, 2012 at 10:15 AM, Shlomit Gazit shlomitpatr...@gmail.comwrote:

 I dont remember doing it in the past, is that a new step?

 Shlomit.


 On Wed, Mar 21, 2012 at 12:30 PM, Željko Filipin zeljko.fili...@gmail.com
  wrote:

 Did you install devkit?


 https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md


 Željko
 --
 watir.com/book - author



 On Wed, Mar 21, 2012 at 12:44 PM, Shlomit Gazit shlomitpatr...@gmail.com
  wrote:

 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: warning: toplevel constant VERSION referenced by Watir::IE::VERSION
 1.8.6

 C:\Documents and Settings\Administratorgem update watir
 Updating installed gems
 Updating commonwatir
 Successfully installed commonwatir-2.0.4
 Updating firewatir
 Successfully installed firewatir-1.9.4
 Updating watir
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable program or batch file.


 Gem files will remain installed in
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
  inspection.
 Results logged to
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
  ut
 Gems updated: commonwatir, firewatir
 Installing ri documentation for commonwatir-2.0.4...
 Installing ri documentation for firewatir-1.9.4...
 Installing RDoc documentation for commonwatir-2.0.4...
 Installing RDoc documentation for firewatir-1.9.4...

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administrator
 C:\Documents and Settings\Administratorgem update --system
 Updating RubyGems
 Updating rubygems-update
 ERROR:  Error installing rubygems-update:
 rubygems-update requires Ruby version = 1.8.7.
 Updating RubyGems to 1.3.7
 Installing RubyGems 1.3.7
 RubyGems 1.3.7 installed

 === 1.3.7 / 2010-05-13

 NOTE:

 http://rubygems.org is now the default source for downloading gems.

 You may have sources set via ~/.gemrc, so you should replace
 http://gems.rubyforge.org with http://rubygems.org

 http://gems.rubyforge.org will continue to work for the forseeable
 future.

 New features:

 * `gem` commands
   * `gem install` and `gem fetch` now report alternate platforms when a
 matching one couldn't be found.
   * `gem contents` --prefix is now the default as specified in --help.
  Bug
 #27211 by Mamoru Tasaka.
   * `gem fetch` can fetch of old versions again.  Bug #27960 by Eric
 Hankins.
   * `gem query` and friends output now lists platforms.  Bug #27856 by
 Greg
 Hazel.
   * `gem server` now allows specification of multiple gem dirs for
 documentation.  Bug #27573 by Yuki Sonoda.
   * `gem unpack` can unpack gems again.  Bug #27872 by Timothy Jones.
   * `gem unpack` now unpacks remote gems.
   * --user-install is no longer the default.  If you really liked it, see
 Gem::ConfigFile to learn how to set it by default.  (This change was
 made
 in 1.3.6)
 * RubyGems now has platform support for IronRuby.  Patch #27951 by Will
 Green.

 Bug fixes:

 * Require rubygems/custom_require if --disable-gem was set.  Bug #27700
 by
   Roger Pack.
 * RubyGems now protects against exceptions being raised by plugins.
 * rubygems/builder now

Re: [wtr-general] ERROR: Failed to build gem native extension.

2012-03-27 Thread Shlomit Gazit
That's what I did, but then trying to do gem install watir, I got the error.

See below: now I am getting a different error:

C:\devkitdk.rb install
[INFO] RubyGems override already in place for c:/Ruby, skipping.
[WARN] DevKit helper library already exists for c:/Ruby, skipping.

C:\devkitgem install watir
ERROR:  While executing gem ... (Zlib::BufError)
buffer error

C:\devkitgem install watir
ERROR:  While executing gem ... (Zlib::BufError)
buffer error


On Tue, Mar 27, 2012 at 10:22 AM, Oscar Rieken bis...@gmail.com wrote:

 https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

 you have to install devkit
 in order to do that you have to download it and extract it
 then go into that folder that you extracted devkit to thru the command
 prompt
 type dk.rb init in the command line
 then type dk.rb install

 then you can install the gems


 On Tue, Mar 27, 2012 at 1:18 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:

 After installing devkit, I am still getting an error installing watir:
 After I failed with the above installation, I downgrade ruby and watir
 but still failing with the same error:

 C:\devkitgem install watir --no-ri --no-rdoc
 Temporarily enhancing PATH to include DevKit...
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable program or batch file.


 Gem files will remain installed in
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
  inspection.
 Results logged to
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
 ut

 C:\devkit










 On Tue, Mar 27, 2012 at 10:15 AM, Shlomit Gazit shlomitpatr...@gmail.com
  wrote:

 I dont remember doing it in the past, is that a new step?

 Shlomit.


 On Wed, Mar 21, 2012 at 12:30 PM, Željko Filipin 
 zeljko.fili...@gmail.com wrote:

 Did you install devkit?


 https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md


 Željko
 --
 watir.com/book - author



 On Wed, Mar 21, 2012 at 12:44 PM, Shlomit Gazit 
 shlomitpatr...@gmail.com wrote:

 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: warning: toplevel constant VERSION referenced by
 Watir::IE::VERSION
 1.8.6

 C:\Documents and Settings\Administratorgem update watir
 Updating installed gems
 Updating commonwatir
 Successfully installed commonwatir-2.0.4
 Updating firewatir
 Successfully installed firewatir-1.9.4
 Updating watir
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable program or batch file.


 Gem files will remain installed in
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
  inspection.
 Results logged to
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
  ut
 Gems updated: commonwatir, firewatir
 Installing ri documentation for commonwatir-2.0.4...
 Installing ri documentation for firewatir-1.9.4...
 Installing RDoc documentation for commonwatir-2.0.4...
 Installing RDoc documentation for firewatir-1.9.4...

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administratorruby -e 'require watir;puts
 Watir::IE:
 :VERSION'
 -e:1: no such file to load -- watir/ie (LoadError)

 C:\Documents and Settings\Administrator
 C:\Documents and Settings\Administratorgem update --system
 Updating RubyGems
 Updating rubygems-update
 ERROR:  Error installing rubygems-update:
 rubygems-update requires Ruby version = 1.8.7.
 Updating RubyGems to 1.3.7
 Installing RubyGems 1.3.7
 RubyGems 1.3.7 installed

 === 1.3.7 / 2010-05-13

 NOTE:

 http://rubygems.org is now the default source for downloading gems.

 You may have sources set via ~/.gemrc, so you should replace
 http://gems.rubyforge.org with http://rubygems.org

 http://gems.rubyforge.org will continue to work for the forseeable
 future.

 New features:

 * `gem` commands
   * `gem install` and `gem fetch` now report alternate platforms when

Re: [wtr-general] ERROR: Failed to build gem native extension.

2012-03-27 Thread Shlomit Gazit
So I moved back now to the new ruby installation 193 with the new watir and
it is successfully installed watir.

I am trying to run now watir tests I have, which I used to run with older
watir version, and I am getting errors:
First they were compile error, for 'BREAK', older version was working with
break. I commented it out.
Another error I am getting is:

ruby c2p_test_whats_new_dev.rb
C:/Ruby193/lib/ruby/gems/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/console/testrunner.rb:460:in
`module:Console': uninitialized constant Test::Unit::UI::Console::Diff
(NameError)
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/console/testrunner.rb:18:in
`module:UI'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/console/testrunner.rb:17:in
`module:Unit'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/console/testrunner.rb:16:in
`module:Test'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/test-unit-2.4.8/lib/test/unit/ui/console/testrunner.rb:15:in
`top (required)'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
`require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
`rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in
`require'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ci_reporter-1.7.0/lib/ci/reporter/test_unit.rb:7:in
`top (required)'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ci_reporter-1.7.0/lib/ci/reporter/rake/test_unit_loader.rb:6:in
`top (required)'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
`require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
`rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in
`require'
from c2p_test_whats_new_dev.rb:6:in `main'
Exit code: 1

On Tue, Mar 27, 2012 at 10:49 AM, Oscar Rieken bis...@gmail.com wrote:

 reboot

 then try gem update --system
 also that is a different error from before  got to love progress




 On Tue, Mar 27, 2012 at 1:38 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:

 That's what I did, but then trying to do gem install watir, I got the
 error.

 See below: now I am getting a different error:

 C:\devkitdk.rb install
 [INFO] RubyGems override already in place for c:/Ruby, skipping.
 [WARN] DevKit helper library already exists for c:/Ruby, skipping.

 C:\devkitgem install watir
 ERROR:  While executing gem ... (Zlib::BufError)
 buffer error

 C:\devkitgem install watir
 ERROR:  While executing gem ... (Zlib::BufError)
 buffer error


 On Tue, Mar 27, 2012 at 10:22 AM, Oscar Rieken bis...@gmail.com wrote:

 https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

 you have to install devkit
 in order to do that you have to download it and extract it
 then go into that folder that you extracted devkit to thru the command
 prompt
 type dk.rb init in the command line
 then type dk.rb install

 then you can install the gems


 On Tue, Mar 27, 2012 at 1:18 PM, Shlomit Gazit shlomitpatr...@gmail.com
  wrote:

 After installing devkit, I am still getting an error installing watir:
 After I failed with the above installation, I downgrade ruby and watir
 but still failing with the same error:

 C:\devkitgem install watir --no-ri --no-rdoc
 Temporarily enhancing PATH to include DevKit...
 Building native extensions.  This could take a while...
 ERROR:  Error installing watir:
 ERROR: Failed to build gem native extension.

 C:/Ruby/bin/ruby.exe extconf.rb
 checking for ffi.h... no
 checking for #include ffi.h
 ... no
 checking for rb_thread_blocking_region()... no
 checking for ruby_thread_has_gvl_p()... no
 checking for ruby_native_thread_p()... no
 checking for rb_thread_call_with_gvl()... no
 creating extconf.h
 creating Makefile

 nmake
 'nmake' is not recognized as an internal or external command,
 operable program or batch file.


 Gem files will remain installed in
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11 for
  inspection.
 Results logged to
 C:/Ruby/lib/ruby/gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.o
 ut

 C:\devkit










 On Tue, Mar 27, 2012 at 10:15 AM, Shlomit Gazit 
 shlomitpatr...@gmail.com wrote:

 I dont remember doing it in the past, is that a new step?

 Shlomit.


 On Wed, Mar 21, 2012 at 12:30 PM, Željko Filipin 
 zeljko.fili...@gmail.com wrote:

 Did you install devkit?


 https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md


 Željko
 --
 watir.com/book - author



 On Wed, Mar 21, 2012 at 12:44 PM, Shlomit Gazit 
 shlomitpatr...@gmail.com wrote:

 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 C:\Documents and Settings\Administratorruby -e 'require
 watir;puts Watir::IE:
 :VERSION'
 -e:1: warning: toplevel constant VERSION

[wtr-general] What is the different between watir and watir-webdriver?

2012-03-27 Thread Shlomit Gazit
What is the different between watir and watir-webdriver?

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: What is the different between watir and watir-webdriver?

2012-03-27 Thread Shlomit Gazit
If I install webdriver, does this mean I will not be able to use
anymore watir-classic?
Or will have both options?


On Mar 27, 3:20 pm, hillary weimar1...@gmail.com wrote:
 like chuck said watir is for ie only. web-driver supports all browsers. In
 my experience (i'm testing a poorly coded asp.net application) though
 webdriver doesn't really work all that well with ie. Also there's a
 lingering protected mode error when you try to use webdriver on xp/ie8. So
 for us we're going with watir for ie and webdriver for the rest. Because of
 the small differences between the two after 3.0 is released this shouldn't
 be too hard a task.







 On Tuesday, March 27, 2012 1:41:58 PM UTC-7, Shlomit Gazit wrote:

  What is the different between watir and watir-webdriver?

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2011-01-05 Thread Shlomit Gazit
The problem is also if the title I am looking for doesnt exists I am
getting an exception:

Watir::Exception::NoValueFoundException: No option with :title of
pop_instr_type in this select element
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/
input_elements.rb:87:in `select_item_in_select_list'

and the test breaks. I cannot even check if it exists.

On Dec 10 2010, 10:51 am, Super Kevy kpe...@scholarshipamerica.org
wrote:
 Assume the page with the attributed options

 html
 head
 titleMyTest/title
 /head
 body
 hr
 form name=input action=html_form_action.asp method=get
 Username: input type=text name=user /
 Car Select:
 select name=cars title=head
 optionid=a2 title='One' value=volvoVolvo/option
 optionid=a3 title='Two' value=saabSaab/option
 optionid=a4 title='333' value=fiatFiat/option
 optionid=a5 title='444' value=audiAudi/option
 optionid=http://semanticweb.databaserepublic.com/c2p/systemData/
 searchField#attachmentTargetItself value=341 title=true,Inner
 Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option
 /select
 input type=submit value=Submit /
 /form
 /body
 /html

 This code will do two things.
 1) Select theoptionby its title
   Example:
 ie.select_list(:name,'cars').select_item_in_select_list('title',
 'Two')  # Choose the Saab
 2) Dump the html for the select_list into a striing you can parse
    Example: ans_txt = ie.select_list(:name,'cars').html.to_s

 Sample script
 
 require 'rubygems'
 require 'watir'
 ie = Watir::IE.new
 sUrl='C:\Ruby\Testing\KLP1.html'
 ie.goto(sUrl)
 ie.maximize()
 ie.bring_to_front()
 sleep 3
 puts 'Tell me what theoptiontext is..'
 contents =[]
 contents = ie.select_list(:name, cars).getAllContents
 contents.each { |e| puts e.to_s }
 puts '='*30
 puts ' Select theoptionvalue by title'
 ie.select_list(:name,'cars').select_item_in_select_list('title',
 'Two')  # Choose the Saab
 ## puts ' Can I see Attributes? for theoption?'
 #puts ie.select_list(:name,'cars').option(:text,
 'Audi').attribute_value('title').to_s   #This Does not Work!!!
 puts '-'*30
 puts ' Show me all the html code for this select_list and I can parse
 myself'
 ans_txt = ie.select_list(:name,'cars').html.to_s
 puts ans_txt
 sleep 3
 ie.close()
 puts 'Done'

 There seems to be no direct interface to get an attribute_value from
 anoptionin a select list.
 It shows a weakness in the select/options that might need a bug
 writeup

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2010-12-09 Thread Shlomit Gazit
getAllContents gives only the text.

As I wrote already above, I want to find out the titles because it
will save time for the test. If I am checking the titles, the test
will last more than 6 hours.

If I am checking the titles it will save a lot of duplicate effort.

On Dec 8, 2:23 pm, Chuck van der Linden sqa...@gmail.com wrote:
 Would a normal user be able to select the items that way?  why not
 interact with the page in the way a user would, choosing the options
 on the select according to the displayed text?

 Given you can't interact as a user would, then in terms of getting the
 options, you could try using the .getAllContents  method on the
 select_list element to see if the title attribute is returned, or if
 it only shows the values and text associated with each option.   If
 titles are shown, then it might be possible to parse the returned
 contents and fine the value or text associated with each selection
 choice that has a title looking like the one you want.  it means
 writing a tiny parser in ruby code, but the ruby string methods make
 that fairly easy to do.

 puts browser.select_list(how, what).getAllContents

 On Dec 8, 12:11 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  I have lots of options like this one:

  option id=http://semanticweb.databaserepublic.com/c2p/systemData/
  searchField#attachmentTargetItself value=341 title=true,Inner
  Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

  and I am trying to capture all options with title x.

  As I know option is detected only by value or text. How can I get the
  title from the html above?

  On Dec 8, 9:11 am, Super Kevy kpe...@scholarshipamerica.org wrote:

   using youroptionfragment I modeled a quick form:

   Save as C:\ruby\testing\klp1.html
   html
   head
   titleMyTest/title
   /head
   body
   form name=input action=html_form_action.asp method=get
   Username: input type=text name=user /
   form action=
   select name=cars
   optionid=a2 value=volvoVolvo/option
   optionid=a3 value=saabSaab/option
   optionid=a4 value=fiatFiat/option
   optionod=a5 value=audiAudi/option
   optionid=http://semanticweb.databaserepublic.com/c2p/systemData/
   searchField#attachmentTargetItself value=341 title=true,Inner
   Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option
   /select
   input type=submit value=Submit /
   /form
   /body
   /html

   require 'rubygems'
   require 'watir'
   ie = Watir::IE.new
   sUrl='C:\Ruby\Testing\KLP1.html'
   ie.goto(sUrl)
   ie.maximize()
   ie.bring_to_front()
   sleep 3
   puts 'Select Attachment from the select list'
   ie.select_list(:name,'cars').set('Attachment::')
   sleep 3
   puts 'Attachment should be selected'

   I'm totally confused what you're trying to select...- Hide quoted text -

  - Show quoted text -

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2010-12-08 Thread Shlomit Gazit
I have lots of options like this one:

option id=http://semanticweb.databaserepublic.com/c2p/systemData/
searchField#attachmentTargetItself value=341 title=true,Inner
Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

and I am trying to capture all options with title x.

As I know option is detected only by value or text. How can I get the
title from the html above?


On Dec 8, 9:11 am, Super Kevy kpe...@scholarshipamerica.org wrote:
 using youroptionfragment I modeled a quick form:

 Save as C:\ruby\testing\klp1.html
 html
 head
 titleMyTest/title
 /head
 body
 form name=input action=html_form_action.asp method=get
 Username: input type=text name=user /
 form action=
 select name=cars
 optionid=a2 value=volvoVolvo/option
 optionid=a3 value=saabSaab/option
 optionid=a4 value=fiatFiat/option
 optionod=a5 value=audiAudi/option
 optionid=http://semanticweb.databaserepublic.com/c2p/systemData/
 searchField#attachmentTargetItself value=341 title=true,Inner
 Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option
 /select
 input type=submit value=Submit /
 /form
 /body
 /html

 require 'rubygems'
 require 'watir'
 ie = Watir::IE.new
 sUrl='C:\Ruby\Testing\KLP1.html'
 ie.goto(sUrl)
 ie.maximize()
 ie.bring_to_front()
 sleep 3
 puts 'Select Attachment from the select list'
 ie.select_list(:name,'cars').set('Attachment::')
 sleep 3
 puts 'Attachment should be selected'

 I'm totally confused what you're trying to select...

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2010-12-07 Thread Shlomit Gazit
Please help

On Dec 1, 12:22 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 The thing is for testing I dont want to go through all the select
 options since it is a lot. I want to have only one from each. I have
 about 11 select items with variedoptiontitles, and these options are
 repeating with different texts, so I want to test only the 11 options.
 Is that clear?

 On Nov 29, 10:55 am, Chuck van der Linden sqa...@gmail.com wrote:



  Anotheroptionmight be to use the 'select_item_in_select_list'
  method  but from what I'm seeing that only lets you select it by
  either the displayed label (:text) or the underlying value (:value)

  seehttp://rdoc.info/gems/watir/1.6.7/Watir/SelectList#select_item_in_sel...

  Is there a particular reason you need to use title? How would a normal
  user know whichoptionitem in the select list they wanted to choose?

  On Nov 24, 3:35 pm, orde ohil...@gmail.com wrote:

   I don't ever find myself using xpath, but you could look 
   here:http://wiki.openqa.org/display/WTR/XPath

   Hope it helps.

   orde

   On Nov 24, 3:01 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:

I am not sure I know how. could I get help on that?

On Nov 24, 1:16 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:

 On Tue, Nov 23, 2010 at 8:47 PM, Shlomit Gazit 
 shlomitpatr...@gmail.com
 wrote:

  Is there anoptionto use title foroption?
  This is the html code:
  optionid=http://semanticweb.databaserepublic.com/c2p/systemData/
  searchField#attachmentTargetItself value=341 title=true,Inner
  Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

 Did you try?

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them- 
 Hide quoted text -

   - Show quoted text -

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] I can find an element with irb, but when I run the test it cannot be found, and also not by SciTE tool.

2010-12-02 Thread Shlomit Gazit
The watir code I have is:
ie.cell(:class,c2p-action-down-arrow-horizontal).click

When I do inspect element I see: td class=c2p-action-down-arrow-
horizontal
/td
When I do view source I cannot find 'c2p-action-down-arrow-
horizontal'.

Any idea why?

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2010-12-01 Thread Shlomit Gazit
The thing is for testing I dont want to go through all the select
options since it is a lot. I want to have only one from each. I have
about 11 select items with varied option titles, and these options are
repeating with different texts, so I want to test only the 11 options.
Is that clear?


On Nov 29, 10:55 am, Chuck van der Linden sqa...@gmail.com wrote:
 Anotheroptionmight be to use the 'select_item_in_select_list'
 method  but from what I'm seeing that only lets you select it by
 either the displayed label (:text) or the underlying value (:value)

 seehttp://rdoc.info/gems/watir/1.6.7/Watir/SelectList#select_item_in_sel...

 Is there a particular reason you need to use title? How would a normal
 user know whichoptionitem in the select list they wanted to choose?

 On Nov 24, 3:35 pm, orde ohil...@gmail.com wrote:



  I don't ever find myself using xpath, but you could look 
  here:http://wiki.openqa.org/display/WTR/XPath

  Hope it helps.

  orde

  On Nov 24, 3:01 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:

   I am not sure I know how. could I get help on that?

   On Nov 24, 1:16 am, Željko Filipin zeljko.fili...@wa-research.ch
   wrote:

On Tue, Nov 23, 2010 at 8:47 PM, Shlomit Gazit 
shlomitpatr...@gmail.com
wrote:

 Is there anoptionto use title foroption?
 This is the html code:
 optionid=http://semanticweb.databaserepublic.com/c2p/systemData/
 searchField#attachmentTargetItself value=341 title=true,Inner
 Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

Did you try?

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them- 
Hide quoted text -

  - Show quoted text -

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Option in select

2010-11-23 Thread Shlomit Gazit
Is there an option to use title for option?
This is the html code:
option id=http://semanticweb.databaserepublic.com/c2p/systemData/
searchField#attachmentTargetItself value=341 title=true,Inner
Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Option in select

2010-11-23 Thread Shlomit Gazit
Should I be able to do it with xpath?

On Nov 23, 4:25 pm, orde ohil...@gmail.com wrote:
 Not according 
 tohttp://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir.
 Check out the select_list method, and there's a red X for :title
 attribute.

 orde

 On Nov 23, 11:47 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  Is there an option to use title for option?
  This is the html code:
  option id=http://semanticweb.databaserepublic.com/c2p/systemData/
  searchField#attachmentTargetItself value=341 title=true,Inner
  Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] More than one condition

2010-08-25 Thread Shlomit Gazit
I have this table:

table id=breadcrumbTable
and inside the table I have:

a onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
Issue', '[1482] - 1AIM-issue_name_1'); title=[1482] - 1AIM-issue_name_1
href=/c2p/urlspan class=breadcrumb_gray(Issue) /span[1482] -
1AIM-issue_name_1/a

I am getting to the link I wish by doing:

ie.link(:url,/url/).click

The problem is that the link above has the same url, but I dont want to
click on the link in that table since it will take me to a dead end.

Index is not working for me since the table is not static and is growing
with deletion of items.

This is the entire table if it helps better:


table id=breadcrumbTable
tbodytr
td class=breadcrumbs align=lefth2Recently
Visited/h2/td
/tr

tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
Issue', '[1481] - 1AIM-issue_name_1'); title=[1481] - 1AIM-issue_name_1
href=/c2p/topLevelIssueMainView.do?id=7973span
class=breadcrumb_gray(Issue) /span[1481] -
1AIM-issue_name_1/abr/td
/tr
tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
Issue', '[1482] - 1AIM-issue_name_1'); title=[1482] - 1AIM-issue_name_1
href=/c2p/topLevelIssueMainView.do?id=7975span
class=breadcrumb_gray(Issue) /span[1482] -
1AIM-issue_name_1/abr/td
/tr
tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
List', 'All Issues'); title=All Issues
href=/c2p/setDefaultAllIssueList.dospan class=breadcrumb_gray(List)
/spanAll Issues/abr/td
/tr
tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
Source', '1Watir-all_1'); title=1Watir-all_1
href=/c2p/imperativeMain.do?id=10938span
class=breadcrumb_gray(Source) /span1Watir-all_1/abr/td
/tr
tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
List', 'Sources'); title=Sources href=/c2p/imperativeMainList.dospan
class=breadcrumb_gray(List) /spanSources/abr/td
/tr
tr
td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
List', 'Projects'); title=Projects href=/c2p/projectList.dospan
class=breadcrumb_gray(List) /spanProjects/abr/td
/tr

/tbody/table

2010/8/25 Željko Filipin zeljko.fili...@wa-research.ch

 On Tue, Aug 24, 2010 at 11:44 PM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:
  I would like to be able to click on the link that is located outside of
 the table above.

 Please post sample HTML.


 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them
 vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


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

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


Re: [wtr-general] Re: More than one condition

2010-08-25 Thread Shlomit Gazit
Guys,

Sorry for the misunderstanding.

First of all I dont have ids. I said in the beginning id but it is actually
url I am clicking on.
The links are dynamic so I cannot give the exact one.
In the page when I am deleting an item, it records the item in recently
visited table. If after deleting the item I will click on the link in
Recently visited, I will get to a dead end. It is obviously a bug but it is
not being fixed for time being, and I will have easier life with watir tests
if I can get a work around.

I will give you exact examples:

I want to click on this html tag:

a href=/c2p/imperativeMain.do?navTrailRequired=falseamp;id=1
class=linkList onmouseover=TagToTip('ID_SPAN_CONTEXT_NOTE__1', WIDTH,
-240, SHADOW, true, BORDERCOLOR, '#e9e1c5', FONTCOLOR, '#99', BGCOLOR,
'#c0', STICKY, true, FONTFACE, 'verdana, arial, helvetica', FONTSIZE,
'11px', CLICKCLOSE, true); onmouseout=UnTip();Source: font
class=supporting[Pending] /fontbSS very long name imperative /b/a

The link that will lead me to a dead end its html is:

a onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
Source', 'belt;scriptgt;alert( c...');= title=belt;scriptgt;alert(
copy)lt;= scriptgt;?=
href=/c2p/imperativeMain.do?navTrailRequired=falseamp;id=262span
class=breadcrumb_gray(Source) /spanbelt;scriptgt;alert(C.../a

For clicking on each of them I will do with watir:

ie.link(:url,/imperativeMain.*do.*?navTrailRequired=/).click

What I found is that the link that leads me to dead end is surrounded by a
table:

table id=breadcrumbTable
 ...link to dead end...

/table

I thought it can give me an option to tell watir not to choose this link.

Is it possible?

Again, I cannot access with ids because the items' ids are unexpected.

I hope it is clearer.





On Wed, Aug 25, 2010 at 10:24 AM, Chuck van der Linden sqa...@gmail.comwrote:

 The problem is that the link above has the same url, but I dont want to
 click on the link in that table since it will take me to a dead end.
 

 HUH?  If THE URL IS THE SAME, then how can one link lead you somewhere
 the other link does not?   If both links point to the same URL, they
 should both take you to the same page, otherwise if they take you
 different places, they must have different url's .

 The problem appears to be that you are trying to select via a regular
 expression, and more than one thing is matching that expression.  Can
 you change the regex so it will select one unique link instead of
 matching multiple links on the page??

 Or another way to consider it, if you were working the page manually,
 how would you know which link is the one you want to click, what
 identifies it to you visually?

 Instead of supplying us with detailed HTML of the table and links you
 don't want to select, how about you provide some HTML of the one you
 DO want to select?   Perhaps it is inside some other unique container
 like a div which could be used to identify it better?

 On Aug 25, 7:37 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
  I have this table:
 
  table id=breadcrumbTable
  and inside the table I have:
 
  a onclick=pageTracker._trackEvent('Recently visited', 'Recently visited
 -
  Issue', '[1482] - 1AIM-issue_name_1'); title=[1482] -
 1AIM-issue_name_1
  href=/c2p/urlspan class=breadcrumb_gray(Issue) /span[1482] -
  1AIM-issue_name_1/a
 
  I am getting to the link I wish by doing:
 
  ie.link(:url,/url/).click
 
  The problem is that the link above has the same url, but I dont want to
  click on the link in that table since it will take me to a dead end.
 
  Index is not working for me since the table is not static and is growing
  with deletion of items.
 
  This is the entire table if it helps better:
 
  table id=breadcrumbTable
  tbodytr
  td class=breadcrumbs align=lefth2Recently
  Visited/h2/td
  /tr
 
  tr
  td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
  onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
  Issue', '[1481] - 1AIM-issue_name_1'); title=[1481] -
 1AIM-issue_name_1
  href=/c2p/topLevelIssueMainView.do?id=7973span
  class=breadcrumb_gray(Issue) /span[1481] -
  1AIM-issue_name_1/abr/td
  /tr
  tr
  td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
  onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
  Issue', '[1482] - 1AIM-issue_name_1'); title=[1482] -
 1AIM-issue_name_1
  href=/c2p/topLevelIssueMainView.do?id=7975span
  class=breadcrumb_gray(Issue) /span[1482] -
  1AIM-issue_name_1/abr/td
  /tr
  tr
  td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
  onclick=pageTracker._trackEvent('Recently visited', 'Recently visited -
  List', 'All Issues'); title=All Issues
  href=/c2p/setDefaultAllIssueList.dospan
 class=breadcrumb_gray(List)
  /spanAll Issues/abr/td
  /tr
  tr
  td class=breadcrumb pt_0 pr_8 pb_10 pl_0a
  onclick=pageTracker._trackEvent

[wtr-general] More than one condition

2010-08-24 Thread Shlomit Gazit
I would like to be able to click on a link in the page that is not
inside a table with id = breadcrumbTable.

How can I do that?

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

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


Re: [wtr-general] More than one condition

2010-08-24 Thread Shlomit Gazit
I have in the page a table with id:

 ie.table(:id,breadcrumbTable)

I also have two links with the same id unfortunately:

ie.link(:id,x).click

I would like to be able to click on the link that is located *outside* of
the table above.

Is that clearer?



On Tue, Aug 24, 2010 at 1:44 PM, Basim Baassiri ba...@baassiri.ca wrote:

 I would like to able to help you but you haven't provided any html code
 that illustrates your problem nor any code that shows me that you have tried

 assuming that you have read the examples
 http://wiki.openqa.org/display/WTR/Links

 you would see that
 http://wiki.openqa.org/display/WTR/Links
 @browser.link(:id, breadcrumbTable).click

 might solve your problem but again I'm assuming


 On Tue, Aug 24, 2010 at 4:32 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:

 I would like to be able to click on a link in the page that is not
 inside a table with id = breadcrumbTable.

 How can I do that?

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


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

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


[wtr-general] Re: link with url title empty.

2010-08-11 Thread Shlomit Gazit
Thank you George,
I didnt try it yet but I think this is exactly what I was looking for.
I didnt know it is possible to do something like this. I used to use
two attributes with :index, but it is completely make sense to have
both :title and :href.

Thank you.

On Aug 10, 5:26 pm, George george.sand...@gmail.com wrote:
 Have you tried this:

 $ie.link(:title = ,:href = /reqView.do.*?navigationTrail/).click

 On Aug 10, 2:38 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  How should I click on that link that has this url and doesn't have the
  title then,
  should I do:

  req_link.click

  ??

  On Aug 10, 12:50 pm, Basim Baassiri ba...@baassiri.ca wrote:

   I don't see anything wrong with your approach other than your test might 
   be
   brittle i.e it might break if the url changes

   Is there a reason why you are not considering accessing the link using
   :xpath?

   On Tue, Aug 10, 2010 at 3:43 PM, Shlomit Gazit 
   shlomitpatr...@gmail.comwrote:

I think I have a work around it with back browser button and index,
but I think it will be nice to know what I asked here.
I will give you an example:

req_link= $ie.link(:url,/reqView.do.*?navigationTrail/  !
$ie.req_link(:title,/Limit/))

 Is there something similar that I can do?

On Aug 10, 11:57 am, Basim Baassiri ba...@baassiri.ca wrote:
 Shlomit,
 Can you provided a small sample of the html to give some context?
 Basim

 On Tue, Aug 10, 2010 at 2:46 PM, Shlomit Gazit 
 shlomitpatr...@gmail.com
wrote:

  Hello Basim,
  *
  *
  I dont see a solution to my problem in the link you have sent.
  Also I dont want to iterate all the links in the page because I was 
  a
  specific links collection.

  On Tue, Aug 10, 2010 at 11:25 AM, Basim Baassiri ba...@baassiri.ca
wrote:

  Did you try looking at some examples from the documentation

   http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html#M000317

  On Tue, Aug 10, 2010 at 2:20 PM, Shlomit Gazit 
shlomitpatr...@gmail.comwrote:

  I have two links leading to two different places in my 
  application.
  (It is quite a bug but there is no urgent to fix it from the
  development department. Unfortunately it is breaking my test).
  I was thinking for a while on a solution, and what I found maybe 
  is
  that one of the links has title and the other link doesn't have.
  Is there any way I can command to click on the link with the url 
  this
  and that but with title empty?

  Thank you, Shlomit.

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
   legroups.com
watir-general%2bunsubscr...@goog legroups.com

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
   legroups.com
watir-general%2bunsubscr...@goog legroups.com

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
   legroups.com
watir-general%2bunsubscr...@goog legroups.com

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

You received this message because you are subscribed to
   http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: 
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com

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

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


[wtr-general] link with url title empty.

2010-08-10 Thread Shlomit Gazit
I have two links leading to two different places in my application.
(It is quite a bug but there is no urgent to fix it from the
development department. Unfortunately it is breaking my test).
I was thinking for a while on a solution, and what I found maybe is
that one of the links has title and the other link doesn't have.
Is there any way I can command to click on the link with the url this
and that but with title empty?

Thank you, Shlomit.

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

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


[wtr-general] Re: link with url title empty.

2010-08-10 Thread Shlomit Gazit
I think I have a work around it with back browser button and index,
but I think it will be nice to know what I asked here.
I will give you an example:

req_link= $ie.link(:url,/reqView.do.*?navigationTrail/  !
$ie.req_link(:title,/Limit/))

 Is there something similar that I can do?



On Aug 10, 11:57 am, Basim Baassiri ba...@baassiri.ca wrote:
 Shlomit,
 Can you provided a small sample of the html to give some context?
 Basim

 On Tue, Aug 10, 2010 at 2:46 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:



  Hello Basim,
  *
  *
  I dont see a solution to my problem in the link you have sent.
  Also I dont want to iterate all the links in the page because I was a
  specific links collection.

  On Tue, Aug 10, 2010 at 11:25 AM, Basim Baassiri ba...@baassiri.cawrote:

  Did you try looking at some examples from the documentation
 http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html#M000317

  On Tue, Aug 10, 2010 at 2:20 PM, Shlomit Gazit 
  shlomitpatr...@gmail.comwrote:

  I have two links leading to two different places in my application.
  (It is quite a bug but there is no urgent to fix it from the
  development department. Unfortunately it is breaking my test).
  I was thinking for a while on a solution, and what I found maybe is
  that one of the links has title and the other link doesn't have.
  Is there any way I can command to click on the link with the url this
  and that but with title empty?

  Thank you, Shlomit.

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
   legroups.com

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
   legroups.com

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog 
  legroups.com

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

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


[wtr-general] Re: link with url title empty.

2010-08-10 Thread Shlomit Gazit
How should I click on that link that has this url and doesn't have the
title then,
should I do:

req_link.click

??



On Aug 10, 12:50 pm, Basim Baassiri ba...@baassiri.ca wrote:
 I don't see anything wrong with your approach other than your test might be
 brittle i.e it might break if the url changes

 Is there a reason why you are not considering accessing the link using
 :xpath?

 On Tue, Aug 10, 2010 at 3:43 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:



  I think I have a work around it with back browser button and index,
  but I think it will be nice to know what I asked here.
  I will give you an example:

  req_link= $ie.link(:url,/reqView.do.*?navigationTrail/  !
  $ie.req_link(:title,/Limit/))

   Is there something similar that I can do?

  On Aug 10, 11:57 am, Basim Baassiri ba...@baassiri.ca wrote:
   Shlomit,
   Can you provided a small sample of the html to give some context?
   Basim

   On Tue, Aug 10, 2010 at 2:46 PM, Shlomit Gazit shlomitpatr...@gmail.com
  wrote:

Hello Basim,
*
*
I dont see a solution to my problem in the link you have sent.
Also I dont want to iterate all the links in the page because I was a
specific links collection.

On Tue, Aug 10, 2010 at 11:25 AM, Basim Baassiri ba...@baassiri.ca
  wrote:

Did you try looking at some examples from the documentation

 http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html#M000317

On Tue, Aug 10, 2010 at 2:20 PM, Shlomit Gazit 
  shlomitpatr...@gmail.comwrote:

I have two links leading to two different places in my application.
(It is quite a bug but there is no urgent to fix it from the
development department. Unfortunately it is breaking my test).
I was thinking for a while on a solution, and what I found maybe is
that one of the links has title and the other link doesn't have.
Is there any way I can command to click on the link with the url this
and that but with title empty?

Thank you, Shlomit.

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

You received this message because you are subscribed to
   http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: 
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com
  watir-general%2bunsubscr...@goog legroups.com

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

You received this message because you are subscribed to
   http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: 
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com
  watir-general%2bunsubscr...@goog legroups.com

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

You received this message because you are subscribed to
   http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: 
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com
  watir-general%2bunsubscr...@goog legroups.com

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

  You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: 
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog 
  legroups.com

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

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


[wtr-general] Redo the last command

2010-07-13 Thread Shlomit Gazit
Is there any way to redo the last command of the test?

The problem is that sometimes I see that in my application the page is
not loading completely so I need to refresh the page.

I was thinking as a solution to check for a certain word every page
load, and if the word doesn't appear, the page will be refreshed. The
problem is that I need to redo the last command that was running, for
example that an anchor will be open.

Any idea?

Shlomit

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

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


[wtr-general] Re: Iterate through radio buttons

2010-07-05 Thread Shlomit Gazit
:  CustomreqDetailExpiration_1
alt:
class:  Watir::Radio
enabled?:  true
getState:  false
innerText:
isSet?:  false
name:  radioRange_reqDetailExpiration_1
type:  radio
value:  Custom
visible?:  true
inspect:  #Watir::Radio:0x30ed3fc located=false how=:index what=15
value=nil
E
Finished in 153.359 seconds.

On Jul 4, 7:17 am, joedio joe...@comcast.net wrote:
 Shlomit,

 Let's check the attributes of each of the radios.
 Perhaps in actuality an attribute is NOT set
 as one would expect it to be.

 Run this code prior to the previous code block and look at the
 results.
 Feel free to add puts statements for any additional attributes you may
 want to collect.

       # Loop trough radios to display their attributes
       $ie.radios.each_with_index do |radio, iIndex |

             # Adjust index, as radios are 1 indexed, and arrays are
 zero indexed
             iIndex = iIndex +1

             puts(\n#-#)
             puts(# Attributes ofradio + iIndex.to_s)
             puts(#-#)
             puts(id:   + $ie.radio(:index, iIndex).id.to_s)
             puts(alt:   + $ie.radio(:index, iIndex).alt.to_s)
             puts(class:   + $ie.radio(:index, iIndex).class.to_s)
             puts(enabled?:   + $ie.radio(:index, iIndex).enabled?.to_s)
             puts(getState:   + $ie.radio(:index, iIndex).getState.to_s)
             puts(innerText:   + $ie.radio(:index, iIndex).innerText.to_s)
             puts(isSet?:   + $ie.radio(:index, iIndex).isSet?.to_s)
             puts(name:   + $ie.radio(:index, iIndex).name.to_s)
             puts(type:   + $ie.radio(:index, iIndex).type.to_s)
             puts(value:   + $ie.radio(:index, iIndex).value.to_s)
             puts(visible?:   + $ie.radio(:index, iIndex).visible?.to_s)
             puts(inspect:   + $ie.radio(:index, iIndex).inspect.to_s)

   end

 On Jul 4, 12:33 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  Joe,

  For example I was trying:

  $ie.radios.each do |radio|
            if($ie.radio(:id,ID_OTHER_OPTION_BUTTON))
              puts(yes)

            else
              puts(NO)
            end
          end

  The output was 15 yes instead of 1.

  On Jul 2, 9:05 am, joedio joe...@comcast.net wrote:

   Schlomit,

   Could you post the code you created from my example
   so folks can look at it to try to determine why the conditional
   is not working? Please include the output as well.

   Thanks,
   Joe

   On Jul 2, 5:59 am, Željko Filipin zeljko.fili...@wa-research.ch
   wrote:

2010/7/2 Shlomit Gazit shlomitpatr...@gmail.com

 I want to create an array of the innerText (or something else) of the
 9 out of 16 radios on the page.
 Then I need to do something with every variable in this array.

Then justiterateover allradiobuttons and create an array that contains
just the ones you want:

original_array = [aa, bb, ab, ba]

new_array = original_array.collect {|element| element if element =~ /a/ 
}
= [aa, nil, ab, ba]

# compact removes nil elements
new_array.compact
= [aa, ab, ba]

Željko

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

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


[wtr-general] Re: Iterate through radio buttons

2010-07-04 Thread Shlomit Gazit
Joe,

For example I was trying:


$ie.radios.each do | radio |
  if($ie.radio(:id,ID_OTHER_OPTION_BUTTON))
puts(yes)

  else
puts(NO)
  end
end

The output was 15 yes instead of 1.


On Jul 2, 9:05 am, joedio joe...@comcast.net wrote:
 Schlomit,

 Could you post the code you created from my example
 so folks can look at it to try to determine why the conditional
 is not working? Please include the output as well.

 Thanks,
 Joe

 On Jul 2, 5:59 am, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:



  2010/7/2 Shlomit Gazit shlomitpatr...@gmail.com

   I want to create an array of the innerText (or something else) of the
   9 out of 16 radios on the page.
   Then I need to do something with every variable in this array.

  Then just iterate over all radio buttons and create an array that contains
  just the ones you want:

  original_array = [aa, bb, ab, ba]

  new_array = original_array.collect {|element| element if element =~ /a/ }
  = [aa, nil, ab, ba]

  # compact removes nil elements
  new_array.compact
  = [aa, ab, ba]

  Željko

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

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


[wtr-general] Re: Iterate through radio buttons

2010-07-02 Thread Shlomit Gazit
Thank you! that's working.

On Jul 1, 5:39 am, joedio joe...@comcast.net wrote:
 Shlomit,

 This may work for your situation:

 # Define the element ID to be acted upon
 myID =  your_id

 # Loop through the radio elements
 browser.radios.each do | radio |

    # Separate the matching radios
    if(browser.radio(:id,  myID ))
       # Do whatever you need to do with it (e.g. set it)
       browser.radio(:id,  myID ).set
    end

 end # End of Loop

 Hope that helps,
 Joe

 On Jul 1, 5:08 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  I am trying to iterate through radio buttons in the page, but I dont
  want to iterate through all the radios in the page, only those with
  certain id.
  How can I do that?

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

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


[wtr-general] Re: Iterate through radio buttons

2010-07-02 Thread Shlomit Gazit
Hello Joe,
It is actually doesnt work. The condition is not working, it is still
going through all the radio buttons.

On Jul 2, 1:51 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Thank you! that's working.

 On Jul 1, 5:39 am, joedio joe...@comcast.net wrote:



  Shlomit,

  This may work for your situation:

  # Define the element ID to be acted upon
  myID =  your_id

  # Loop through the radio elements
  browser.radios.each do | radio |

     # Separate the matching radios
     if(browser.radio(:id,  myID ))
        # Do whatever you need to do with it (e.g. set it)
        browser.radio(:id,  myID ).set
     end

  end # End of Loop

  Hope that helps,
  Joe

  On Jul 1, 5:08 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:

   I am trying to iterate through radio buttons in the page, but I dont
   want to iterate through all the radios in the page, only those with
   certain id.
   How can I do that?

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

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


[wtr-general] Re: Iterate through radio buttons

2010-07-02 Thread Shlomit Gazit
Hello Željko,
Because I dont need to iterate over all radio buttons.
I want to create an array of the innerText (or something else) of the
9 out of 16 radios on the page.
Then I need to do something with every variable in this array.

Shlomit

On Jul 2, 4:34 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Fri, Jul 2, 2010 at 12:09 PM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:

  The condition is not working, it is still
  going through all the radio buttons.

 Joe's code if working fine. browser.radios.each means iterate over all radio
 buttons.

 Why do you insist on not iterating over all radio buttons? Speed?

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them
 vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

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

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


[wtr-general] Iterate through radio buttons

2010-07-01 Thread Shlomit Gazit
I am trying to iterate through radio buttons in the page, but I dont
want to iterate through all the radios in the page, only those with
certain id.
How can I do that?

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

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


[wtr-general] time loop

2010-05-05 Thread Shlomit Gazit
How can I create a loop for a test to run every 15 minutes?

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

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


[wtr-general] watir exit code

2010-04-14 Thread Shlomit Gazit
Is there a method to use watir exit code (0 or 1)?
I want to know that if it is 0 to do something at_exit.

Thank you, Shlomit.

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

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

To unsubscribe, reply using remove me as the subject.


[wtr-general] Re: watir exit code

2010-04-14 Thread Shlomit Gazit
Somehow #{$!.class} prints as: SystemExit1 or SystemExit0, which is
the opposite than what I see on the console in Irb: Exit code: 0,
Error code: 1.
In any case I need only the numbers 1 or 0 without the word
SystemName, any idea?
I wrote a script to send email if the test is failing.
For now I am setting variable to 0 when initializing the test, and 1
at the end of the test, if it is not failing, the variable is set to
1.  But I prefer to not depends on that.


On Apr 14, 2:00 pm, Ethan notet...@gmail.com wrote:
 as Charley said, watir does not exit, itself.
 If you want to know if an exception occurred causing your program to exit,
 you can check if the global exception variable, $! is set.
 at_exit do
   if $!
     print an exception occurred of type #{$!.class}
   end
 end
 or something along those lines.

 On Wed, Apr 14, 2010 at 16:36, Charley Baker charley.ba...@gmail.comwrote:



  Watir itself doesn't have an exit code, it's just a library. Are you
  talking about your own testing framework, rspec, test::unit? Those generally
  can set exit codes. My question is what are you trying to do? Set it up in a
  CI run? Something else entirely?

  -c

  On Wed, Apr 14, 2010 at 2:30 PM, Shlomit Gazit 
  shlomitpatr...@gmail.comwrote:

  Is there a method to use watir exit code (0 or 1)?
  I want to know that if it is 0 to do something at_exit.

  Thank you, Shlomit.

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

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

  To unsubscribe, reply using remove me as the subject.

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

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

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

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


[wtr-general] a method that will always executes.

2010-04-08 Thread Shlomit Gazit
Is there a way to call a module in watir test that will always run at
the end of the test no matter what?
I thought teardown would do that but I was wrong.
The aim is to call a module that is checking if the test has failed or
not (by a variable) and send email accordingly.
Since I was disappointed from all Integration servers to run watir
tests, I thought to write something of my own to determine if watir
test failed or not.

Any idea how to call this kind of method that will always executes at
the end of the test no matter what?

Thank you, Shlomit.

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

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


[wtr-general] Re: Page loaded more than once

2010-03-30 Thread Shlomit Gazit
From the user point of view it was just very slow to load.


On Mar 30, 1:22 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Mar 29, 2010 at 7:59 PM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:

  We found in the code that some pages were loading more than once
  because of a duplicate of code done in two different ways.

 How would a user notice that the page is loading twice? That is a good step
 in figuring out how would you create a Watir script that checks for it.

  Is there a way to check if everything has finish loading in the page?

 There is some documentation:

 http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir

 Željko

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

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

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[wtr-general] Re: Page loaded more than once

2010-03-29 Thread Shlomit Gazit
We found in the code that some pages were loading more than once
because of a duplicate of code done in two different ways.
This slowed the page loading quite a bit, since this page has a good
amount of hierarchical view, and it was loading twice.

Is there a way to check if everything has finish loading in the page?

On Mar 27, 2:26 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Fri, Mar 26, 2010 at 11:22 PM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:

  Is there a way to check if a page is loaded more than once?

 What do you mean by that?

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

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

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

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[wtr-general] Page loaded more than once

2010-03-26 Thread Shlomit Gazit
Is there a way to check if a page is loaded more than once?

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

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

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[wtr-general] Re: ruby.exe processes

2010-03-16 Thread Shlomit Gazit
Basically I have this method:

@pid = Process.create(
  :app_name   = 'ruby clicker.rb',
  :creation_flags  = Process::DETACHED_PROCESS
  ).process_id
  at_exit{ Process.kill(9,@pid) }

which I think creating this process, but somehow at_exit is not
working.



On Mar 15, 11:07 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Hello,
 Thank you.
 Where would you recommend to put this code?

 On Mar 15, 2:48 am, rakesh swain rocky.deb...@gmail.com wrote:

  Hi,

  Execute the following. The process can be identified and terminated.

  require 'win32ole'
  require 'win32/process'

             wmi = WIN32OLE.connect(winmgmts://)
             processes = wmi.ExecQuery(select * from Win32_process)
             for process in processes do
                if process.Name.include? rubyw.exe then
                   puts Name: #{process.Name}
                   #~ puts Process ID: #{process.Pid}
                   puts process.Terminate
                   puts Finished Checking Processess and killing any process
  Leakage
                  elsif process.Name.include? anyotherprocess.exe then
                   #~ puts Name: #{process.Name}
                   #~ puts Process ID: #{process.Pid}
                   #~ puts process.Terminate
                end

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

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


[wtr-general] ruby.exe processes

2010-03-11 Thread Shlomit Gazit
I have lots of ruby.exe processes running after running watir test on
CI server.
Why there creating and how should I kill them after the test is
finished?

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

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


[wtr-general] Same word different places on the page.

2010-03-11 Thread Shlomit Gazit
I need to look for the word 'Share' in related to different texts in
different places in the page, but the link has the same properties.
How can I distinguish. Any ideas?

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

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


[wtr-general] Re: Running watir tests from command line and from hudson

2010-02-09 Thread Shlomit Gazit
This is a very strange behavior and I am sure it has to do with
Microsoft Windows, IE etc.

I installed hudson on a brand new machine (VMWare) and it used to run
watir with a batch file command (cd the tests directory and runing
the .rb test), and then after some days it doesn't work anymore.
The test says running, but I dont see any test actually running on the
screen.
Just to make sure I turned off popup blocker and installed google bar,
so popup blocker is not the issue.
It is very very strange!!!



On Jan 4, 4:29 pm, Charley Baker charley.ba...@gmail.com wrote:
 I don't know hudson at all, but there are some here on the list who do use
 it.

 We use CruiseControl with a lot plugins and scripts that would be massive
 overkill and are fairly complex. That being said, the basic intent for our
 Watir scripts is to run rake.bat with an actual rake file from a working
 directory, launch our tests and get back results. I have a simple blog post
 on how to do the same with CC.rb from quite some time ago, Cruise as we use
 it does all of our builds and pipelines, running functional tests are just
 one part, so I can't really boil it down, but any build system should be
 able to do the same. Check out the docs, or talk to your build people, it
 shouldn't be too hard.

 Anyone with actual Hudson experience, please chime in. :)

 Charley Baker
 blog:http://blog.charleybaker.org/
 Lead Developer, Watir,http://watir.com
 QA Architect, Gap Inc Direct

 On Mon, Jan 4, 2010 at 4:17 PM, Shlomit Gazit shlomitpatr...@gmail.comwrote:



  Please advice.!!

  On Jan 4, 9:20 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
    I forgot to mention that I am creating a batch commend on Hudson when
   getting the error  above.

   I was also trying to invoke rake file. I have rake and ruby plugin
   pointing to ruby directory on the windows but I got an error:

   FATAL: bin\rake.bat doesn't exist

   Although looking at ruby/bin directory I can see rake.bat
   
   Another question is:
   When running watir from hudson, I am suppose to see the WEB GUI
   running?

   On Jan 4, 8:51 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:

I am able to run watir test from command line but when I am trying to
run watir from hudson I am getting:

  1) Error:
test_imperative(TC_c2p_all):
WIN32OLERuntimeError: failed to create WIN32OLE object from
`InternetExplorer.Application'
    HRESULT error code:0x80004002
      No such interface supported
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `initialize'
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `new'
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `create_browser_window'
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
88:in `_new_window_init'
    C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
84:in `initialize'
    ./c2p_module_login_localh.rb:31:in `new'
    ./c2p_module_login_localh.rb:31:in `login'
    C:/Documents and Settings/INTEGRATOR/.hudson/jobs/watir
tests_trunk/workspace/c2p_watir_dev/c2p_test_all_15_menus_dev.rb:60:in
`setup'

1 tests, 0 assertions, 0 failures, 1 errors

I am running on Windows XP home edition. Hudson 1.339. Ruby version:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

  --
  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

-- 
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] Killing a process

2010-02-04 Thread Shlomit Gazit
For handling popups I am doing the following:

 @pid = Process.create(
  :app_name   = 'ruby clicker.rb',
  :creation_flags  = Process::DETACHED_PROCESS
  ).process_id
  at_exit{ Process.kill(9,@pid) }

It works fine, but then in the results I am getting the following
which is not nice:

C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/
process.rb:192:in `kill': The handle is invalid. (Process::Error)
from C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/
process.rb:151:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/win32/
process.rb:151:in `kill'
from ./c2p_module_imperative_fill_1.rb:94:in `fill'
from C:/Ruby/lib/ruby/1.8/test/unit.rb:278

Any idea what I am doing wrong?

Thank you, Shlomit

-- 
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: Rake

2010-02-04 Thread Shlomit Gazit
I am trying to run watir test from hudson, and as I read you can do it
with Rake.
I need to fill up these fields and I have no idea what should I add:


 Tasks
 #Specify Rake task(s) to run.
 Rake File
 #Specify the rake file path, by default it's './Rakefile'
 Rake lib directory
# Specify the rake lib directory, by default it's './rakelib'
 Rake working directory
 #Specify the rake working directory, by default it's '.'

Anyone???


On Jan 6, 10:35 am, karim rayani karim.ray...@gmail.com wrote:
 Rakeis similar to Make in C and Ant in Java

 One can define tasks in a file with the Rakefile and fire the 
 commandrakeorraketaskname to execute tasks

 On 1/5/10, Shlomit Gazit shlomitpatr...@gmail.com wrote:

  Can anybody explain howrakeworks?
  I have watir tests.
  What doesrakedo and to make it work withrake?

-- 
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] find out the value in select list

2010-01-21 Thread Shlomit Gazit
How can I find out what has been selected in a dropdown?
I would like to always modify the find value but I should know first
what the value was.

Any idea anyone?
-- 
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: find out the value in select list

2010-01-21 Thread Shlomit Gazit
Hello Orde,

I can get the current selection by either value or the name of the
value.
Either way it is a String.
How can I increment the value in 1 in order to have a new value in the
select_list?



On Jan 21, 1:41 pm, orde ohil...@gmail.com wrote:
 Try .getSelectedItems[0] to get the currently selected option.

 Try .getAllContents to get an array of the available options.

 This info 
 fromhttp://groups.google.com/group/watir-general/browse_thread/thread/224...

 Once you have an array of options, you should be able to iterate
 through them.

 Hope it helps.

 orde

 On Jan 21, 1:11 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:



  Hello Tiffany and Orde,

  getSelectedOptions gave me:undefined method `getSelectedOptions' for
  #Watir::SelectList:0x31482e8 error.

  In anyhow:

  I am doing:

   status_value = $ie.select_list(:name, selectedImperativeStatusId).value

   status_next_value = (status_value.to_f + 1).to_s

   *puts*(status_next_value.*class*)

   # 2

  * puts*(status_next_value)

   # String

  * puts*(status_next_value)

   #3.0

   $ie.select_list(:name, selectedImperativeStatusId).select_value(
  status_next_value)

  Although status_next_value is showing as a String class, I am getting:

  Watir::Exception::NoValueFoundException: No option with value of
  status_next_value in this select element.

  Somehow it is showing 3.0 instead of 3.

  Any idea?

  Basically I need each time to select a different selection from the list,
  than the one that has already been selected.

  On Thu, Jan 21, 2010 at 10:34 AM, Tiffany Fodor tcfo...@comcast.net wrote:
   Hi Shlomit!

   You can get the current selected values like this:

   browser.select_list(:id, 'my_select_list').getSelectedOptions

   This returns an array of all selected options, so if there's only
   one,

   browser.select_list(:id, 'my_select_list').getSelectedOptions[0]

   will give you the text.

   Hope this helps!

   -Tiffany

   On Jan 21, 11:16 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
How can I find out what has been selected in a dropdown?
I would like to always modify the find value but I should know first
what the value was.

Any idea anyone?

   --
   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

-- 
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: find out the value in select list

2010-01-21 Thread Shlomit Gazit
I figured out:

status_value = $ie.select_list(:name,
selectedImperativeStatusId).value
status_next_value = (status_value.to_i + 1).to_s()
$ie.select_list(:name, selectedImperativeStatusId).select_value(#
{status_next_value})



On Jan 21, 2:53 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Hello Orde,

 I can get the current selection by either value or the name of the
 value.
 Either way it is a String.
 How can I increment the value in 1 in order to have a new value in the
 select_list?

 On Jan 21, 1:41 pm, orde ohil...@gmail.com wrote:



  Try .getSelectedItems[0] to get the currently selected option.

  Try .getAllContents to get an array of the available options.

  This info 
  fromhttp://groups.google.com/group/watir-general/browse_thread/thread/224...

  Once you have an array of options, you should be able to iterate
  through them.

  Hope it helps.

  orde

  On Jan 21, 1:11 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:

   Hello Tiffany and Orde,

   getSelectedOptions gave me:undefined method `getSelectedOptions' for
   #Watir::SelectList:0x31482e8 error.

   In anyhow:

   I am doing:

    status_value = $ie.select_list(:name, selectedImperativeStatusId).value

    status_next_value = (status_value.to_f + 1).to_s

    *puts*(status_next_value.*class*)

    # 2

   * puts*(status_next_value)

    # String

   * puts*(status_next_value)

    #3.0

    $ie.select_list(:name, selectedImperativeStatusId).select_value(
   status_next_value)

   Although status_next_value is showing as a String class, I am getting:

   Watir::Exception::NoValueFoundException: No option with value of
   status_next_value in this select element.

   Somehow it is showing 3.0 instead of 3.

   Any idea?

   Basically I need each time to select a different selection from the list,
   than the one that has already been selected.

   On Thu, Jan 21, 2010 at 10:34 AM, Tiffany Fodor tcfo...@comcast.net 
   wrote:
Hi Shlomit!

You can get the current selected values like this:

browser.select_list(:id, 'my_select_list').getSelectedOptions

This returns an array of all selected options, so if there's only
one,

browser.select_list(:id, 'my_select_list').getSelectedOptions[0]

will give you the text.

Hope this helps!

-Tiffany

On Jan 21, 11:16 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 How can I find out what has been selected in a dropdown?
 I would like to always modify the find value but I should know first
 what the value was.

 Any idea anyone?

--
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

-- 
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] Rake

2010-01-05 Thread Shlomit Gazit
Can anybody explain how rake works?
I have watir tests.
What does rake do and to make it work with rake?

-- 
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] Running watir tests from command line and from hudson

2010-01-04 Thread Shlomit Gazit
I am able to run watir test from command line but when I am trying to
run watir from hudson I am getting:



  1) Error:
test_imperative(TC_c2p_all):
WIN32OLERuntimeError: failed to create WIN32OLE object from
`InternetExplorer.Application'
HRESULT error code:0x80004002
  No such interface supported
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `new'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
164:in `create_browser_window'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
88:in `_new_window_init'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
84:in `initialize'
./c2p_module_login_localh.rb:31:in `new'
./c2p_module_login_localh.rb:31:in `login'
C:/Documents and Settings/INTEGRATOR/.hudson/jobs/watir
tests_trunk/workspace/c2p_watir_dev/c2p_test_all_15_menus_dev.rb:60:in
`setup'

1 tests, 0 assertions, 0 failures, 1 errors

I am running on Windows XP home edition. Hudson 1.339. Ruby version:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

-- 
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: Running watir tests from command line and from hudson

2010-01-04 Thread Shlomit Gazit
 I forgot to mention that I am creating a batch commend on Hudson when
getting the error  above.

I was also trying to invoke rake file. I have rake and ruby plugin
pointing to ruby directory on the windows but I got an error:

FATAL: bin\rake.bat doesn't exist

Although looking at ruby/bin directory I can see rake.bat

Another question is:
When running watir from hudson, I am suppose to see the WEB GUI
running?


On Jan 4, 8:51 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 I am able to run watir test from command line but when I am trying to
 run watir from hudson I am getting:

   1) Error:
 test_imperative(TC_c2p_all):
 WIN32OLERuntimeError: failed to create WIN32OLE object from
 `InternetExplorer.Application'
     HRESULT error code:0x80004002
       No such interface supported
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 164:in `initialize'
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 164:in `new'
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 164:in `create_browser_window'
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 88:in `_new_window_init'
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 84:in `initialize'
     ./c2p_module_login_localh.rb:31:in `new'
     ./c2p_module_login_localh.rb:31:in `login'
     C:/Documents and Settings/INTEGRATOR/.hudson/jobs/watir
 tests_trunk/workspace/c2p_watir_dev/c2p_test_all_15_menus_dev.rb:60:in
 `setup'

 1 tests, 0 assertions, 0 failures, 1 errors

 I am running on Windows XP home edition. Hudson 1.339. Ruby version:
 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

-- 
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: firewatir- I cannot close the second popup.

2009-11-17 Thread Shlomit Gazit

Angrez,
Please let me know if you have any new results.

On Nov 16, 10:00 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Pallavi, Angrez hello,

 Thank you for the replies.

 I was trying your suggestion:

 $ff.startClicker(ok)
 $ff.startClicker(ok)
 $ff.image(:name, /elete/).click

 But it still didn't close thepopup.

 I am able to do it with watir like this:

 Thread.new{system(rubyw myClicker.rb)}
 $ie.image(:name, /elete/).click
 Thread.new { system(rubyw myClicker.rb)}

 and I have a file: myClicker.rb with the code:

 $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
 __FILE__

 require 'watir/WindowHelper'

 $helper = WindowHelper.new
 $helper.push_confirm_button_ok()

 It is not always clicking the popups so sometimes I have to click on
 either of the popups manually, and the test is waiting for the click.
 But basically it is not breaking the test.

 On Nov 16, 4:06 am, Angrez Singh ang...@gmail.com wrote:

  It might work, because both of them will be looking for the pop up to close.
  When you click the delete button pop up will come, not sure which thread
  will close the pop up. Butsecondone will closesecondpop up if you are
  using Auto IT.
  In Firewatir the concept is bit different, I don't use AutoIT to close the
  pop up to make it cross-platform. So if you are on Windows you can use
  AutoIt in two different threads and tell them to close the pop ups.

  - Angrez

  On Mon, Nov 16, 2009 at 5:24 PM, Pallavi Sharma 
  write2pall...@gmail.comwrote:

   Can't you start two start clickers at once? Will they both try to access
   the first pop up and if found close it?

   So  what i am suggesting is this:

   ff.startClicker(ok)
   $ff.startClicker(ok)
   $ff.image(:name, /elete/).click

   Wont this work Angrez?

   I had a similar situation for IE, and i used the Auto IT script to handle
  popupby calling them in separate threads but both invoked at the same
   time.

   --
   Pallavi.

   On Mon, Nov 16, 2009 at 3:17 PM, Angrez Singh ang...@gmail.com wrote:

   It would be bit tricky to handle thesecondpop up. I'll try here at my
   end and if possible will come up with some solution, but as of now it 
   might
   not be possible.

   Thanks,
   Angrez

   On Mon, Nov 16, 2009 at 1:14 PM, Shlomit Gazit 
   shlomitpatr...@gmail.comwrote:

   Anybody??

   On Nov 13, 4:43 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
Hello,

I am trying to handlepopupswithfirewatir.
My scenario is clicking on delete button, apopupconfirmation will
open and I should click ok.  After that asecondpopupwill open and
I should write the reason and click ok.

So far I was able to click on the delete button and thesecondpopup
will appear but not closed (the firstpopupis not appearing, but I
assume it is by design).

How can I close thesecondpopup?

Myfirewatircode is:

$ff.startClicker(ok)
$ff.image(:name, /elete/).click
$ff.startClicker(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: firewatir- I cannot close the second popup.

2009-11-16 Thread Shlomit Gazit

Pallavi, Angrez hello,

Thank you for the replies.

I was trying your suggestion:

$ff.startClicker(ok)
$ff.startClicker(ok)
$ff.image(:name, /elete/).click

But it still didn't close the popup.

I am able to do it with watir like this:

Thread.new{system(rubyw myClicker.rb)}
$ie.image(:name, /elete/).click
Thread.new { system(rubyw myClicker.rb)}

and I have a file: myClicker.rb with the code:

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
__FILE__

require 'watir/WindowHelper'

$helper = WindowHelper.new
$helper.push_confirm_button_ok()

It is not always clicking the popups so sometimes I have to click on
either of the popups manually, and the test is waiting for the click.
But basically it is not breaking the test.



On Nov 16, 4:06 am, Angrez Singh ang...@gmail.com wrote:
 It might work, because both of them will be looking for the pop up to close.
 When you click the delete button pop up will come, not sure which thread
 will close the pop up. But second one will close second pop up if you are
 using Auto IT.
 In Firewatir the concept is bit different, I don't use AutoIT to close the
 pop up to make it cross-platform. So if you are on Windows you can use
 AutoIt in two different threads and tell them to close the pop ups.

 - Angrez

 On Mon, Nov 16, 2009 at 5:24 PM, Pallavi Sharma 
 write2pall...@gmail.comwrote:



  Can't you start two start clickers at once? Will they both try to access
  the first pop up and if found close it?

  So  what i am suggesting is this:

  ff.startClicker(ok)
  $ff.startClicker(ok)
  $ff.image(:name, /elete/).click

  Wont this work Angrez?

  I had a similar situation for IE, and i used the Auto IT script to handle
  popup by calling them in separate threads but both invoked at the same
  time.

  --
  Pallavi.

  On Mon, Nov 16, 2009 at 3:17 PM, Angrez Singh ang...@gmail.com wrote:

  It would be bit tricky to handle the second pop up. I'll try here at my
  end and if possible will come up with some solution, but as of now it might
  not be possible.

  Thanks,
  Angrez

  On Mon, Nov 16, 2009 at 1:14 PM, Shlomit Gazit 
  shlomitpatr...@gmail.comwrote:

  Anybody??

  On Nov 13, 4:43 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
   Hello,

   I am trying to handlepopupswithfirewatir.
   My scenario is clicking on delete button, a popup confirmation will
   open and I should click ok.  After that a second popup will open and
   I should write the reason and click ok.

   So far I was able to click on the delete button and the second popup
   will appear but not closed (the first popup is not appearing, but I
   assume it is by design).

   How can I close the second popup?

   Myfirewatircode is:

   $ff.startClicker(ok)
   $ff.image(:name, /elete/).click
   $ff.startClicker(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: run firewatir from terminal

2009-11-13 Thread Shlomit Gazit

Thank you!!!

On Nov 12, 1:47 pm, Ethan notet...@gmail.com wrote:
 I'm assuming you're on OSX from the Terminal reference, which would have
 been a useful thing for you to mention.
 The way you're running it, bash is going to try to execute your ruby script
 as a bash script, I expect, rather than ruby. You have a couple of options:

 Simplest is, you can run `ruby path/to/script.rb` and not have to change the
 executable permission or anything else.

 Or, you can add a #! statement to the beginning of the file, such as
 #!/path/to/your/ruby
 or, more generally useful:
 #!/usr/bin/env ruby
 seehttps://secure.wikimedia.org/wikipedia/en/wiki/Shebang_(Unix) for more
 info on that.

 On Thu, Nov 12, 2009 at 16:37, Shlomit Gazit shlomitpatr...@gmail.comwrote:





  In watir windows I can simply type in command line the name of the rb
  file and it will open IE and run watir test.
  How can I do it with firewatir? I was trying to do it from Terminal
  (with ./) but in the beginning it didnt do anything, then I changed
  permission to rb file to be executable, then it let me run the rb file
  but it complains about:

  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
  __FILE__

  Any idea?

  Shlomit.
--~--~-~--~~~---~--~~
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] Firewatir with jssh is slower

2009-11-13 Thread Shlomit Gazit

Does anyone noticed firewatir is slower when starting it with jssh?

I am login to my web project without -jssh and it is faster than
running the project through firewatir (with -jssh).


--~--~-~--~~~---~--~~
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] firewatir- I cannot close the second popup.

2009-11-13 Thread Shlomit Gazit

Hello,

I am trying to handle popups with firewatir.
My scenario is clicking on delete button, a popup confirmation will
open and I should click ok.  After that a second popup will open and
I should write the reason and click ok.

So far I was able to click on the delete button and the second popup
will appear but not closed (the first popup is not appearing, but I
assume it is by design).

How can I close the second popup?

My firewatir code is:

$ff.startClicker(ok)
$ff.image(:name, /elete/).click
$ff.startClicker(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: watir tests are not passing on my environment

2009-11-05 Thread Shlomit Gazit

I found out it was related with popups titles in regular expression.


On Oct 28, 3:25 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 After restarting the machine, it was working fine. I guess it is cache
 related.
 Is there a way to clean cache in the beginning of the test?

 On Oct 27, 5:04 pm,ShlomitGazit shlomitpatr...@gmail.com wrote:

  I had an idea to kill ie process from task manager and it helped for a
  while, but then after 6 or 7 popups, it couldn't find the popup
  anymore.
  Could it be that it related somehow with cache?

  On Oct 27, 4:49 pm,ShlomitGazit shlomitpatr...@gmail.com wrote:

   I am taking my last comment back.
   It doesnt work.
   Now with wait_until it hangs until 60sec and then the test breaks, but
   it doesnt find any popup.
   It is so inconsistent.
   And the ridicules thing is that I am using the same piece of code in
   both watir and java so how come sometimes it is working and sometimes
   not?
   I was trying even not touching the mose for the entire test, but it
   didnt help.

   Please let me know if something looks odd:

           Watir::Waiter.wait_until{$ie1.select_list(:id,
   'RIGHT_HAND_LIST').exists? }

   Thank you,Shlomit.

   On Oct 19, 10:28 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

Thank you! it helps!

On Oct 15, 4:53 pm, orde ohil...@gmail.com wrote:

http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissues...

 Hope that helps...

 On Oct 15, 10:55 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

  One ting I didnt mention is that the new machine is a VMFusion 
  Windows on
  MAC.
  I sometimes success in finding the popup when I am not moving the 
  mouse at
  all.

  How do you use wait_until?

  On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord 
  b...@pettichord.comwrote:

   My guess is that this is Ajax code and that a robust fix would be 
   to add
   some calls to wait_until.

   I also suspect that your new environment is using a faster browser
   and/or version of watir and that this is why you are now seeing 
   timing
   problems.

   Bret

   P.S. The other solution might be to litter your code with sleeps. 
   Just
   kidding!

  ShlomitGazit wrote:
One specific example I have:
I ran a test that is passing on my old environment and on the 
new
environment it is intermittent.

When trying to find popup:

The code is:

          $ie.cell(:class, 
c2p-action-down-arrow-horizontal).click
          $ie.link(:id, ID_EDITWATCHERS_MENU).click
          $ie1 = Watir::IE.attach(:title, /C2P/)
          $ie1.wait
          $ie1.select_list(:id,
RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
          $ie1.image(:src, /button_triangle_left/).click .

I got the error:

 1) Error:
test_issue_top(TC_c2p_all_issues):
Watir::Exception::UnknownObjectException: Unable to locate 
element,
using :id, RIGHT_HAND_LIST
    
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
52:in `assert_exists'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:63:in `select_item_in_select_list'
    C:/Program Files/Genuitec/MyEclipse 
7.5/Workspaces/MyEclipse/
c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'

1 tests, 0 assertions, 0 failures, 1 errors

On Oct 14, 12:16 am, Željko Filipin 
zeljko.fili...@wa-research.ch
wrote:

2009/10/14ShlomitGazit shlomitpatr...@gmail.com

I dont know if a downgrade will solve the problem.

I do not know too. Try and let us know.

For instance I can click in a frame with the old machine and 
watir
doesnt find it on the new machine.

And the error message is?

Željko

   --
   Bret Pettichord
   Lead Developer, Watir,www.watir.com
   Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
   Twitter,www.twitter.com/bpettichord
--~--~-~--~~~---~--~~
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] Iterate buttons in the page and call a method

2009-11-04 Thread Shlomit Gazit

Hello,

I have MultipleSelectPopup.clear(/ID_OPEN/, nil) method which I want
to call it as many as buttons I have in the page that has id /
ID_OPEN/.

The method is clicking on the button I am sending it the id (/
ID_OPEN/) and clearing the content from the popup.

What so far is happening is that I am clicking on the same button each
time. How can I make it iterate through all the buttons in the page
with id /ID_OPEN/?


--~--~-~--~~~---~--~~
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] uninitialized constant Watir::PageContainer::Win32

2009-10-30 Thread Shlomit Gazit

I am trying to use enabled_popup.rb. I added require 'watir/contrib/
enabled_popup', but when I am starting the server I am getting:


C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32
(NameError)
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
c2p_watir/c2p_test_issues_2_menus_dev.rb:18



All the solutions showed to add include Win32 in the rb file, but  as
I looked it is already there.



Any ideas?

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



[wtr-general] Re: Watir 1.6.5.rc2 - release candidate available for testing

2009-10-29 Thread Shlomit Gazit

Any idea?

On Oct 27, 3:23 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 require 'rubygems'
 require 'firewatir/container' -- the problematic line
 require 'watir/browser'

 On Oct 27, 2:44 pm, Bret Pettichord b...@pettichord.com wrote:

  Can you share the code that is failing? Specifically the code on and
  around line 7 of
  /Users/shlomit/workspaces/trunk/ff_c2p_watir/ff_c2p_test_issues_2_menus_dev.rb

 ShlomitGazit wrote:
   After upgrading I am getting the error:

   /Users/shlomit/.gem/ruby/1.8/gems/firewatir-1.6.5.rc2/lib/firewatir/
   container.rb:46: uninitialized constant
   FireWatir::Container::JsshSocket (NameError)
      from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
   `gem_original_require'
      from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
   `require'
      from /Users/shlomit/workspaces/trunk/ff_c2p_watir/
   ff_c2p_test_issues_2_menus_dev.rb:7

   When starting running a test.

   On Oct 23, 2:36 am, Željko Filipin zeljko.fili...@wa-research.ch
   wrote:

   On Thu, Oct 22, 2009 at 11:14 PM, Charley Baker charley.ba...@gmail.com
   wrote:

    We have a new version of Watir for testing, 1.6.5.rc2.

   I just did upgrade from 1.6.2 and everything works fine so far.

   Ž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: Click ok on popup

2009-10-28 Thread Shlomit Gazit

I am no longer getting the error but still I need to click manually on
the ok popups.

On Oct 26, 11:15 am, orde ohil...@gmail.com wrote:
 Check this out:

 http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIfixaWIN32OLERuntimeE...

 Hope that helps.

 On Oct 26, 10:48 am,ShlomitGazit shlomitpatr...@gmail.com wrote:



  I am getting this in the console, but it is not breaking the test, I
  just need manually to click on both OK buttons.

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in
  `initialize': unknown OLE server:
  `AutoItX3.Control' (WIN32OLERuntimeError)
      HRESULT error code:0x800401f3
        Invalid class string      from c:/ruby/lib/ruby/gems/1.8/gems/
  watir-1.6.2/lib/watir/ie.rb:113:in `new'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:
  113:in `autoit'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  WindowHelper.rb:7:in `initialize'
          from myClicker.rb:6:in `new'
          from myClicker.rb:6

  On Oct 23, 8:59 am, Tiffany Fodor tcfo...@comcast.net wrote:

   Hi!

   Just in case you haven't seen this page:

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

   Can you provide the error you're getting when the click doesn't work?
   Is there a chance that the pop-up isn't loaded yet?

   You could try troubleshooting with irb and try various commands to
   click on the button.

   -Tiffany

   On Oct 23, 9:19 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

Any replies for this one?

On Oct 2, 10:21 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

 For handling prompt popups, I am using myClicker.rb file:
 ___

 $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
 __FILE__

 require 'watir/WindowHelper'

 $helper = WindowHelper.new
 $helper.push_confirm_button_ok()

 I am calling this file like this:
 __

 Thread.new { system(rubyw myClicker.rb) }
 $ie.image(:name, /elete/).click
 Thread.new { system(rubyw myClicker.rb) }

 What I am trying to do above is deleting an object. I am getting first
 popup asking if I really want to delete this and then a second popup
 prompt to enter the reason. Both need to click 'ok' button.

 It is working partly:
 The problem is that most of the time I have to manually click on ok
 button.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: watir tests are not passing on my environment

2009-10-28 Thread Shlomit Gazit

After restarting the machine, it was working fine. I guess it is cache
related.
Is there a way to clean cache in the beginning of the test?


On Oct 27, 5:04 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 I had an idea to kill ie process from task manager and it helped for a
 while, but then after 6 or 7 popups, it couldn't find the popup
 anymore.
 Could it be that it related somehow with cache?

 On Oct 27, 4:49 pm,ShlomitGazit shlomitpatr...@gmail.com wrote:



  I am taking my last comment back.
  It doesnt work.
  Now with wait_until it hangs until 60sec and then the test breaks, but
  it doesnt find any popup.
  It is so inconsistent.
  And the ridicules thing is that I am using the same piece of code in
  both watir and java so how come sometimes it is working and sometimes
  not?
  I was trying even not touching the mose for the entire test, but it
  didnt help.

  Please let me know if something looks odd:

          Watir::Waiter.wait_until{$ie1.select_list(:id,
  'RIGHT_HAND_LIST').exists? }

  Thank you,Shlomit.

  On Oct 19, 10:28 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

   Thank you! it helps!

   On Oct 15, 4:53 pm, orde ohil...@gmail.com wrote:

   http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissues...

Hope that helps...

On Oct 15, 10:55 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

 One ting I didnt mention is that the new machine is a VMFusion 
 Windows on
 MAC.
 I sometimes success in finding the popup when I am not moving the 
 mouse at
 all.

 How do you use wait_until?

 On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord 
 b...@pettichord.comwrote:

  My guess is that this is Ajax code and that a robust fix would be 
  to add
  some calls to wait_until.

  I also suspect that your new environment is using a faster browser
  and/or version of watir and that this is why you are now seeing 
  timing
  problems.

  Bret

  P.S. The other solution might be to litter your code with sleeps. 
  Just
  kidding!

 ShlomitGazit wrote:
   One specific example I have:
   I ran a test that is passing on my old environment and on the new
   environment it is intermittent.

   When trying to find popup:

   The code is:

             $ie.cell(:class, 
   c2p-action-down-arrow-horizontal).click
             $ie.link(:id, ID_EDITWATCHERS_MENU).click
             $ie1 = Watir::IE.attach(:title, /C2P/)
             $ie1.wait
             $ie1.select_list(:id,
   RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
             $ie1.image(:src, /button_triangle_left/).click .

   I got the error:

    1) Error:
   test_issue_top(TC_c2p_all_issues):
   Watir::Exception::UnknownObjectException: Unable to locate 
   element,
   using :id, RIGHT_HAND_LIST
       
   C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
   52:in `assert_exists'
       C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   input_elements.rb:63:in `select_item_in_select_list'
       C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
   c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'

   1 tests, 0 assertions, 0 failures, 1 errors

   On Oct 14, 12:16 am, Željko Filipin 
   zeljko.fili...@wa-research.ch
   wrote:

   2009/10/14ShlomitGazit shlomitpatr...@gmail.com

   I dont know if a downgrade will solve the problem.

   I do not know too. Try and let us know.

   For instance I can click in a frame with the old machine and 
   watir
   doesnt find it on the new machine.

   And the error message is?

   Željko

  --
  Bret Pettichord
  Lead Developer, Watir,www.watir.com
  Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
  Twitter,www.twitter.com/bpettichord
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.5.rc2 - release candidate available for testing

2009-10-27 Thread Shlomit Gazit

After upgrading I am getting the error:

/Users/shlomit/.gem/ruby/1.8/gems/firewatir-1.6.5.rc2/lib/firewatir/
container.rb:46: uninitialized constant
FireWatir::Container::JsshSocket (NameError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
`require'
from /Users/shlomit/workspaces/trunk/ff_c2p_watir/
ff_c2p_test_issues_2_menus_dev.rb:7

When starting running a test.



On Oct 23, 2:36 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Thu, Oct 22, 2009 at 11:14 PM, Charley Baker charley.ba...@gmail.com
 wrote:

   We have a new version of Watir for testing, 1.6.5.rc2.

 I just did upgrade from 1.6.2 and everything works fine so far.

 Ž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: Watir 1.6.5.rc2 - release candidate available for testing

2009-10-27 Thread Shlomit Gazit

require 'rubygems'
require 'firewatir/container' -- the problematic line
require 'watir/browser'

On Oct 27, 2:44 pm, Bret Pettichord b...@pettichord.com wrote:
 Can you share the code that is failing? Specifically the code on and
 around line 7 of
 /Users/shlomit/workspaces/trunk/ff_c2p_watir/ff_c2p_test_issues_2_menus_dev.rb

 Shlomit Gazit wrote:
  After upgrading I am getting the error:

  /Users/shlomit/.gem/ruby/1.8/gems/firewatir-1.6.5.rc2/lib/firewatir/
  container.rb:46: uninitialized constant
  FireWatir::Container::JsshSocket (NameError)
     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
  `gem_original_require'
     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
  `require'
     from /Users/shlomit/workspaces/trunk/ff_c2p_watir/
  ff_c2p_test_issues_2_menus_dev.rb:7

  When starting running a test.

  On Oct 23, 2:36 am, Željko Filipin zeljko.fili...@wa-research.ch
  wrote:

  On Thu, Oct 22, 2009 at 11:14 PM, Charley Baker charley.ba...@gmail.com
  wrote:

   We have a new version of Watir for testing, 1.6.5.rc2.

  I just did upgrade from 1.6.2 and everything works fine so far.

  Ž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: watir tests are not passing on my environment

2009-10-27 Thread Shlomit Gazit

I am taking my last comment back.
It doesnt work.
Now with wait_until it hangs until 60sec and then the test breaks, but
it doesnt find any popup.
It is so inconsistent.
And the ridicules thing is that I am using the same piece of code in
both watir and java so how come sometimes it is working and sometimes
not?
I was trying even not touching the mose for the entire test, but it
didnt help.


Please let me know if something looks odd:


Watir::Waiter.wait_until{$ie1.select_list(:id,
'RIGHT_HAND_LIST').exists? }


Thank you, Shlomit.


On Oct 19, 10:28 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Thank you! it helps!

 On Oct 15, 4:53 pm, orde ohil...@gmail.com wrote:

 http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissues...

  Hope that helps...

  On Oct 15, 10:55 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

   One ting I didnt mention is that the new machine is a VMFusion Windows on
   MAC.
   I sometimes success in finding the popup when I am not moving the mouse at
   all.

   How do you use wait_until?

   On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord 
   b...@pettichord.comwrote:

My guess is that this is Ajax code and that a robust fix would be to add
some calls to wait_until.

I also suspect that your new environment is using a faster browser
and/or version of watir and that this is why you are now seeing timing
problems.

Bret

P.S. The other solution might be to litter your code with sleeps. Just
kidding!

   ShlomitGazit wrote:
 One specific example I have:
 I ran a test that is passing on my old environment and on the new
 environment it is intermittent.

 When trying to find popup:

 The code is:

           $ie.cell(:class, c2p-action-down-arrow-horizontal).click
           $ie.link(:id, ID_EDITWATCHERS_MENU).click
           $ie1 = Watir::IE.attach(:title, /C2P/)
           $ie1.wait
           $ie1.select_list(:id,
 RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
           $ie1.image(:src, /button_triangle_left/).click .

 I got the error:

  1) Error:
 test_issue_top(TC_c2p_all_issues):
 Watir::Exception::UnknownObjectException: Unable to locate element,
 using :id, RIGHT_HAND_LIST
     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 52:in `assert_exists'
     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:63:in `select_item_in_select_list'
     C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
 c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'

 1 tests, 0 assertions, 0 failures, 1 errors

 On Oct 14, 12:16 am, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:

 2009/10/14ShlomitGazit shlomitpatr...@gmail.com

 I dont know if a downgrade will solve the problem.

 I do not know too. Try and let us know.

 For instance I can click in a frame with the old machine and watir
 doesnt find it on the new machine.

 And the error message is?

 Željko

--
Bret Pettichord
Lead Developer, Watir,www.watir.com
Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
Twitter,www.twitter.com/bpettichord
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: watir tests are not passing on my environment

2009-10-27 Thread Shlomit Gazit

I had an idea to kill ie process from task manager and it helped for a
while, but then after 6 or 7 popups, it couldn't find the popup
anymore.
Could it be that it related somehow with cache?


On Oct 27, 4:49 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 I am taking my last comment back.
 It doesnt work.
 Now with wait_until it hangs until 60sec and then the test breaks, but
 it doesnt find any popup.
 It is so inconsistent.
 And the ridicules thing is that I am using the same piece of code in
 both watir and java so how come sometimes it is working and sometimes
 not?
 I was trying even not touching the mose for the entire test, but it
 didnt help.

 Please let me know if something looks odd:

         Watir::Waiter.wait_until{$ie1.select_list(:id,
 'RIGHT_HAND_LIST').exists? }

 Thank you,Shlomit.

 On Oct 19, 10:28 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

  Thank you! it helps!

  On Oct 15, 4:53 pm, orde ohil...@gmail.com wrote:

  http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissues...

   Hope that helps...

   On Oct 15, 10:55 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

One ting I didnt mention is that the new machine is a VMFusion Windows 
on
MAC.
I sometimes success in finding the popup when I am not moving the mouse 
at
all.

How do you use wait_until?

On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord 
b...@pettichord.comwrote:

 My guess is that this is Ajax code and that a robust fix would be to 
 add
 some calls to wait_until.

 I also suspect that your new environment is using a faster browser
 and/or version of watir and that this is why you are now seeing timing
 problems.

 Bret

 P.S. The other solution might be to litter your code with sleeps. Just
 kidding!

ShlomitGazit wrote:
  One specific example I have:
  I ran a test that is passing on my old environment and on the new
  environment it is intermittent.

  When trying to find popup:

  The code is:

            $ie.cell(:class, c2p-action-down-arrow-horizontal).click
            $ie.link(:id, ID_EDITWATCHERS_MENU).click
            $ie1 = Watir::IE.attach(:title, /C2P/)
            $ie1.wait
            $ie1.select_list(:id,
  RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
            $ie1.image(:src, /button_triangle_left/).click .

  I got the error:

   1) Error:
  test_issue_top(TC_c2p_all_issues):
  Watir::Exception::UnknownObjectException: Unable to locate element,
  using :id, RIGHT_HAND_LIST
      C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
  52:in `assert_exists'
      C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:63:in `select_item_in_select_list'
      C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
  c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'

  1 tests, 0 assertions, 0 failures, 1 errors

  On Oct 14, 12:16 am, Željko Filipin zeljko.fili...@wa-research.ch
  wrote:

  2009/10/14ShlomitGazit shlomitpatr...@gmail.com

  I dont know if a downgrade will solve the problem.

  I do not know too. Try and let us know.

  For instance I can click in a frame with the old machine and watir
  doesnt find it on the new machine.

  And the error message is?

  Željko

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
 Twitter,www.twitter.com/bpettichord
--~--~-~--~~~---~--~~
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: Click ok on popup

2009-10-26 Thread Shlomit Gazit

I am getting this in the console, but it is not breaking the test, I
just need manually to click on both OK buttons.



c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in
`initialize': unknown OLE server:
`AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
  Invalid class string  from c:/ruby/lib/ruby/gems/1.8/gems/
watir-1.6.2/lib/watir/ie.rb:113:in `new'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:
113:in `autoit'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
WindowHelper.rb:7:in `initialize'
from myClicker.rb:6:in `new'
from myClicker.rb:6




On Oct 23, 8:59 am, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi!

 Just in case you haven't seen this page:

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

 Can you provide the error you're getting when the click doesn't work?
 Is there a chance that the pop-up isn't loaded yet?

 You could try troubleshooting with irb and try various commands to
 click on the button.

 -Tiffany

 On Oct 23, 9:19 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

  Any replies for this one?

  On Oct 2, 10:21 am,ShlomitGazit shlomitpatr...@gmail.com wrote:

   For handling prompt popups, I am using myClicker.rb file:
   ___

   $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
   __FILE__

   require 'watir/WindowHelper'

   $helper = WindowHelper.new
   $helper.push_confirm_button_ok()

   I am calling this file like this:
   __

   Thread.new { system(rubyw myClicker.rb) }
   $ie.image(:name, /elete/).click
   Thread.new { system(rubyw myClicker.rb) }

   What I am trying to do above is deleting an object. I am getting first
   popup asking if I really want to delete this and then a second popup
   prompt to enter the reason. Both need to click 'ok' button.

   It is working partly:
   The problem is that most of the time I have to manually click on ok
   button.
--~--~-~--~~~---~--~~
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] Running FF with JSSH

2009-10-23 Thread Shlomit Gazit
Angrez hello,
 I am running on MacOS.
How should I run the tests not through eclipse?

Thank you,
Shlomit




Date: Thurs, Oct 22 2009 3:57 pm
From: Shlomit Gazit



I opened ff with jssh from terminal and was able to telnet only if I
was a super user.

When I run the firewatir test from eclipse I need to quit ff .
So when I run the test ff should be up with jssh but at the same time
ff should be down because only one instance allowed running firewatir.

How should it work?


Shlomit



== 2 of 2 ==
Date: Fri, Oct 23 2009 12:02 am
From: Angrez Singh


Which OS are you using? As far as I know, when you run Firefox test in opens
up a new Firefox instance with JSSh enabled. Never ran the test via eclipse.
Can you post your further queries on  watir-general@googlegroups.com so
that more people can help you?

Thanks,
Angrez

On Fri, Oct 23

--~--~-~--~~~---~--~~
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: Click ok on popup

2009-10-23 Thread Shlomit Gazit

Any replies for this one?

On Oct 2, 10:21 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 For handling prompt popups, I am using myClicker.rb file:
 ___

 $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
 __FILE__

 require 'watir/WindowHelper'

 $helper = WindowHelper.new
 $helper.push_confirm_button_ok()

 I am calling this file like this:
 __

 Thread.new { system(rubyw myClicker.rb) }
 $ie.image(:name, /elete/).click
 Thread.new { system(rubyw myClicker.rb) }

 What I am trying to do above is deleting an object. I am getting first
 popup asking if I really want to delete this and then a second popup
 prompt to enter the reason. Both need to click 'ok' button.

 It is working partly:
 The problem is that most of the time I have to manually click on ok
 button.
--~--~-~--~~~---~--~~
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: Running FF with JSSH

2009-10-23 Thread Shlomit Gazit

The thing is that when I Quit FF from the Dock, my telnet connection
is being disconnected.

I am concern about that since I am trying to use attach method with
firewatir and from what I read in another discussion is only if I use
firewatir 1.6.2 with JSSH running I will be able to get the attach
method working, otherwise I am getting exception on unknown method
attach.

On Oct 23, 9:11 am, Angrez Singh ang...@gmail.com wrote:
 I think it will automatically open a new Firefox instance with JSSH when you
 run the test.
 - Angrez

 On Fri, Oct 23, 2009 at 8:43 PM, Shlomit Gazit 
 shlomitpatr...@gmail.comwrote:





  Angrez hello,
   I am running on MacOS.
  How should I run the tests not through eclipse?

  Thank you,
  Shlomit

  Date: Thurs, Oct 22 2009 3:57 pm
  From: Shlomit Gazit

  I opened ff with jssh from terminal and was able to telnet only if I
  was a super user.

  When I run the firewatir test from eclipse I need to quit ff .
  So when I run the test ff should be up with jssh but at the same time
  ff should be down because only one instance allowed running firewatir.

  How should it work?

  Shlomit

  == 2 of 2 ==
  Date: Fri, Oct 23 2009 12:02 am
  From: Angrez Singh

  Which OS are you using? As far as I know, when you run Firefox test in
  opens
  up a new Firefox instance with JSSh enabled. Never ran the test via
  eclipse.
  Can you post your further queries on  watir-general@googlegroups.com so
  that more people can help you?

  Thanks,
  Angrez

  On Fri, Oct 23
--~--~-~--~~~---~--~~
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: Cannot get truncated text of a cell in a table

2009-10-20 Thread Shlomit Gazit

watir code: (see above also):

 $ie.link(:text, #{@@leftNav[i]}).click

html of the table:

table class=tableLeftNav border=0 cellspacing=0 cellpadding=0

tr
td id=impactForm align=left height=27 width=1%
valign=middle class=pad_0_6_0_6 
a href=/c2p/impactImperativeMainList.do?navigationTrail=
%286120%29%28CI%29img title=Scope alt=Scope name=Scope src=/
c2p/images/icons/icon_button_scope.gif border=0 hspace=0
onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage
('Scope','','/c2p/images/icons/icon_button_scope_o.gif',1)//a
/td
td width=100% id=impactForm class=sectionSelected pad_0
nowrap=nowrap valign=middle
a href=/c2p/impactImperativeMainList.do?navigationTrail=
%286120%29%28CI%29 class=leftnavScope (0)/a
/td

/tr
tr
td colspan=2 id=imperativeRequirements 
class=sectionSelected
pad_0
table width=100% border=0 cellspacing=0 
cellpadding=0
tr
td align=right width=1% valign=middle
class=sectionSelected pad_0_6_0_6 
a href=/c2p/imperativeRequirementList.do?
navigationTrail=%286120%29%28CI%29img title=Sections
alt=Sections name=Sections  src=/c2p/images/icons/
icon_button_sections.gif border=0 onmouseout=MM_swapImgRestore()
onmouseover=MM_swapImage('Sections','','/c2p/images/icons/
icon_button_sections_o.gif',1) //a
/td
td nowrap=nowrap width=100% height=27
valign=middle class=pad_0 
a href=/c2p/imperativeRequirementList.do?
navigationTrail=%286120%29%28CI%29 class=leftnav pad_0Sections (1)
/a
/td

/tr
/table
/td

/tr
 tr

td id=sourceDate align=left height=27 width=1%
valign=middle class=pad_0_0_0_6 
a href=/c2p/sourceDateMainList.do?navigationTrail=
%286120%29%28CI%29img title=Dates alt=Dates name=Dates src=/
c2p/images/icons/icon_button_dates.gif border=0
onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage
('Dates','','/c2p/images/icons/icon_button_dates_o.gif',1)//a
/td
td id=sourceDate width=1% class=sectionSelected
nowrap=nowrap  height=27 valign=middle
a href=/c2p/sourceDateMainList.do?navigationTrail=
%286120%29%28CI%29 class=leftnavDates (2)/a
/td

/tr






On Oct 20, 12:51 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Oct 19, 2009 at 11:48 PM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:

  Watir::Exception::UnknownObjectException: Unable to locate element,
  using :text, Scope (0) \r\n

 Please post html of the table and Watir code that returns this error.

  I dont know why it is appending: \r\n, and how to truncate it.

 Because @@leftNav = $ie.table(:class, tableLeftNav).innerText returns it.

 Ž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: watir tests are not passing on my environment

2009-10-19 Thread Shlomit Gazit

Thank you! it helps!

On Oct 15, 4:53 pm, orde ohil...@gmail.com wrote:
 http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissues...

 Hope that helps...

 On Oct 15, 10:55 am,ShlomitGazit shlomitpatr...@gmail.com wrote:



  One ting I didnt mention is that the new machine is a VMFusion Windows on
  MAC.
  I sometimes success in finding the popup when I am not moving the mouse at
  all.

  How do you use wait_until?

  On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord b...@pettichord.comwrote:

   My guess is that this is Ajax code and that a robust fix would be to add
   some calls to wait_until.

   I also suspect that your new environment is using a faster browser
   and/or version of watir and that this is why you are now seeing timing
   problems.

   Bret

   P.S. The other solution might be to litter your code with sleeps. Just
   kidding!

  ShlomitGazit wrote:
One specific example I have:
I ran a test that is passing on my old environment and on the new
environment it is intermittent.

When trying to find popup:

The code is:

          $ie.cell(:class, c2p-action-down-arrow-horizontal).click
          $ie.link(:id, ID_EDITWATCHERS_MENU).click
          $ie1 = Watir::IE.attach(:title, /C2P/)
          $ie1.wait
          $ie1.select_list(:id,
RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
          $ie1.image(:src, /button_triangle_left/).click .

I got the error:

 1) Error:
test_issue_top(TC_c2p_all_issues):
Watir::Exception::UnknownObjectException: Unable to locate element,
using :id, RIGHT_HAND_LIST
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
52:in `assert_exists'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:63:in `select_item_in_select_list'
    C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'

1 tests, 0 assertions, 0 failures, 1 errors

On Oct 14, 12:16 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:

2009/10/14ShlomitGazit shlomitpatr...@gmail.com

I dont know if a downgrade will solve the problem.

I do not know too. Try and let us know.

For instance I can click in a frame with the old machine and watir
doesnt find it on the new machine.

And the error message is?

Željko

   --
   Bret Pettichord
   Lead Developer, Watir,www.watir.com
   Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
   Twitter,www.twitter.com/bpettichord
--~--~-~--~~~---~--~~
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] Cannot get truncated text of a cell in a table

2009-10-19 Thread Shlomit Gazit


@@leftNav = Array.new
@@leftNav = $ie.table(:class, tableLeftNav).innerText
@@leftNav_a = $ie.table(:class,
tableLeftNav).row_count_excluding_nested_tables
 puts(@@leftNav, @@leftNav_a)


  for i in 1..@@leftNav_a
  @@leftNav.each do |i|
   $ie.link(:text, #{@@leftNav[i]}).click


From puts @@leftNav, I am getting:


Scope (0)

 Sections (0)



 Dates (0)

 Related Sources (0)

***
When I am trying to locate the cell for .link,

I am getting an error:


Watir::Exception::UnknownObjectException: Unable to locate element,
using :text, Scope (0) \r\n


I dont know why it is appending: \r\n, and how to truncate it.

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



[wtr-general] Re: watir tests are not passing on my environment

2009-10-15 Thread Shlomit Gazit
One ting I didnt mention is that the new machine is a VMFusion Windows on
MAC.
I sometimes success in finding the popup when I am not moving the mouse at
all.


How do you use wait_until?

On Wed, Oct 14, 2009 at 9:18 PM, Bret Pettichord b...@pettichord.comwrote:


 My guess is that this is Ajax code and that a robust fix would be to add
 some calls to wait_until.

 I also suspect that your new environment is using a faster browser
 and/or version of watir and that this is why you are now seeing timing
 problems.

 Bret

 P.S. The other solution might be to litter your code with sleeps. Just
 kidding!

 Shlomit Gazit wrote:
  One specific example I have:
  I ran a test that is passing on my old environment and on the new
  environment it is intermittent.
 
  When trying to find popup:
 
  The code is:
 
$ie.cell(:class, c2p-action-down-arrow-horizontal).click
$ie.link(:id, ID_EDITWATCHERS_MENU).click
$ie1 = Watir::IE.attach(:title, /C2P/)
$ie1.wait
$ie1.select_list(:id,
  RIGHT_HAND_LIST).select_item_in_select_list(:index, 0)
$ie1.image(:src, /button_triangle_left/).click .
 
 
  I got the error:
 
   1) Error:
  test_issue_top(TC_c2p_all_issues):
  Watir::Exception::UnknownObjectException: Unable to locate element,
  using :id, RIGHT_HAND_LIST
  C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
  52:in `assert_exists'
  C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:63:in `select_item_in_select_list'
  C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
  c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'
 
  1 tests, 0 assertions, 0 failures, 1 errors
 
 
  On Oct 14, 12:16 am, Željko Filipin zeljko.fili...@wa-research.ch
  wrote:
 
  2009/10/14 Shlomit Gazit shlomitpatr...@gmail.com
 
 
  I dont know if a downgrade will solve the problem.
 
  I do not know too. Try and let us know.
 
 
  For instance I can click in a frame with the old machine and watir
  doesnt find it on the new machine.
 
  And the error message is?
 
  Željko
 
  
 


 --
 Bret Pettichord
 Lead Developer, Watir, www.watir.com
 Blog, www.io.com/~wazmo/blog http://www.io.com/%7Ewazmo/blog
 Twitter, www.twitter.com/bpettichord


 


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



[wtr-general] Re: watir tests are not passing on my environment

2009-10-13 Thread Shlomit Gazit

I am still waiting for help. Please I am desperate.


On Oct 2, 9:58 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 Hello,

 I have one watir environment that is well functioning (that I didn't
 set up).
 I was trying to set up a new watir environment but somehow the tests
 that are running on the good environment are not running on the new
 environment.

 For example, a test that is well running on one environment is
 breaking on the new environment when trying to find a url with regular
 expression.

 I am not sure if it is problem of IE. The working environment is IE
 7.0.6001 256bit.

 The new one is IE 7.0.5 but I couldn't find the right update (there is
 only IE8 update).

 The new environment is up to date with watir.

 Any ideas?

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



[wtr-general] Re: watir tests are not passing on my environment

2009-10-13 Thread Shlomit Gazit

Thank you for the replies.

I checked the version and the new environment has a newer version:

old: 1.5.6.1263 |   1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
new: 1.6.2 | ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

I dont know if a downgrade will solve the problem.

The problem is not in one place. It is basically doesnt find elements
that are existing in the code, which I obviously see.

For instance I can click in a frame with the old machine and watir
doesnt find it on the new machine.


On Oct 13, 4:13 pm, Bill Agee billa...@gmail.com wrote:
 Yes, please paste the exception you get (if that's what's happening).  And
 the line of code causing the exception will be helpful too.

 Also, you can compare the Ruby and Watir versions on each machine by running
 these on the command line:

 ruby -e require 'watir' ; puts Watir::IE::VERSION

 ruby -v

 Thanks
 Bill

 On Tue, Oct 13, 2009 at 3:16 PM, Željko Filipin 



 zeljko.fili...@wa-research.ch wrote:
  On Fri, Oct 2, 2009 at 6:58 PM, Shlomit Gazit shlomitpatr...@gmail.com
  wrote:
   For example, a test that is well running on one environment is
   breaking on the new environment when trying to find a url with regular
   expression.

  In my experience, when people do not get the answer, the problem is that
  usually the question is not explicit enough. Try adding more information and
  somebody could have an answer.

  Ž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] Running couples tests as a suite

2009-10-13 Thread Shlomit Gazit

I want to run couples of tests from one test, like a suite.
Is it possible to do it? If yes, how?

Thank you,
Shlomit
--~--~-~--~~~---~--~~
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] watir tests are not passing on my environment

2009-10-02 Thread Shlomit Gazit

Hello,

I have one watir environment that is well functioning (that I didn't
set up).
I was trying to set up a new watir environment but somehow the tests
that are running on the good environment are not running on the new
environment.

For example, a test that is well running on one environment is
breaking on the new environment when trying to find a url with regular
expression.

I am not sure if it is problem of IE. The working environment is IE
7.0.6001 256bit.

The new one is IE 7.0.5 but I couldn't find the right update (there is
only IE8 update).

The new environment is up to date with watir.

Any ideas?

Shlomit.


--~--~-~--~~~---~--~~
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] Checking if link exists

2009-10-02 Thread Shlomit Gazit

Hello,
I want to check if a link exists in the page.
I dont know what the content text of the link is, but I know the url.

The procedure is:

I want to set a filter with a certain text and clicking on the filter,
it suppose to return nothing, that's how I will see that it is working
well.

--~--~-~--~~~---~--~~
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] Click ok on popup

2009-10-02 Thread Shlomit Gazit

For handling prompt popups, I am using myClicker.rb file:
___

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 ==
__FILE__

require 'watir/WindowHelper'

$helper = WindowHelper.new
$helper.push_confirm_button_ok()



I am calling this file like this:
__

Thread.new { system(rubyw myClicker.rb) }
$ie.image(:name, /elete/).click
Thread.new { system(rubyw myClicker.rb) }

What I am trying to do above is deleting an object. I am getting first
popup asking if I really want to delete this and then a second popup
prompt to enter the reason. Both need to click 'ok' button.


It is working partly:
The problem is that most of the time I have to manually click on ok
button.


--~--~-~--~~~---~--~~
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: Checking if link exists

2009-10-02 Thread Shlomit Gazit

Thanks.
I realized I had to use .innerText



On Oct 2, 11:06 am, karim rayani karim@gmail.com wrote:
 Hi

 try this syntax

 

 require watir
 test_site = http://www.google.com;
 ie = Watir::IE.new
 ie.goto test_site
 puts ie.link(:index,1).to_s
 *puts ie.link(:index,1).href*
 # above is the href property to extract the href value from the hyperlink
 sleep(10)

 ie.close

 

 Thanx

 Karim Rayani

 http://karimnumerouno.wordpress.com

 On Fri, Oct 2, 2009 at 9:28 AM, Shlomit Gazit shlomitpatr...@gmail.com
 wrote:





  Hello,
  I want to check if a link exists in the page.
  I dont know what the content text of the link is, but I know the url.

  The procedure is:

  I want to set a filter with a certain text and clicking on the filter,
  it suppose to return nothing, that's how I will see that it is working
  well.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---