[wtr-general] Re: Trying to go back to watir 1.6.2, won't install correctly

2012-02-17 Thread George Wiley
I don't have a solution to fix the current install but what I have
done in the past when I just can't figure out what is going on (like
yesterday I could not get watir 1.6.2 to work on a machine) I copied a
good Ruby folder from my working machine to the machine that I was
fighting with and I am back up and running.

On Feb 17, 1:34 pm, Chuck van der Linden sqa...@gmail.com wrote:
 The other than might bite you is if you are using something like the
 RUBYLIB environment variable to assist ruby with finding helper
 methods you may have located in a specific directory.  That can also
 cause the same error when you are trying to require the file that
 holds those methods.

 Sorry to hear that you had some many issues trying to upgrade your
 scripts.  If you can give us any kind of post-mortem dump of the hard
 parts of the experience, it might help to figure out how to better
 document the process, or make things easier in the future.  We really
 need to improve the user experience there.

 I've been doing similar upgrades, but to scripts a bit newer than
 yours, and perhaps that has made a big difference for me.

 On Feb 17, 9:31 am, Lisa Crispin lisa.cris...@gmail.com wrote:



  Thanks, Trevor, I do have that RUBYOPT variable set.
  -- Lisa

  On Fri, Feb 17, 2012 at 4:10 AM, Trevor trevorm1...@gmail.com wrote:
   Hi Lisa,
   I have been going through the pain of upgrading to Ruby 1.9.3 and
   Watir 3.0, but haven't really kept a log of all the changes.
   I have been going back and forward between various versions of Ruby/
   Watir and I think when I saw this problem before I set
   RUBYOPT=rubygems in the system environment variables.
   Might be worth trying.

   Trevor

   On Feb 17, 3:29 am, Lisa Crispin lisa.cris...@gmail.com wrote:
I know, I had uninstalled Ruby 1.8.7 because the require 'watir' kept
failing, and installed Ruby 1.8.6, but now the install of watir won't
   work.

When I typed gem install watir in Ruby 1.8.7, I got Watir 2. I don't
   want
Watir 2, I want 1.6.2. Will that just happen by magic? I know I can just
try it, but I'm getting really tired of uninstalling and installing
   things.

thanks,
Lisa

On Thu, Feb 16, 2012 at 6:28 PM, Željko Filipin 
   zeljko.fili...@gmail.comwrote:

 On Thu, Feb 16, 2012 at 7:10 PM, Lisa Crispin lisa.cris...@gmail.com
 wrote:
  I get *** LOCAL GEMS ***

 If it does not list watir gem there, then you do not have it 
 installed.
 Try running this again:

 gem install watir

 Željko

 --
 Before posting, please readhttp://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

--
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for
   Testers
and Agile Teams_ (Addison-Wesley 2009)
Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com
@lisacrispin on Twitterhttp://entaggle.com/lisacrispin

   --
   Before posting, please readhttp://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.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

  --
  Lisa Crispin
  Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
  and Agile Teams_ (Addison-Wesley 2009)
  Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com
  @lisacrispin on Twitterhttp://entaggle.com/lisacrispin- 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] Is Watir being used by your developers?

2012-02-07 Thread George
Hi there,

My company is determining a solid automation framework that will be
used by both QA and developers. Although I've created a ton of Watir
scripts, I'm pretty sure that the developers will not embrace will
I've put together. Has anyone had any success in convincing your
developers to use Watir?

-George

-- 
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: Watirgrid: returning provider host names

2011-11-09 Thread George
Thanks for your patience. I got this working. I first opened a command
window and typed 'controller' to start the controller. Then I was able
to run this using SciTE:

require 'rubygems'
require 'watirgrid'

grid = Watir::Grid.new(:controller_uri = 'druby://
controller_address:port')
grid.start
puts grid.browers

I was able to see the hostnames at this point.

On Nov 8, 5:59 pm, @90kts tim.ko...@gmail.com wrote:
 It's a bit hard to answer without seeing your code...

-- 
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: Watirgrid: returning provider host names

2011-11-08 Thread George
Thanks for the reply, Tim. For the record, I'm using Ruby 1.8.7. Your
first example only returned the hostname of the controller (the
machine I'm running the script from). For the second example, I'm
getting  undefined method '[]' for nil:NilClass (NoMethodError). I'm
not sure what I'm doing wrong. Here's what I'm working with:
require 'rubygems'require 'watirgrid'
Watir::Grid.control(:browser_type = 'firefox',                      
     :controller_uri = 'druby://127.0.0.1:',                    
       :driver = 'webdriver') do |browser, id|   
browser.goto('http://www.google.com')    puts browser[index.to_i]
[:hostname] # ERROR    browser.closeend

On Nov 8, 3:23 am, @90kts tim.ko...@gmail.com wrote:
 Hi George,

 Each grid provider has a hostname attribute e.g.
 grid = Watir::Grid.new(:controller_uri = 'druby://124.180.42.243:11235')
 grid.start
 grid.browsers
  = [{:name=:WatirGrid, :class=:WatirProvider,
 :object=#Watir::Provider:0x007ffaf38973d0, :description=A watir
 provider, *:hostname=cpe-124-180-42-243.lns2.lon.bigpond.net.au*,
 :architecture=x86_64-darwin11.1.0, :driver=webdriver,
 :browser_type=chrome}]

 So to get the hostname of the first provider in your grid for example:
 puts grid.browsers.first[:hostname]
 cpe-124-180-42-243.lns2.lon.bigpond.net.au

 And if you were using the Watir:Grid.control helper, instantiate a grid
 object first (as above) so you can access it from within the block.
 ruby-1.9.2-p180 :024  Watir::Grid.control(:controller_uri =
 'druby://124.180.42.243:11235') do |browser, index|
 ruby-1.9.2-p180 :025      puts grid.browsers[index.to_i][:hostname]
 ruby-1.9.2-p180 :026?   end

 Regards,
 Tim

-- 
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: Watirgrid: returning provider host names

2011-11-08 Thread George
Actually, I just realized that I'm getting this error using SciTE, but
when I use IRB, I can see the hostnames of the providers!  Is there a
reason for this?


On Nov 8, 11:40 am, George george.sand...@gmail.com wrote:
 Oops, thanks for the catch! Here's what was returned with your code:

 C:/Ruby187/lib/ruby/1.8/rinda/ring.rb:212:in `lookup_ring_any':
 RingNotFound (RuntimeError)
         from C:/Ruby187/lib/ruby/gems/1.8/gems/watirgrid-1.1.5/lib/
 watirgrid.rb:132:in `find_ring_server'
         from C:/Ruby187/lib/ruby/gems/1.8/gems/watirgrid-1.1.5/lib/
 watirgrid.rb:36:in `start'
         from watirgrid_fm.rb:42

 On Nov 8, 11:27 am, @90kts tim.ko...@gmail.com wrote:







  Hi George, it doesn't matter about ruby versions.

  Your code is incorrect, *browser* doesn't have an array of attributes,
  browser is the actual browser!

  To get the grid browsers attributes, you need to call the *browsers* method
  of the *grid* object. So show me the about of the following in irb:
  grid = Watir::Grid.new(:controller_uri = 'druby://127.0.0.1:')
  grid.start
  grid.browsers

-- 
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] Watirgrid: returning provider host names

2011-11-07 Thread George
Hello, I hope this was the correct venue for my question. I was
wondering if it was possible to collect the host names of all the
providers that are being used when I run my Watirgrid scripts. This is
for reporting purposes so I can document which machine run a specific
test. Thanks!

-- 
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] Watirgrid: returning provider host names

2011-11-07 Thread George
Hello, I hope this was the correct venue for my question. I was
wondering if it was possible to collect the host names of all the
providers that are being used when I run my Watirgrid scripts. This is
for reporting purposes so I can document which machine run a specific
test. Thanks!

-- 
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] Watir script compartmentalization

2011-09-28 Thread George
Hello, I was curious to know how granular folks are making their Watir
scripts. As an example, I have an authentication script that contains
three parts:

1. Checking the elements of the login page
2. Performing valid logins and validating the output
3. Performing invalid logins and validating the output

Currently, all three parts are in one script. I'm wondering if I
should separate each of these into its own script. It would seem to
make sense, but I'd like to see what your opinion is.

Thanks!

-- 
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: Get Watir class methods

2011-09-23 Thread George
This should work (a text-field in this case):

puts @browser.text_field(:id, 'foo').methods.sort


On Sep 22, 11:51 am, Super Kevy kpe...@scholarshipamerica.org wrote:
 In ruby I can get methods for things like Integer or String by
 usiing .instance_methods(false) or .public_methods

 for example in IRB
 irb(main):006:0 String.instance_methods(false)
 = [:=, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], :
 []=, :insert, :le
 ngth, :size, :bytesize, :empty?, :=~, :match, :succ, :succ!, :next, :next!, 
 :upt
 o, :index, :rindex, :replace, :clear, :chr, :getbyte, :setbyte, :to_i, :to_f, 
 :t
 o_s, :to_str, :inspect, :dump, :upcase, :downcase, :capitalize, :swapcase, 
 :upca
 se!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, 
 :bytes, :
 chars, :codepoints, :reverse, :reverse!, :concat, :, :crypt, :intern, 
 :to_sym,
  :ord, :include?, :start_with?, :end_with?, :scan, :ljust, :rjust, :center, 
 :sub
 , :gsub, :chop, :chomp, :strip, :lstrip, :rstrip, :sub!, :gsub!, :chop!, 
 :chomp!
 , :strip!, :lstrip!, :rstrip!, :tr, :tr_s, :delete, :squeeze, :count, :tr!, 
 :tr_
 s!, :delete!, :squeeze!, :each_line, :each_byte, :each_char, :each_codepoint, 
 :s
 um, :slice, :slice!, :partition, :rpartition, :encoding, :force_encoding, 
 :valid
 _encoding?, :ascii_only?, :unpack, :encode, :encode!, :to_r, :to_c, :matches, 
 :t
 o_inputable_sym, :has_exact_prefix?, :without_pretty_indentation, :indent_by, 
 :t
 aguri=, :taguri, :is_complex_yaml?, :is_binary_data?, :to_yaml]

 irb(main):016:0 String.public_methods
 =
 [:try_convert, :yaml_tag_subclasses?, :yaml_new, :allocate, :new, :superclass
 , :to_yaml, :freeze, :===, :==, :=, :, :=, :, :=, :to_s, 
 :included_modules
 , :include?, :name, :ancestors, :instance_methods, :public_instance_methods, 
 :pr
 otected_instance_methods, :private_instance_methods, :constants, :const_get, 
 :co
 nst_set, :const_defined?, :const_missing, :class_variables, 
 :remove_class_variab
 le, :class_variable_get, :class_variable_set, :class_variable_defined?, 
 :module_
 exec, :class_exec, :module_eval, :class_eval, :method_defined?, 
 :public_method_d
 efined?, :private_method_defined?, :protected_method_defined?, 
 :public_class_met
 hod, :private_class_method, :autoload, :autoload?, :instance_method, 
 :public_ins
 tance_method, :pretty_print_cycle, :pretty_print, :syck_yaml_as, :yaml_as, 
 :yaml
 _tag_class_name, :yaml_tag_read_class, :dclone, :taguri=, :taguri, 
 :to_yaml_styl
 e, :to_yaml_properties, :syck_to_yaml, :pretty_print_instance_variables, 
 :pretty
 _print_inspect, :nil?, :=~, :!
 ~, :eql?, :hash, :class, :singleton_class, :clone,
  :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, 
 :untrust
 , :untrusted?, :trust, :frozen?, :inspect, :methods, :singleton_methods, 
 :protec
 ted_methods, :private_methods, :public_methods, :instance_variables, 
 :instance_v
 ariable_get, :instance_variable_set, :instance_variable_defined?, 
 :instance_of?,
  :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, 
 :respond_to_missing
 ?, :extend, :display, :method, :public_method, :define_singleton_method, 
 :__id__
 , :object_id, :to_enum, :enum_for, :pretty_inspect, :equal?, :!, :!
 =, :instance_
 eval, :instance_exec, :__send__]
 irb(main):017:0

 I haven't been able to get this to work with WATIR classes can anyone
 help me?

-- 
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: Can't access HTML in modal dialog using Ruby 1.9.2 and Watir 2.0.2

2011-09-21 Thread George Wiley
Hugh,

Thanks that explains a lot. I can continue testing in 1.9.2. with that
in mind. I will try my code in 1.8.7 to see how it goes.

Joe,

You have to attach to the modal if you have not done that already.
Also watch out for frames. If there are frames involved you will have
to connect to the frame first.

On Sep 21, 10:49 am, Joe Fleck joeflec...@gmail.com wrote:
 Hi Hugh,

 I am using ruby 1.8.7 and watir 2.0 and trying to click a button on a Modal
 dialog and nothing is happening.  Being new to watir what do I need to do to
 get this to work?

 Button I am trying to click:
 a id = accept_terms_of_useonclick = remove_submit_button(); jQuery.*

 the watir action I am trying to complete:

 # Clicking the Accept button for term of use
 ie.button(:id = 'accept_terms_of_use').click

 On Wed, Sep 21, 2011 at 10:03 AM, Hugh McGowan colinsda...@gmail.comwrote:



  Modal dialogs don't work yet in Ruby 1.9.2. The WIN32OLE API changed
  substantially in Ruby 1.9.2 and we rely on a custom compiled version
  of that library to provide access to the modal dialog DOM. This is
  working in Ruby 1.8.7 so if you need modal dialog support you'll need
  to go back (the latest version of Watir will of course work just
  fine). I'm not sure when I'll be able to take a look at this feature
  for 1.9.2 but hopefully in the relatively near future :).

  Thanks!
  Hugh

  --
  Before posting, please readhttp://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- 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] Can't access HTML in modal dialog using Ruby 1.9.2 and Watir 2.0.2

2011-09-16 Thread George Wiley
The code below works fine with Win7, IE8, Ruby 1.8.6 and Watir 1.6.2
for accessing an 'Internet Explorer_TridentDlgFrame' modal dialog.
This code gives the error below when I upgrade to Ruby 1.9.2 and Watir
2.0.2. It does not appear to be a timing issue because I have tried
sleeps and Watir::Wait.until without success.

I can find the dialog but I cannot access the HTML code. I can also
find the dialog using RAutomation directly but I have the same
problem. I can't see the HTML to access the controls on the modal
dialog.

The modal dialog has a text_field a select_list and 2 buttons all
within a frame.

Is there another tool I should be using with these newer versions of
Ruby and Watir to access the HTML in a modal dialog?

Thank you for your help.
*
require 'watir'

ie = Watir::IE.attach(:title, /my title/i)

btnOK = ie.button(:id, 'OK').click_no_wait()   # this opens the
modal dialog

iemod = nil

50.times do
  begin
iemod = ie.modal_dialog # this does find the dialog
puts ** dialog found **
break
  rescue
puts ** dialog not found **
sleep(1)
  end
end

sleep(20)
frame = iemod.frame(:name, 'Frame')
modSelectList = frame.select_list(:name, 'Select_List')
puts modSelectList.exists?

C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/lib/
watir/modal_dialog.rb:32:in `locate': undefined method
`connect_unknown' for WIN32OLE:Class (NoMethodError)
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/modal_dialog.rb:36:in `document'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:7:in `document'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:147:in `each_element'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:159:in `block in each'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:158:in `each'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:158:in `each'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:173:in `locate'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/frame.rb:10:in `locate'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/element.rb:75:in `assert_exists'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/frame.rb:35:in `document'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/frame.rb:24:in `__ole_inner_elements'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:200:in `each_element'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:220:in `each'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/locator.rb:213:in `locate'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/input_elements.rb:6:in `locate'
from C:/programs/Ruby-192-p290/lib/ruby/gems/1.9.1/gems/watir-2.0.2/
lib/watir/element.rb:391:in `exists?'
from watir202test.rb:39:in `main'
** dialog found **

-- 
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: Ruby 1.9.2 and Watir 2.01 indexing compatibility

2011-09-06 Thread George Wiley
I tried it both ways with the same results. I found that it works when
I use the syntax below. I have to change my code in all my old scripts
but it will run with old and new versions of Watir with this change.

use:

ie.table(:id, 'Menu').row(:index = 1).click()  # this syntax works
when the switch is set

instead of:

ie.table(:id, 'Menu').rows[1].click()  # it would be nice if this
worked but it does not

On Sep 6, 2:25 pm, Jarmo Pertman jarm...@gmail.com wrote:
 Does Watir::Browser.new work instead of Watir::IE.new?

 Jarmo

 On Sep 2, 6:45 pm, George Wiley george.wi...@gmail.com wrote:



  Here is my test code. Maybe you can see what my problem is. The below
  code works in 2.0.1 if IDX value is 0 but fails if IDX is 1.

  require 'watir'
  Watir::IE.zero_based_indexing = false
  # Watir.options[:zero_based_indexing] = false

  test_site = 'http://mysite.com'

  ie = Watir::IE.new()
  ie.goto(test_site)

  IDX = 1  # This works in 1.6.2 but does not work in 2.0.1 with either
  of the zero_based_indexing switches set above.

  ie.table(:id, 'Menu').rows[IDX].click()

  On Aug 27, 7:22 am, Jarmo Pertman jarm...@gmail.com wrote:

   What is the exact code when you load the Watir and open up a browser
   too?

   The Watir.options line should be right after require watir and it
   also depends of the code you're using to create/attach browser
   instance.

   If you're not using Watir::Browser, but use Watir::IE instead then you
   should use Watir::IE.zero_based_indexing = false instead.

   Jarmo

   On Aug 26, 6:00 pm, George Wiley george.wi...@gmail.com wrote:

I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with
older versions without zero based indexing.

I'm running on Win7, IE8. I have a page with 5 radio buttons with the 
below
option set in my code.

Watir.options[:zero_based_indexing] = false

Here is my code:

ie.radios[5].click
ie.radios[4].click
ie.radios[3].click
ie.radios[2].click
ie.radios[1].click

This does not work. I get an error for index 5. I assumed that my old 
code
would be able to run in the zero based indexing environment with the 
above
option set.

This code works fine:

ie.radios[4].click
ie.radios[3].click
ie.radios[2].click
ie.radios[1].click
ie.radios[0].click   # zero based indexing

Is this the way it is supposed to work for radio buttons?- Hide quoted 
text -

   - Show quoted text -

  On Aug 27, 7:22 am, Jarmo Pertman jarm...@gmail.com wrote:

   What is the exact code when you load the Watir and open up a browser
   too?

   The Watir.options line should be right after require watir and it
   also depends of the code you're using to create/attach browser
   instance.

   If you're not using Watir::Browser, but use Watir::IE instead then you
   should use Watir::IE.zero_based_indexing = false instead.

   Jarmo

   On Aug 26, 6:00 pm, George Wiley george.wi...@gmail.com wrote:

I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with
older versions without zero based indexing.

I'm running on Win7, IE8. I have a page with 5 radio buttons with the 
below
option set in my code.

Watir.options[:zero_based_indexing] = false

Here is my code:

ie.radios[5].click
ie.radios[4].click
ie.radios[3].click
ie.radios[2].click
ie.radios[1].click

This does not work. I get an error for index 5. I assumed that my old 
code
would be able to run in the zero based indexing environment with the 
above
option set.

This code works fine:

ie.radios[4].click
ie.radios[3].click
ie.radios[2].click
ie.radios[1].click
ie.radios[0].click   # zero based indexing

Is this the way it is supposed to work for radio buttons?- Hide quoted 
text -

   - Show quoted text -- 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: Ruby 1.9.2 and Watir 2.01 indexing compatibility

2011-09-04 Thread George Wiley
Here is my test code. Maybe you can see what my problem is. The below
code works in 2.0.1 if IDX value is 0 but fails if IDX is 1.

require 'watir'
Watir::IE.zero_based_indexing = false
# Watir.options[:zero_based_indexing] = false

test_site = 'http://mysite.com'

ie = Watir::IE.new()
ie.goto(test_site)

IDX = 1  # This works in 1.6.2 but does not work in 2.0.1 with either
of the zero_based_indexing switches set above.

ie.table(:id, 'Menu').rows[IDX].click()


On Aug 27, 7:22 am, Jarmo Pertman jarm...@gmail.com wrote:
 What is the exact code when you load the Watir and open up a browser
 too?

 The Watir.options line should be right after require watir and it
 also depends of the code you're using to create/attach browser
 instance.

 If you're not using Watir::Browser, but use Watir::IE instead then you
 should use Watir::IE.zero_based_indexing = false instead.

 Jarmo

 On Aug 26, 6:00 pm, George Wiley george.wi...@gmail.com wrote:



  I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with
  older versions without zero based indexing.

  I'm running on Win7, IE8. I have a page with 5 radio buttons with the below
  option set in my code.

  Watir.options[:zero_based_indexing] = false

  Here is my code:

  ie.radios[5].click
  ie.radios[4].click
  ie.radios[3].click
  ie.radios[2].click
  ie.radios[1].click

  This does not work. I get an error for index 5. I assumed that my old code
  would be able to run in the zero based indexing environment with the above
  option set.

  This code works fine:

  ie.radios[4].click
  ie.radios[3].click
  ie.radios[2].click
  ie.radios[1].click
  ie.radios[0].click   # zero based indexing

  Is this the way it is supposed to work for radio buttons?- Hide quoted text 
  -

 - Show quoted text -

On Aug 27, 7:22 am, Jarmo Pertman jarm...@gmail.com wrote:
 What is the exact code when you load the Watir and open up a browser
 too?

 The Watir.options line should be right after require watir and it
 also depends of the code you're using to create/attach browser
 instance.

 If you're not using Watir::Browser, but use Watir::IE instead then you
 should use Watir::IE.zero_based_indexing = false instead.

 Jarmo

 On Aug 26, 6:00 pm, George Wiley george.wi...@gmail.com wrote:



  I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with
  older versions without zero based indexing.

  I'm running on Win7, IE8. I have a page with 5 radio buttons with the below
  option set in my code.

  Watir.options[:zero_based_indexing] = false

  Here is my code:

  ie.radios[5].click
  ie.radios[4].click
  ie.radios[3].click
  ie.radios[2].click
  ie.radios[1].click

  This does not work. I get an error for index 5. I assumed that my old code
  would be able to run in the zero based indexing environment with the above
  option set.

  This code works fine:

  ie.radios[4].click
  ie.radios[3].click
  ie.radios[2].click
  ie.radios[1].click
  ie.radios[0].click   # zero based indexing

  Is this the way it is supposed to work for radio buttons?- 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: way to check whether new page has been loaded..

2011-08-30 Thread George
This thread may answer your question:

http://bit.ly/nW5Acu



On Aug 29, 6:52 pm, byung jinuacad...@gmail.com wrote:
 is there a way to check whether a new page has been loaded in WATIR??

 could anyone tell me a way to check new page load in WATIR??

 thanks.

-- 
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] Ruby 1.9.2 and Watir 2.01 indexing compatibility

2011-08-26 Thread George Wiley
I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with 
older versions without zero based indexing.

I'm running on Win7, IE8. I have a page with 5 radio buttons with the below 
option set in my code. 

Watir.options[:zero_based_indexing] = false 

Here is my code: 

ie.radios[5].click 
ie.radios[4].click 
ie.radios[3].click 
ie.radios[2].click 
ie.radios[1].click 

This does not work. I get an error for index 5. I assumed that my old code 
would be able to run in the zero based indexing environment with the above 
option set.

This code works fine: 

ie.radios[4].click 
ie.radios[3].click 
ie.radios[2].click 
ie.radios[1].click 
ie.radios[0].click   # zero based indexing 

Is this the way it is supposed to work for radio buttons?

-- 
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: chrome is crashing when i try to read dropdown list element

2011-07-26 Thread George
Hi Christina,

Try this out:

puts $browser.select(:xpath, //
select[@id='mailbox_type']).getSelectedItems[0]


On Jul 25, 2:31 pm, Cristina Dumitrescu
cristina.watir.toro...@gmail.com wrote:
 Hi.
 I have tests suites that are running great on firefox using watir-webdriver
 Now I try to run the tests on chrom.
 Some of the tests are running, but when i try to read a selected
 dropdownlist value the  chrom is crashing

         selectedMbType =   $browser.select(:xpath,
 //select[@id='mailbox_type']).value
         puts selectedMbType

 Anyone encounter that kind of problem.

 Thanks a lot in advance,
 Cristina

-- 
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] 2011 Google Test Automation Conference

2011-07-21 Thread George
Hi there,

I was just wondering if anyone from the Watir community will be
attending this conference in Mountain View, CA:

http://www.gtac.biz/

-- 
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: type-ahead select lists

2011-05-23 Thread George
Hi Lisa,

I think I found an example you're using here:

http://www.upscale.utoronto.ca/test/dojo/tests/widget/test_Select.html

I'm looking at Select #2 (dataUrl, autocomplete=true). The only way I
could get it to work is by using send_keys:

b = Watir::IE.attach(:title, /Dojo/)
test_field = b.span(:class = dojoComboBoxOuter dj_ie, :index =
2).text_field(:class, dojoComboBox)
test_field.focus
b.send_keys(florida)
sleep 2
b.send_keys({ENTER})


On May 23, 12:44 pm, Lisa Crispin lisa.cris...@gmail.com wrote:
 We are changing what used to be regular drop-down select list boxes to a
 dojo widget thingie that allows type ahead to select the item. Here's the
 HTML:

     select dojoType=dijit.form.FilteringSelect id=advisor.dealerId
 name=advisor.dealerId style='width: 550px;'

                     option value=0 

             /option

                     option value=1059 
                 1717 Capital Management / 300 Continental Drive /
 Suite 3 South / Newark, DE 19713-4329 /

             /option
 ...etc

 I thought I could use text_field to set a value here, just as if I typed it
 manually on the page. I tried ie.text_field(:id,
 'advisor.dealerId').set(some value). When I do this in irb, I see it set
 the value, but when I submit, it shows the default value was selected
 instead. I also tried fire_event(onclick), that didn't help.

 We were able to get our Canoo WebTest scripts to select these with its
 forceHiddenInputField step. I thought maybe I could do something similar
 in Watir with input type=hidden, but I can't get the syntax right and I
 can't find any examples. I can't figure out where I would put input
 type=hidden in my text_field step.

 Would someone please point me to examples that might help me figure this
 out? I apologize if this is an ignorant question. I searched the mailing
 list and the Watir site but I could not figure out how to make this work.
 thanks,
 Lisa

 --
 Lisa Crispin
 Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
 and Agile Teams_ (Addison-Wesley 2009)
 Contributor to _Beautiful Testing_ (O'Reilly 2009)http://lisacrispin.com
 @lisacrispin on Twitterhttp://entaggle.com/lisacrispin

-- 
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: No able to click hyperlink showing in the tablecell

2011-05-16 Thread George
Have you tried using flash to identify the larger containers?


On May 16, 7:28 am, sandy sandix...@gmail.com wrote:
 Thanks for replying but these option is also not working.

 Please let me know if there is an another solution of this problem.

 On May 13, 7:55 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:







  On Fri, May 13, 2011 at 4:31 PM, sandy sandix...@gmail.com wrote:
   i am not able to click the update or cancel link

  Try this:

  browser.link(:text = Update).click
  browser.link(:text = Cancel).click

  Željko
  --
  watir.com - community manager
  watir.com/book - author
  watirpodcast.com - host
  viaqa.mobi conference on software testing - organizer

-- 
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: Watir with Telerik Rad Grid

2011-05-09 Thread George
Hello Ranjith,

I got this to work with the combobox:

b = Watir::IE.attach(:title, /ComboBox/)
b.link(:id, RadComboBox1_Arrow).click
b.div(:id, RadComboBox1_DropDown).div(:class, rcbScroll
rcbWidth).ul(:index, 1).li(:index, 6).click #selects Ann Devon



On May 9, 6:04 am, ranjith kumar ranjith@gmail.com wrote:
 Hi.

 In this scenario, I have the rad combo box inside the telerik rad window.

 In earlier case it was simple rad combo box in the main page only.

 Thats the difference.

 I tried with the below code but i couldnt do it so.

 ie1.div(:id,RadWindowWrapper_rwmwindow).input(:id =
 rcbCombo1_input).click
 ie1.div(:id,RadWindowWrapper_rwmAddProgram).ul(:class =
 rcbList).li(:text = Abc).click,

 but it didnt work.

 On Mon, May 9, 2011 at 6:09 PM, Željko Filipin 







 zeljko.fili...@wa-research.ch wrote:
  2011/5/9 ranjith kumar ranjith@gmail.com
   Please help in resolving the below issue:

  Didn't I already answer your question? What is different now?

  Željko

  --
  Before posting, please readhttp://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

-- 
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: Watir at Facebook

2011-02-22 Thread George
Nice, thanks for doing this!


On Feb 22, 7:02 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 I have created Watir Facebook page:

 https://www.facebook.com/pages/Watir/155249291152060

 Feel free to like it. :)

 I did not find a way how to create simple URL 
 likehttps://www.facebook.com/pages/Watiror evenhttps://www.facebook.com/Watir,
 if somebody knows how to do it, please let me know.

 There is almost no content on the page at the moment, I plan to post there a
 few times per week.

 Željko
 --
 watir.com - community manager
 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.

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


[wtr-general] Re: Finding an element that is rendered as a link but was an asp button

2011-01-14 Thread George
Hi there,

Does the link ID (ctl00_cph_statusRepeater_ctl26_deleteLinkButton)
display when you run the following:

b = Watir::Browser.attach(:title, /LeadManager/)

b.links.each do |link|
  puts link.id if link.id != ''
end



On Jan 14, 3:22 pm, micako mic...@gmail.com wrote:
 http://pastebin.com/8NM5wF02

 There you go.

 Appreciate you looking at it.

 On Jan 14, 3:09 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:







  On Sat, Jan 15, 2011 at 12:06 AM, micako mic...@gmail.com wrote:
   Would it help if I provided the source of the page?

  Maybe. :)

  Post it tohttps://gist.github.com/

  Željko

-- 
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: Select from select list

2010-12-20 Thread George
Hey there,

I was able to select the item without clicking the button:

browser.text_field(:id, 'ctl00_SampleContent_ComboBox1_TextBox').set
Whiskey

Hope this helps!

-George



On Dec 20, 12:50 pm, Igor Tiutiunnykov igorr...@gmail.com wrote:
 Thank you very much for the reply, tried in his play, but it does not
 work. I write so:

 ff.button(:id = ctl00_SampleContent_ComboBox1_Button).click
 ff.li(:text =Whiskey).click

 ie.button(:id = ctl00_SampleContent_ComboBox1_Button).click
 ie.li(:text, Whiskey).click

 but click on the required element is not happening. I have Windows 7,
 watir, firewatir ^(

 On 20 дек, 13:09, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:







  On Sun, Dec 19, 2010 at 1:59 PM, Igor Tiutiunnykov igorr...@gmail.com
  wrote:

   select Whiskey from the dropdown list.

  The problem is that you are not dealing with select list, but with a button
  and unordered list. This worked for me (Mac, Firefox, watir-webdriver):

  browser.button(:id = ctl00_SampleContent_ComboBox1_Button).click
  browser.li(:text = Whiskey).click

  Željko
  --
  watir.com - community manager
  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.

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


[wtr-general] Re: Test Framework

2010-12-09 Thread George
I think the biggest issue for me is that I'm still very new to RSpec.
If I spend a little more time learning this, I should have a better
sense of how your framework...erm, works.

BTW, I tried to use your Google example and was fine except for the
deprecation warning for activesupport. I'm still trying to figure out
how to start writing tests, though. I'll keep poking around.






On Dec 9, 7:09 am, Charley Baker charley.ba...@gmail.com wrote:
 Happy to do that if you can suggest what you're interested in. All the
 basic elements are described along with examples. Let me know what
 would help and I'll see what I can do.

 Cheers,

 Charley







 On Wed, Dec 8, 2010 at 5:26 PM, George george.sand...@gmail.com wrote:
  +1

  It would be helpful to have a little more documentation on how to
  implement this framework...

  On Dec 8, 2:56 pm, Yush bismitha...@gmail.com wrote:
  Hi Charley,

  I would like to know more about Taza framework. I installed the gem
  and had a little play around with it. Watched the 8 min screencast as
  well, but couldn't find more of it on advanced features and cross-site
  testing?

  Thanks,
  Yush

  On Dec 8, 8:14 pm, Charley Baker charley.ba...@gmail.com wrote:

   I have a lot of experience and came up with Taza after several
   iterations of frameworks to test major websites - Gap, Facebook, and
   others. Pros, the basic model, helps testers, particularly those new
   to the field or with less experience talk the same language as the
   developers and use common abstractions/models that make things easy to
   understand.

   Cons, I don't know of any off the top of my head, suggestions and
   challenges - there might be challenges to figure out what belongs in a
   flow vs a page as a helper method. Where to draw the line for
   abstraction and DRY vs keeping your tests informative.

   If you ask specific questions, I'm happy to answer. A lot of the
   challenges take experience and someone to help shape your testing.

   Charley Baker
   Lead Developer, Watir,http://watir.com

   On Wed, Dec 8, 2010 at 12:27 PM, Kay karthigaya...@gmail.com wrote:
Hello all,

I have recently read quite a lot about using sites, pages and flow
objects when creating tests. I have been following this route in my
current project and its still evolving. I am using quite lot of flows
and flow data for UI testing.

I just wanted to step back for a moment and have think about it-its
pros and cons...

I am throwing it out there- what do you think, any fellow and
experienced Watirers.

Cheers,
Kay

--
Before posting, please readhttp://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

  --
  Before posting, please readhttp://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

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

2010-12-08 Thread George
+1

It would be helpful to have a little more documentation on how to
implement this framework...



On Dec 8, 2:56 pm, Yush bismitha...@gmail.com wrote:
 Hi Charley,

 I would like to know more about Taza framework. I installed the gem
 and had a little play around with it. Watched the 8 min screencast as
 well, but couldn't find more of it on advanced features and cross-site
 testing?

 Thanks,
 Yush

 On Dec 8, 8:14 pm, Charley Baker charley.ba...@gmail.com wrote:







  I have a lot of experience and came up with Taza after several
  iterations of frameworks to test major websites - Gap, Facebook, and
  others. Pros, the basic model, helps testers, particularly those new
  to the field or with less experience talk the same language as the
  developers and use common abstractions/models that make things easy to
  understand.

  Cons, I don't know of any off the top of my head, suggestions and
  challenges - there might be challenges to figure out what belongs in a
  flow vs a page as a helper method. Where to draw the line for
  abstraction and DRY vs keeping your tests informative.

  If you ask specific questions, I'm happy to answer. A lot of the
  challenges take experience and someone to help shape your testing.

  Charley Baker
  Lead Developer, Watir,http://watir.com

  On Wed, Dec 8, 2010 at 12:27 PM, Kay karthigaya...@gmail.com wrote:
   Hello all,

   I have recently read quite a lot about using sites, pages and flow
   objects when creating tests. I have been following this route in my
   current project and its still evolving. I am using quite lot of flows
   and flow data for UI testing.

   I just wanted to step back for a moment and have think about it-its
   pros and cons...

   I am throwing it out there- what do you think, any fellow and
   experienced Watirers.

   Cheers,
   Kay

   --
   Before posting, please readhttp://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

-- 
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: Call to Arms :)

2010-11-15 Thread George
Hi Charley,

I might need to talk to you.  As I've been learning Watir, I steered
away from established frameworks (frankly, out of my lack of
understanding) and developed my own framework which included HTML
reporting.  However, as the number of tests have been increasing and
gaining more visibility to others within my team, I'm finding that
it's become more difficult to maintain.

So, I might need to (gulp) re-structure my tests.  I still need to
talk to my boss about this, but I'll take a look at those links and
develop some simple tests.  Hopefully, this will inspire me to adhere
to already-established frameworks.

-George



On Nov 15, 1:34 pm, Charley Baker charley.ba...@gmail.com wrote:
 This might help some of you and definitely worth checking out 
 :http://www.cheezyworld.com/ He has a couple of pages now on cucumber
 and browser testing, developing a page based framework. 
 Tazahttps://github.com/scudco/tazais a framework I've architected and
 used in several large companies, which has many of the same concepts
 that people are moving towards - e.g. page and site models. Please do
 check these out, use them and try not to reinvent your own framework.

 Ruby has builtin support for a base test library - a few of us have
 added additional test frameworks on top of that which are used in
 heavy large scale application testing with AJAX and all the goodness
 from years of experience. Cheezy's posts are a build up of real life
 experience using Watir and Cucumber on various client sites. I'd
 highly recommend following them, there are several more coming.

 I'll drop a hint, Taza is an awesome framework for web ui testing,
 well used and also extensible. If you want to get involved in either
 Taza or Watir, we've got a lot of work to do, and I'm happy to mentor
 from the newbie on up.

 Cheers,

 Charley

-- 
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: Call to Arms :)

2010-11-15 Thread George
One question about Taza: Would this framework be effective for testing
the same functionality across multiple pages?  IOW, if there is a
search feature that needs to be tested, but can be found on multiple
pages, would Taza work for my needs?

Thanks,

George



On Nov 15, 5:59 pm, George george.sand...@gmail.com wrote:
 Hi Charley,

 I might need to talk to you.  As I've been learning Watir, I steered
 away from established frameworks (frankly, out of my lack of
 understanding) and developed my own framework which included HTML
 reporting.  However, as the number of tests have been increasing and
 gaining more visibility to others within my team, I'm finding that
 it's become more difficult to maintain.

 So, I might need to (gulp) re-structure my tests.  I still need to
 talk to my boss about this, but I'll take a look at those links and
 develop some simple tests.  Hopefully, this will inspire me to adhere
 to already-established frameworks.

 -George

 On Nov 15, 1:34 pm, Charley Baker charley.ba...@gmail.com wrote:







  This might help some of you and definitely worth checking out 
  :http://www.cheezyworld.com/ He has a couple of pages now on cucumber
  and browser testing, developing a page based framework. 
  Tazahttps://github.com/scudco/tazaisa framework I've architected and
  used in several large companies, which has many of the same concepts
  that people are moving towards - e.g. page and site models. Please do
  check these out, use them and try not to reinvent your own framework.

  Ruby has builtin support for a base test library - a few of us have
  added additional test frameworks on top of that which are used in
  heavy large scale application testing with AJAX and all the goodness
  from years of experience. Cheezy's posts are a build up of real life
  experience using Watir and Cucumber on various client sites. I'd
  highly recommend following them, there are several more coming.

  I'll drop a hint, Taza is an awesome framework for web ui testing,
  well used and also extensible. If you want to get involved in either
  Taza or Watir, we've got a lot of work to do, and I'm happy to mentor
  from the newbie on up.

  Cheers,

  Charley

-- 
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: Using HTML report V2 - Reports displayed twice in HTML format

2010-11-11 Thread George
I've been using this, and, like Chuck, cannot help due to the fact
that you're not provided a lot of info.

You shouldn't have to remove the rescue clause, so I would check to
make sure that you've copied the code completely before running it.


On Nov 11, 7:56 am, Chuck van der Linden sqa...@gmail.com wrote:
 On Nov 10, 2:39 am, vasu br.vas...@gmail.com wrote:

  Please help me in this issue.

 you've not provided enough details for anyone to help you.

 at the very minimum you'd need to do something like provide some
 sample code both for your tests, and of the report class if you've
 made ANY changes to it

 Pretend you know NOTHING about what you've already tried to do, now
 put yourself in the mindset of someone reading your message, and ask
 'is there enough here for someone to be able to assist me with
 troubleshooting this problem.

-- 
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: How to click on ENTER keystroke using rb-appscript in Watir-WebDriver

2010-10-07 Thread George
Hello,

I'm not sure if this is part of AutoIt, but have you tried send_keys?

@browser.send_keys('{ENTER}')



On Oct 7, 1:52 am, Ozzi usmanhhuss...@gmail.com wrote:
 Hi Guys,

 I have a problem...

 I need to hit the ENTER button on the keyboard on my tests. I was
 using AutoIT when I was working on Windows and had this:
     require 'rubygems'
     require 'win32ole'
     require 'watir-webdriver'

     autoit = WIN32OLE.new('AutoITX3.Control')
     autoit.WinActivate('OK')
     autoit.Send('{ENTER}')

 BUT now im using a MAC and this does not work. Ive tried to use rb-
 appscript after searching the net and have come up with this:
     require 'rubygems'
     require 'appscript'
     require 'watir-webdriver'

     te = app('OK')
     te.activate
     te.key.ENTER

 BUT this is not working... Has anyone else used rb-appscript?
 any help would be great. i need this fixed by the end of play today as
 all of my scripts are failing. would really appreciate anyone who can
 tell me how to hit the ENTER keystroke on a MAC...

 Kind regards,
 Usman Hussain

-- 
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: Object Repository gem

2010-10-05 Thread George
Hi Ivan,

Is this any different than the repository you used here:

http://groups.google.com/group/watir-general/browse_thread/thread/aa7ca79359e9fdb6/968e2555bf89d0fa?hl=enlnk=gstq=ObjectRepository#968e2555bf89d0fa

I've been using this quite extensively and it's been great, especially
since the :id attributes I rely on are being updated from time to
time.

-George





On Oct 4, 12:02 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 It is useful if your application has many fields and always changing.
 And test file become clearer. For examples:
 Instead of browser.div(:id, content).table(:index, 1).cell(:index,
 2).text_field(:class, required).set(Test Value)
 you can use repository.get(Awesome field).set(Test Value)

 If location of field will change then you can fix it in one repository
 file

 It is easy to organize Data Driven Testing

 If you use the Cucumber as testing framework it will be clear for all
 (developers, testers, managers, users):

 Given ...
 When user set Awesome field with Test Value
 Then ...

 where step definition will be

 When /^use set (.*) with (.*)$/ do |field, value|
    repository.get(field).set(value)
 end

 On 4 окт, 19:35, Ethan notet...@gmail.com wrote:



  Interesting, but.. what is it? What does it do, why is it useful?

  On Sun, Oct 3, 2010 at 04:58, Ivan Kabluchkov ikabluch...@gmail.com wrote:
   Hi Watir community!

   I've created gem which can work with object repository.

   For more information seehttp://github.com/lfidnl/watir-or/wiki

   I you have any quetion or problem reply to this thread

   --
   Before posting, please readhttp://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

-- 
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: Watir handling of ul and ol tags

2010-09-28 Thread George
Hi there,

I had to modify Watir to read th tags. You could apply this to ol
and ul. Here's what you do:

1. Go to C:\Ruby\lib\ruby\gems\1.8\gems\watir-1.6.5 (or whatever
version you're running)\lib\watir\non_control_elements.rb

2. Insert the following into your code:

class OL  NonControlElement
  TAG = 'OL'
end
class UL  NonControlElement
  TAG = 'UL'
end

You *should* be able to read any text within those tags, although I
haven't tested this. This worked for me when reading the th tags.
Good luck!

-George


On Sep 28, 7:09 am, Mark Winteringham winteringham.m...@gmail.com
wrote:
 Hi,

 I just wanted to find out if Watir handles ol tags since it can
 handle ul tags.  Tried googling briefly and didn't see anything.

 Cheers

 Mark

-- 
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: Date Functions

2010-09-16 Thread George
Chronic might be something to look into:

http://rubygems.org/gems/chronic



On Sep 16, 3:00 am, sivam sivamma...@gmail.com wrote:
 Do we have any date function to convert string to date format like mm/
 dd/yy

 Actually my string is September 13, 2010 5:54:32 PM. I need to
 compare this string with 09/13/2010. Could please help onto this.

-- 
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: More than one condition

2010-08-25 Thread George
What is the HTML of the link outside of the table that you want to
click?

-- 
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 George
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] Re: cant get an element

2010-07-20 Thread George
It looks like it's wrapped in a p tag, which should be accessible
via Watir:

puts @browser.p(:class, wpFieldValue).text

This has worked for me in the past.

-George



On Jul 15, 2:18 am, ryanthescot ryanthes...@hotmail.com wrote:
 span class=wpFieldViewContent
 id=dnn_ctr353_Main_ctl00_ctl00_ctl00_ctl07_Field_048b9dfa-
 bc64-42e4-8bd5-b45385e5f45b_view_value
 p class=wpFieldValue Bishop/p
 /span

 I am trying to get the value 'Bishop' from this HTML to use in an if
 statement, but I cant find a way of getting the element.

 Can someone advise how i might do so?

-- 
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: Issue retrieving URL for a HTML file loaded from local file system

2010-07-10 Thread George
According to the message, you didn't define LocationURL anywhere. I
*do* see sLocalURL



On Jul 10, 4:18 pm, joedio joe...@comcast.net wrote:
 #
 # Watir fails to get url for a file on the local file system, but not
 for same file on server
 # even though both files are the same, only difference is one is
 hosted is on server
 # while the other is on local file system. Both files load OK into the
 browser.

 require 'rubygems'
 require 'watir'

 sServerURL = http://myserver.com/html/bug.html;
 sLocalURL = file://C:/bug.html

 browser = Watir::Browser.new

 browser.goto(sServerURL)
 sCurrentServerURL = browser.url  # --- THIS WORKS
 puts(Current URL:  + sCurrentServerURL.to_s)
 sleep 2  # Wait long enough to see that the browser loaded the page

 browser.goto(sLocalURL)
 sCurrentLocalURL = browser.url  # --- THIS FAILS. Why?
 puts(Current URL:  + sCurrentLocalURL.to_s)
 sleep 2 # Wait long enough to see that the browser loaded the page
 browser.close

 ##  Here's the contents of the file:

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 html
 head
 titleWatir URL Bug/title
 /head
 body
 Why is this bug occuring?
 /body
 /html

 #  Here's the error:

 ruby bug.rb

 Current URL:http://home.comcast.net/~watirworks/html/bug.html
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
 465:in `method_missing': unknown property or method
 `LocationURL' (WIN32OLERuntimeError)
     HRESULT error code:0x80010108
       The object invoked has disconnected from its clients.     from c:/
 ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:465:in
 `url'
         from bug.rb:33



 Exit code: 1

-- 
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: Launching Report At End of Test

2010-07-06 Thread George
Thanks Adam.  Kind of weird...I was the one that updated the original
code and added it to the wiki, but now it's being credited by someone
else.



On Jul 6, 9:09 am, Adam Reed reed.a...@gmail.com wrote:
 Joe,

 Since the report is a basic .html file, you can open/view/launch it
 just like any other web content.  You could launch a browser and
 supply the browser.goto command with the file name you defined earlier
 (from the tutorial):

 @report = @html.createReport('google_search', 'Google Search',
 browser_type)

 As I understand it, this should create a file named
 google_search.html. So that you don't have to repeat this code for
 each script you create, you'd want your report name set as a variable
 that you can access later.  Obviously there's a lot of exception
 handling and validation you would want to add, but here's an idea of
 how you could handle it:

 - test.rb
 report_name = google_search #
 path_to_report = C:/Logs/#{report_name}.html
 @report = @html.createReport(report_name, 'Google Search',
 browser_type) #FROM TUTORIAL

 !-- code code code --
 !-- code code code --

 @html.finishReport(@report, browser_type, test_environment) #FROM
 TUTORIAL
 view_report(path_to_report)

 - includes.rb
 def view_report(report)
   �...@report_browser = Watir::Browser.new
   �...@browser.goto report
 end #view_report

 On Jul 2, 5:53 pm, Joe Touhey joetou...@gmail.com wrote:



  Hi,

  I am using the report class 
  athttp://wiki.openqa.org/display/WTR/HTML+report+class+%28version+2%29.
  What I would like to do is launch the report that I created during my
  test at the end of the test. Can someone give me a hand with the code
  to do this?

  Have a great day,
  Joe Touhey

-- 
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] How to sell Watir services to non-techie customers

2010-07-06 Thread George
I was hoping I can get some advice from you all regarding how to
utilize my Watir skills to help others automate tasks. I guess my
questions are:

1. How do I sell my services to a potential customer?
2. How much should I charge for script development? Is it by the hour?
By the size of the project?
3. Would I need to require them to install Ruby/Watir/other gems to
run the scripts or should I try to encapsulate it into an .exe file?
4. Any other advice/insight?

Thanks,

George

-- 
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: The interface is unknown

2010-06-24 Thread George
It looks like you close your browser at the end of the loop, then you
attempt to go to a URL.

Perhaps replacing line 2 with this will do the trick:

ie.start(http://yourwebsitehere;)

HTH,

George



On Jun 24, 2:46 pm, Adam xyza...@gmail.com wrote:
 My code grabs data from a spreadsheet, then uses this data to populate
 fields on a form, then submits that data and scrapes the information
 from the next screen.

 The script is (was) working. Whenever I start adding loops, I get the
 following error:

 C:/Ruby186/lib/ruby/gems/1.8/gems/waitr-1.6.5/lib/watir/ie-class.rb:
 354:in 'method_missing': unknown property or method 'navigate'
 WIN32OLERuntimeError
 HRESULT error code:0x800706b5
 The interface is unknown.
 from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-
 class.rb:354:in 'goto' from works.rb:47

 The code (seems to be breaking at line 47, or line 2 in the 
 pastie)http://pastie.org/1017931

 I looked through the forums and couldn't find anything. Help would be
 much appreciated.

-- 
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: The interface is unknown

2010-06-24 Thread George
Cool, glad it worked.  ie.start should have opened a new browser (like
Watir::IE.new) and go to the URL specified.  Not sure why that didn't
work for you.




On Jun 24, 3:18 pm, Adam xyza...@gmail.com wrote:
 I tried ie.start(yourwebsite...)

 It didnt' work, but it got me thinking that I needed to instantiate
 the object within the loop maybe... so I tried this and it worked:

 http://pastie.org/1017983

 On Jun 24, 3:10 pm, George george.sand...@gmail.com wrote:



  It looks like you close your browser at the end of the loop, then you
  attempt to go to a URL.

  Perhaps replacing line 2 with this will do the trick:

  ie.start(http://yourwebsitehere;)

  HTH,

  George

  On Jun 24, 2:46 pm, Adam xyza...@gmail.com wrote:

   My code grabs data from a spreadsheet, then uses this data to populate
   fields on a form, then submits that data and scrapes the information
   from the next screen.

   The script is (was) working. Whenever I start adding loops, I get the
   following error:

   C:/Ruby186/lib/ruby/gems/1.8/gems/waitr-1.6.5/lib/watir/ie-class.rb:
   354:in 'method_missing': unknown property or method 'navigate'
   WIN32OLERuntimeError
   HRESULT error code:0x800706b5
   The interface is unknown.
   from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-
   class.rb:354:in 'goto' from works.rb:47

   The code (seems to be breaking at line 47, or line 2 in the 
   pastie)http://pastie.org/1017931

   I looked through the forums and couldn't find anything. Help would be
   much appreciated.

-- 
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: How to insert a blank value from spreadsheet into a textbox on webpage.

2010-06-15 Thread George
I've been using the Excel interface class, and am able to insert
blanks into a text field if a cell is blank:

http://wiki.openqa.org/display/WTR/Excel+interface+class



On Jun 13, 11:34 pm, Chandu80 chandu.she...@gmail.com wrote:
 Hi All,
 I have written a script which requires me to insert a blank value into
 a textbox on webpage.
 The script should take this blank value from the  spreadsheet and then
 insert it into the textbox.(As this is a part of the negative test
 scenario)
 When I leave a column in a spreadsheet blank and try to run the
 script,
 I get the following error.

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:390:in `
 limit_to_maxlength'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
 watir/input_el
 ements.rb:338:in `set'C:/Lmg_test/ruby/11.06.2010/driver/
 cfg_snmp_access2.rb:84

  undefined method `length' for nil:NilClass

 Kindly let me know how to deal with this and how blank value can be
 taken as an input from the spreadsheet without error.

 Thanks in Advance

 Regards
 Chandrika

-- 
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: Creating a Rubygem to use in conjunction with Watir

2010-06-14 Thread George
Wow, thanks Charley! I followed the railscast and was shocked by how
simple this can be. I've been scouring online for documentation that
is straightforward.



On Jun 11, 9:23 am, Charley Baker charley.ba...@gmail.com wrote:
 Hi George,

   You definitely can, I created a separate gem with a variety of classes,
 helper methods, etc for my group and recommend using this approach where it
 makes sense to logically and physically break things up. You simply need to
 create a gem structure, there are several tools out there to do this, I've
 used jeweler, there are several other projects out there.

 These links might help get you started in the right direction:

 http://technicalpickles.com/posts/craft-the-perfect-gem-with-jeweler/

 http://railscasts.com/episodes/135-making-a-gem

 For internal gems, I've either checked the gem into source control or built
 out an internal gem server as opposed to using rubyforge.

 HTH,

 Charley Baker
 Lead Developer, Watir,http://watir.com



 On Fri, Jun 11, 2010 at 8:58 AM, George george.sand...@gmail.com wrote:
  Greetings,

  I have created a number of custom classes to use with Watir. It would
  be nice if I could compile them into a gem and distribute it to the
  other members of my team. Is this possible? I'm not sure if this is
  right forum to ask this.

  Please let me know if you need more details from me, thanks!

  -George

  --
  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] Creating a Rubygem to use in conjunction with Watir

2010-06-11 Thread George
Greetings,

I have created a number of custom classes to use with Watir. It would
be nice if I could compile them into a gem and distribute it to the
other members of my team. Is this possible? I'm not sure if this is
right forum to ask this.

Please let me know if you need more details from me, thanks!

-George

-- 
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: Filling Textarea - Rapidweaver

2010-05-26 Thread George
It seems to work for me (I'm using IE8).

require 'watir'

browser = Watir::IE.attach(:title, 'Kontakt')
browser.text_field(:name, form[element3]).set This example
demonstrates the power of Watir and Ruby!


On May 26, 9:08 am, rsb r...@antispam.de wrote:
 Hi,

 for a little tutorial I created a website with Rapidweaver. With the
 tutorial I want to fill a contact form.

 see:

 http://www.earthbook.de/kontakt/kontakt.php

 If i try to fill the textarea I get the following error:

 Watir::Exception::UnknownObjectException: Unable to locate TextField
 element with name of form[element3]

  my Watir code ---
 # Let us fill out the form
 browser.text_field(:name, form[element0]).set My Name is Rene
 browser.text_field(:name, form[element1]).set r...@unknown.xx
 browser.text_field(:name, form[element2]).set Test Automation
 browser.text_field(:name, form[element3]).set This example
 demonstrates the power of Watir and Ruby!
  my Watir code ---

 -- HTML Code -
 labelNachricht:/label *br /
 textarea class=form-input-field name=form[element3] rows=8
 cols=38/textareabr /br /
 -- HTML Code -

 Any ideas...?

 Regards
 René

-- 
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: Not able to click Enter using SENDKEY

2010-05-24 Thread George
Do you have AutoIt installed?

On May 24, 4:41 am, meaculpa harismah...@gmail.com wrote:
 Hi All,

 I had a search field and I have to do a blank search.

 My code is :

 require'rubygems'
 require 'watir'
 require 'win32ole'

 $m_link = 'ww1.*.com'
 $browser = Watir::IE.start($m_link)
 $browser.text_field(:name, keywords).set('')
 $browser.send_keys({enter})
 $browser.waitForIE

 but its not clicking..

 error got is

 ruby return.rb

 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/ie-class.rb:
 425:in `autoit'
         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
 433:in `send_keys'
         from return.rb:30

 Exit code: 1

 Please help..

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Return titles/urls of all open browser instances

2010-05-20 Thread George
Wow, that was easy. Thanks a lot! :)

On May 19, 5:08 pm, Ethan notet...@gmail.com wrote:
 Watir::IE.each do |b|
   puts b.title
 end





 On Wed, May 19, 2010 at 19:45, George george.sand...@gmail.com wrote:
  I've been searching for an answer, but no luck.

  When I click on a link, a new browser window is supposed to open. My
  job is to click the link again and make sure there that a duplicate
  window doesn't display. Using Watir::IE.process_count doesn't help due
  to the fact that IE8 displays more than one instance of iexplore.exe
  for one browser window.

  Isn't there an easy way to iterate over all open browsers and get the
  title or URL? Something like:

  browsers.each do |b|
   puts b.title
  end

  --
  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 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Watir gem installation on Windows 7

2010-05-19 Thread George
Other than making sure that you're an administrator, I'm not sure why
you would get that error. I don't remember running into any troubles
when I installed everything. I used the Ruby 1.8.6 One-Click
Installer.



On May 19, 5:52 am, Betsy joybe...@gmail.com wrote:
 Hi Jarmo,

 Initially when I tried using the Ruby one click installer, it said
 that it wasn't compatible with Windows7 and that I should use rc2.exe
 for the same.

 When I installed ruby using the rc2, it did seem to get installed but
 I could access Ruby only through the separate command prompt icon
 provided with it and not the common cmd. The common cmd simply refused
 to recognize ruby as a command which it does when the one click
 installer is used with windows xp.

 Now when I type gem update --system and then gem install watir, it
 shows that watir is installed successfully. But when i execute a ruby
 script with require 'watir', it gives me an error saying no such file
 to load. :(

 -Betsy Joy.

 On May 19, 1:54 pm, Jarmo Pertman jarm...@gmail.com wrote:





  There shouldn't be anything special when it comes to installing Watir
  on Windows 7. At least i didn't do anything. Could you please specify
  *what* and *how* isn't exactly working?

  Jarmo

  On May 19, 7:37 am, Betsy joybe...@gmail.com wrote:

   Hi George,

   That is encouraging... At least it works for you. :)

   Can you please let me know the procedure you followed to set up Watir?
   I mean apart from the regular gem install watir, did you provide any
   specific rights or did you install it at some specific location? Being
   a new user to Windows 7, I guess I am missing something somewhere
   related to the OS itself.

   Thanks for the help,
   -Betsy Joy

   On May 18, 9:42 pm, George george.sand...@gmail.com wrote:

I've been using Watir on Windows 7. The only problem I've been having
is that, at times, the script will stick, meaning I need to click on
something or refresh the page before the script continues to run. It's
pretty annoying.

On May 18, 5:31 am, Betsy joybe...@gmail.com wrote:

 hi all,

 any known issues with watir gem installation on windows 7??

 -Betsy Joy

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

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

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

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

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

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

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

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

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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] Return titles/urls of all open browser instances

2010-05-19 Thread George
I've been searching for an answer, but no luck.

When I click on a link, a new browser window is supposed to open. My
job is to click the link again and make sure there that a duplicate
window doesn't display. Using Watir::IE.process_count doesn't help due
to the fact that IE8 displays more than one instance of iexplore.exe
for one browser window.

Isn't there an easy way to iterate over all open browsers and get the
title or URL? Something like:

browsers.each do |b|
  puts b.title
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] Re: Watir gem installation on Windows 7

2010-05-18 Thread George
I've been using Watir on Windows 7. The only problem I've been having
is that, at times, the script will stick, meaning I need to click on
something or refresh the page before the script continues to run. It's
pretty annoying.

On May 18, 5:31 am, Betsy joybe...@gmail.com wrote:
 hi all,

 any known issues with watir gem installation on windows 7??

 -Betsy Joy

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Verify tab order (tab index) on an HTML page

2010-05-18 Thread George
Thanks, Joedio. There is a way to do this using AutoIt. If I use
send_keys, then check the value of the text_field, I can determine
which element has focus. Unfortunately, this won't work with buttons
and links.


On May 18, 9:57 am, joedio joe...@comcast.net wrote:
 The Watir tabindex method you used is for HTMl tags with a tabindex
 attribute.
 For example:
    a href=#interactive tabindex=1 Link A/a
    a href=#interactive tabindex=2 Link B/a

 As you mention, your web page is NOT using the tabindex attribute,
 thus the method return 0.

 Perhaps you could use AutoIt's send_keys command to tab through the
 web page, e.g.

 # Advance to the next object in the tabbing order
 browser.send_keys({TAB})

 and after each command detect which object has focus. You could then
 collect the tabbing
 order, which could be saved and compared to the tabbing order found on
 subsequent runs.

 Sorry but I don't know of a means to tell which object has focus,
 Watir's Watir::Element class lack an in_focus? method.
 It has focus method to set the focus but not a method to verify if it
 is in focus.
 Perhaps someone else can assist with that.

 On May 14, 7:06 pm, George george.sand...@gmail.com wrote:





  I'm trying to verify the tab order on a login page by accessing the
  tabindex attribute. Unfortunately, the tabindex isn't specified in the
  HTML code and performing the following code isn't helping me. Does
  anybody have any ideas?

  ~~

  @browser = Watir::IE.attach(:title, /Login/)

  puts @browser.text_field(:id, 'username').document.tabindex # returns
  0

  puts @browser.text_field(:id, 'username').attribute_value('tabindex')
  # returns 0

  puts @browser.text_field(:id, 'password').document.tabindex # returns
  0, expected 1

  puts @browser.text_field(:id, 'password').document.tabindex # returns
  0, expected 1

  ~~

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

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

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Extracting from a google search

2010-05-17 Thread George
Hello,

If I understand correctly, you're looking for the search term to be in
the result link's URL, correct?

If so, you can use this:

browser = Watir::IE.start('http://www.google.com')
browser.text_field(:name, 'q').set 'watir'
browser.button(:name, 'btnG').click

browser.links.each do |link|
  if link.class_name == 'l'
if link.href =~ /watir/i
  puts link.text
end
  end
end



On May 17, 3:59 am, ambarw aaronbarw...@googlemail.com wrote:
 I am new to Watir and Ruby and have ben trying to esablish a reliable
 way of extracting the search result from a google search.
 I can't seem to distinguish between Google's sponsored links and other
 search results
 I want to be be able to search for pat of a url to see if it appears
 in he googles search result on a page but not in the sponsored links
 I thought about trying to use class along with url in browser.link
 because I notice google has a class of 'l' for normal listings but
 this
 doesn't work.
 I will incorporate it into a while loop to search the first few pages.
 I will be grateful if anyone knows the way to solve this or at least a
 pointer.Iseem to be able to indentify spored links if the search term
 appears
 in them.

 The following fails to detect anything withing the listed (non-
 sponsored) results
 # Attempt to select the non sponsored link by selecting class l
 (fails),
 and url attribute
 url_existing = (browser.link(:url, /[searchterm]/).exists?)
  (within a loop)
 if url_existing == true  # If URL is found

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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] Verify tab order (tab index) on an HTML page

2010-05-14 Thread George
I'm trying to verify the tab order on a login page by accessing the
tabindex attribute. Unfortunately, the tabindex isn't specified in the
HTML code and performing the following code isn't helping me. Does
anybody have any ideas?

~~

@browser = Watir::IE.attach(:title, /Login/)

puts @browser.text_field(:id, 'username').document.tabindex # returns
0

puts @browser.text_field(:id, 'username').attribute_value('tabindex')
# returns 0

puts @browser.text_field(:id, 'password').document.tabindex # returns
0, expected 1

puts @browser.text_field(:id, 'password').document.tabindex # returns
0, expected 1

~~

-- 
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: Saving Javascript Files

2010-05-07 Thread George
Hi Brendan,

Sharing is caring...can we see what you put together? Who knows, I may
need something like this in the future.

Thanks,

George



On May 7, 10:31 am, Brendan Grainger brendan.grain...@gmail.com
wrote:
 Hi Ethan,

 Thanks for the response on this. I ended up writing a simple proxy which I 
 point watir at and saves *everything* down as it goes. It's been working out 
 great.

 Thanks
 Brendan

 On Apr 14, 2010, at 5:27 PM, Ethan wrote:





  It looks like you have the watir part down. It's easy to download data from 
  a URL in ruby, though not through watir. Check the Net::HTTP library.
 http://www.ruby-doc.org/core/classes/Net/HTTP.html
  If the script's src attribute is set to a relative path then you'll have 
  to combine it with the page's url to get an absolute path, but that 
  shouldn't be too hard.

  On Wed, Apr 14, 2010 at 17:12, Brendan Grainger 
  brendan.grain...@gmail.com wrote:
  Hi Tiffany,

  I realize water is a ruby library that interacts with web browsers. I also 
  realize it's easy to enumerate all the linked script files with something 
  like:

  jscripts = ie.document.getElementsTagName(script)
  jscripts.each do |js|
         puts Javascript file is located at: #{js.invoke('src')}
         #Easy way to download javascript file? I could do this I guess:
         javascritpt_content = ie.goto(js.invoke('src')).html # Obviously 
  have to account for relative urls here
  end

  I was wondering more if there was a built in way.

  Thanks anyway
  Brendan

  On Apr 14, 2010, at 3:07 PM, Tiffany Fodor wrote:

   Hi!

   Watir is a Ruby library that allows users to interact with web
   browsers.  There's a good chance that you could accomplish your file
   management with Ruby, but that is a question for a Ruby mailing list
   (http://www.ruby-lang.org/en/community/mailing-lists/).

   Good luck!

   -Tiffany

   On Apr 12, 10:33 pm, rainkinz brendan.grain...@gmail.com wrote:
   Hi,

   Is there an easy way to enumerate and save javascript files (and
   linked css files for that matter) using watir?

   Thanks

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

   You received this message because you are subscribed 
   tohttp://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 
  tohttp://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com

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

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

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Watir xpath navigation problem

2010-05-06 Thread George
Hi there,

I'm not sure how many text fields are on the page, but have you
considered using the :index attribute?

@ie.text_field(:index, 5).set something


On May 6, 12:07 pm, Felipe Pedrini felipedr...@gmail.com wrote:
 Hello, FK,

 Yes, it was I thought, a bug, but I came ask here just to confirm.

 I've tried the workaround, and I have no success. The error continues:

 D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
 element.rb:907:in `assert_exists': Unable to locate element,
 using :xpath, //*...@tabindex='4901']
  (Watir::Exception::UnknownObjectException)

 And, yes, my tabindex is unique. Do you have any other sugestion? I'm
 not a specialist in xpath queries.

 Thanks!

 On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote:





  Hello, Felipe,

  It sure does look like a bug.

  A workaround would be using the wildcard selector like this:

  @ie.text_field(:xpath, //*...@tabindex='4901']).set test

  Hopefully your tabindex property is unique to all elements :)

  Regards,

  FK

  On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote:

   Hi guys,

   I'm evaluating Watir, and I'm trying to simple get an element using
   its XPath. But I'm having a problem.

   First look at the problem.

   I have the following element in my page:

   input type=text maxlength=15 tabindex=4901

   Notice that it doesn't have name neither id attributes. When I try to
   get it using xpath:

   browser.text_field(:xpath, //
   inp...@tabindex='4901']).set(something)

   I get the following error:

   D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
   element.rb:907:in `assert_exists': Unable to locate element,
   using :xpath, //
   inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException)
          from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
   firewatir/elements/text_field.rb:149:in `set'
          from waitir_adm_jp_1.rb:10

   Watir can't find the element. But if I try to get other element that
   have id or name attributes using xpath (in the very same page) I can
   get it, without problems.

   My guess is that Watir can't acess elements without name or id
   attribute, even if it isn't used in xpath query, the element must have
   it. Is it right? If not, where am I making mistake?

   Thanks.

   --
   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 
  tohttp://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: watir-general+unsubscr...@googlegroups.com

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: Fwd: [selenium-developers] Proposal for a Selenium StackExchange site

2010-05-03 Thread George
I am interested in helping, although I'm still a little unclear about
what I need to do.



On May 3, 8:10 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, May 3, 2010 at 5:04 PM, Kunal kunal...@gmail.com wrote:
  I am game for it as well. Let me know what's next ?

 You can check Stack Exchange site if the three of us is enough people to
 start the site. You can also copy Selenium proposal for creating the site
 and replace the data with Watir's data.

 I plan to do it in a day or two, but feel free to do it yourself. :)

 If the three of us are not enough people to start the site, we will have to
 wait for more people to say they are interested in supporting the site.

 Željko

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: XML reading help needed

2010-04-29 Thread George
Hi ChuckD,

I got this working with REXML:

xml_test.rb
=
def get_node_value(tag, path)
  require 'rexml/document'
  include REXML
  Dir.chdir(path)
  file = 'test_file.xml' # file you're working with
  begin
doc = Document.new(File.new(file))
doc.each_element('//' + tag) { |node| puts node.to_s.gsub('' +
tag + '', '').gsub('/' + tag + '', '') }
  rescue
puts '* FAIL: Unable to process: ' + file
  end
end

# let's try this sucker out:

puts getting value...
puts 
get_node_value('value', '\\path\\to\\xml\\file')

# output
===
2.3
6.58
0.0




On Apr 28, 8:12 am, ChuckD cdempseyrealest...@gmail.com wrote:
 I can read all the XML in my file except this

 ?xml version=1.0 encoding=UTF-8 ?
 - citizen
 - skills
 - skill
   domainland/domain
   value2.3/value
   /skill
 - skill
   domainmanufacturing/domain
   value6.58/value
   /skill
 - skill
   domainconstructions/domain
   value0.0/value
   /skill
   /skills
    /citizen

 using REXML
 puts doc.root.elements[skills/skill/domain].get_text.value
 #outputs land
 puts doc.root.elements[skills/skill/value].get_text.value
 #outputs 2.3

 Can not get the other skills.

 Thanks in advance

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

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@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: handling Javascript/CSS menus in watir

2010-04-29 Thread George
This worked for me:

# using an open browser pointed to
# http://www.cognizant.com/html/home.asp

browser = Watir::IE.attach(:title, /Cognizant/)
browser.link(:id, 'industries').fire_event('onmouseover') # displays
menu
browser.link(:title, 'Banking  Financial Services').click



On Apr 29, 5:10 am, Tester joeni...@gmail.com wrote:
 On Apr 29, 4:05 pm, Tester joeni...@gmail.com wrote: Hi

  I am trying to generate watir script for web application with CSS/
  Javascript menus. on giving show_links, showAllObjects drop down menu
  links does not get displayed. After i place the mouse of the menu if i
  give ie.show_links all links get displayed.
  I tried using fire_event - onmouseover,onmousedown,onmouseup yet
  unable to access the menu from the script.
  Can anybody please help me on the same

 source code of the page is given below. Plz help.

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 headmeta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1 /META NAME=ROBOTS

 CONTENT=NOHTMLINDEX/script type=text/javascript
 language=javascript

 src=/_layouts/1033/init.js?rev=qX%2BG3yl4pldKy9KbPLXf9w%3D%3D/
 script
 script type=text/javascript language=javascript src=/_layouts/
 1033/core.js?rev=CNBZRdV1h3pKuA7LsMXf3w%3D%3D

 defer/script
 title
         ChannelOne :: Home
 /titlelink href=/inc/main.css rel=stylesheet type=text/css /

 link href=/inc/Ch1Team.css rel=stylesheet

 type=text/css /link rel=shortcut icon href=/images/favicon.ico
 type=image/x-icon /
 style type=text/css

 body {
         background-color: #CC;

 }

 /style
 script type=text/javascript src=/inc/stmenu.js/script
 script type=text/javascript src=../../inc/CH1.js/script

 script language=javascript type=text/javascript
 /script

 !--mstheme--link id=ctl00_onetidThemeCSS rel=stylesheet
 type=text/css href=../../_themes/simple/simp1011-28591.css

 /meta name=Microsoft Theme content=simple 1011, default //
 head

 body

 table border=0 cellpadding=0 cellspacing=0  height=128px;
 align=center 
                 tr bgcolor=black
                         td id=ch_logoimg src=/images/ch1logo_21.gif 
 //td
                         td align=right style= padding-right:10px
                                 table border=0 cellpadding=0 
 cellspacing=0
                                         tr
                                                 tdimg 
 src=/images/lft_curve.gif //td
                                                 td id=yellow_bg 
 class=tpt-menu

 script type=text/javascript
 var HomeUrl= /Pages/General/Ch1Home.aspx ;
 var TagUrl= /Pages/General/TagCloud.aspx ;
 var PAUrl= /Pages/PA/Prospectanalyzer.aspx ;
 var KYCUrl= /Pages/KYC/KYC.aspx ;
 var ForumsUrl= /Ch1Forums;
 var CIUrl= /Pages/CI/CI.aspx ;
 var CTubeUrl= https://ctube.cognizant.com;;
 var AlliancesUrl= /Pages/Alliances/Alliances.aspx ;
 var LinkUrl= /Pages/General/linktoall.aspx;
 var Ch1Url= /Pages/CH1Library/CH1Library.aspx ;
 var CVUrl= /Pages/CV/CV.aspx;
 var BBUrl= /Pages/BestBets/Contribute.aspx;
 var SWUrl= /Pages/General/SWLastFive.aspx;
 var FBUrl= /Lists/Channel1FeedBack/NewForm.aspx?Source=/Lists/
 Channel1FeedBack/summary.aspx;
 stm_bm([menu0f4d,850,,,0,,,0,0,250,0,1000,1,0,0,,540,
 0,0,1,2,default,hand,],this);
 stm_bp(p0,
 [0,4,0,0,0,7,5,0,100,,-2,,-2,50,0,0,#99,transparent,,
 3,1,1,#FCA518]);
 stm_ai(p0i0,[0,SEARCH,,,-1,-1,0,HomeUrl,_self,
 5,5,0,,,0,0,0,1,1,#F7,1,#99,1,,,3,1,0

 ,0,#F7,#00,#00,#00,8pt
 'Verdana','Arial','Helvetica','sans-serif;',bold 8pt

 'Verdana','Arial','Helvetica','sans-serif;',0,0],95,26);
 stm_aix(p0i1,p0i0,
 [0,EXPLORE,,,-1,-1,0,,_self,5,5,0,,,-1,-1],
 95,26);
 stm_bpx(p1,p0,
 [1,4,0,2,0,5,0,0,80,progid:DXImageTransform.Microsoft.RandomDissolve(,enab 
 led=0,Duration=0.30),
 12,progid

 :DXImageTransform.Microsoft.RandomDissolve(,enabled=0,Duration=0.30),
 12,80,0,0,#66,#00,]);
 stm_aix(p1i0,p0i0,[0,Search

 Tags,,,-1,-1,0,TagUrl,_self,0,0,0,,,
 0,0,0,1,1,#F9E0CA,1,#66,0,,,3,1,0,0,#FF,#FF

 ,#FF,#FF,8pt 'Verdana','Arial','Helvetica','sans-
 serif;',8pt

 'Verdana','Arial','Helvetica','sans-serif;'],70,26);
 stm_aix(p1i1,p1i0,[0,Prospect

 Analyzer,,,-1,-1,0,PAUrl,_self,0,0,0,,,
 0,0,0,1,1,#F9E0CA,1,#66,0,,,3,1,0,0,#FF,#FFF

 FFF,#FF,#FF,8pt 'Verdana','Arial','Helvetica','sans-
 serif;',8pt

 'Verdana','Arial','Helvetica','sans-serif;'],70,26);
 stm_aix(p1i2,p1i0,[0,ChannelOne

 Forums,,,-1,-1,0,ForumsUrl,_self,0,0,0,,,
 0,0,0,1,1,#F9E0CA,1,#66,0,,,3,1,0,0,#FF,#F

 F,#FF,#FF,8pt 'Verdana','Arial','Helvetica','sans-
 serif;',8pt

 'Verdana','Arial','Helvetica','sans-serif;'],70,26);
 stm_aix(p1i3,p1i0,[0,Links to all

 portals,,,-1,-1,0,LinkUrl,_self,0,0,0,,,
 0,0,0,1,1,#F9E0CA,1,#66,0,,,3,1,0,0,#FF,#FF

 ,#FF,#FF,8pt 'Verdana','Arial','Helvetica','sans-
 serif;',8pt

 

[wtr-general] Re: How to check if toggle link is open or closed

2010-04-26 Thread George
Hi Kim,

Using the example below:

http://www.tutorio.com/tutorial/javascript-expanding-menu

I toyed around with Example 1. One thing you might try is determine if
a link that resides in the hidden section is visible or not. This way
you can know if the expanded menu is visible.

browser = Watir::IE.attach(:title, /Menu/)
puts browser.link(:text, /Featured./).visible? # true if the menu is
expanded, false if hidden

-George



On Apr 26, 11:33 am, KimBrown kimbro...@yahoo.com wrote:
 I have a javascript link that toggles a section of additional options
 open and closed. I can click on it to open  close:
    $ie.link(:text, /More Choices/).click

 I can find it:
    irb(main):050:0* puts $ie.links

    type:
    id:
    name:
    value:
    disabled:     false
    href:         javascript:toggleRows('fields');
    inner text:   Hide/Show More Choices
 -- and --
    irb(main):050:0* puts $ie.text

    Hide/Show More Choices

 But I can't figure out how to do a  check on whether it's open or
 closed. From the user's perspective the text changes between Hide
 and Show accordingly but don't know where the code indicates which
 is engaged. I've searched around quite a bit but haven't found
 anything to help. Suggestions?

 Here is what I think is the relevant code. Let me know if that's not
 sufficient. Also, the website is a subscription site but I can give a
 temporary login if someone emails me for it.

 input type=hidden NAME=show_fields VALUE=

         tr
                 td colspan=3 style=padding: 0;
 table cellspacing=0 summary=Extended Search Form
 class=fullWidth
         tr
                 td colspan=3 class=spacer
                         script type=text/javascript
                                 !--
                                 if(document.getElementById) {
                                         // Write Show/Hide switch
                                         document.write('h3 '); // Force 
 formatting of element to
 display
                                         try {
                                                 if(document.styleSheets) {
                                                         // Only display 
 switch if browser can handle
                                                         document.write('a 
 class=bold toggle
 href=JavaScript:toggleRows(\'fields\'); tabindex=2span
 id=fieldsOffHide\/spanspan style=display: none;\/\/
 spanspan id=fieldsOnShow\/span More Choices\/a');
                                                 } else {
                                                         throw(e);
                                                 }
                                         } catch (e) {
                                                 document.write('More 
 Choices');
                                         }
                                         document.write('\/h3');
                                         toggleRows('fields');   // Turns 
 section display off
                                 }
                                 //--
                         /script
                         noscript
                                 !-- Else section displayed  --
                                 h3More Choices/h3
                         /noscript
                 /td
         /tr

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

 You received this message because you are subscribed 
 tohttp://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] Re: Running my Watir Scripts in batch file??

2010-04-20 Thread George
One option is to put your script file names in one script file like
this:

(in batch_run.rb):
==

load 'watir_script1'
load 'watir_script2'
load 'watir_script3'

etc. This way, your other scripts will continue to run if one of them
terminates unexpectedly.



On Apr 20, 6:10 am, Srinidhi srinidhi...@gmail.com wrote:
 The issue here is exception handlng has been taken care off in the
 scripts as far as individual scripts is concerned. How will i take of
 exception handling in batch file level. means in 100 scripts i have
 lined up,if one of them happen to fail i need my execution to continue
 with next script instead of terminating batch.

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

 You received this message because you are subscribed 
 tohttp://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] Re: how to compare time 10.30 PM with string 10:30 PM

2010-04-10 Thread George
Hello,

I think this should work for you, although I don't think this is
specific to Watir:

require 'time'

a = Time.now.strftime(%I:%M %p)
puts a # returns '5:27 PM'
x =  Time.parse(10:30 PM).strftime(%I:%M %p)
puts x # returns '10:30 PM'

puts a  x # returns 'true'



On Apr 10, 10:47 am, Rajiv Nanduani rajivkumarnandv...@gmail.com
wrote:
 Hi All,.

 I am having a problem i need to check a validation the particular game is
 locked after specified time for that i am getting the time as string from
 application web page like my string contain s your game will lock at 10:30
 PM IST now from that string  i will extract out that time in a string like
 my variable stringtime = 10:30 PM. after that when my script run then i
 have to check time compare with current time for that i am doing this but
 this is not work perfect way i think there is need to convert time object
 before do comapre.

 # suppose my current time is 10:30 PM means a contain 10:30 PM that is
 greater than b but actual result is false
 a = Time.now.strftime(%I:%M%p)

 b = 12:40AM

 puts b
 puts a b

 output is false while i need true

 --
 RAJIV KUMAR

 http://rajivkumarnandvani.wordpress.com/
 http://learnqtphelp.blogspot.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, reply using remove me as the subject.


[wtr-general] Re: Experience with testing Apples Web Objects

2010-04-07 Thread George
Is there a website I can take a look at which employs WebObjects?

On Apr 7, 3:20 pm, dt_nz david.tay...@sungard.com wrote:
 Does anyone know of any forums, docs etc on testing Apples web objects
 in a browser using ruby and WATIR? (http://www.apple.com/ca/
 webobjects/)

-- 
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: Another possible solution for popup window handling

2010-03-23 Thread George
Hi, sorry for the late response. I'm not sure why it's doing that. The
process should end at the end of your script. If the script crashes
while you're running it, there may have been a process still running
in the background. Sorry I can't be of better assistance.

-George



On Mar 16, 5:27 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 George,
 Your solution is the only one that is working for me for handling
 popups. Thank you!
 Minor thing  I couldnt figure out:
 Each time that there is a popup, ruby.exe process is being created. At
 the end of the test, I have lots of ruby.exe processes running, and if
 I have multiple testes running one after another, I have even more
 ruby.exe processes alive.

 at_exit is not killing them, and if I do only: Process.kill(9,@pid),
 then the popup is not closing, maybe because the process is being
 killed before the click.

 Any idea?

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



  On Thu, Mar 4, 2010 at 6:04 PM, George george.sand...@gmail.com wrote:
   I added this solution to the wiki.

  Thanks!

   It would be nice
   to know if it works well for others. I couldn't seem to get any of the
   other suggestions to work for me.

  If it works for you, it could help somebody else. Personally, I always
  insist that the application does not havepop-ups. I just refuse to automate
  tests that have to deal with popups (exceptions are file uploads and div
  popups.). It has worked for me for the past five years.

  Ž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: Dealing with the  character

2010-03-10 Thread George
I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
remaining spaces. It took a long time, but I think I figured it out
using this:

x = 3       Jubitz Travel Center              Â
Portland,OR
b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
beginning number/funky chars
puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
the second set of funky chars and city/state



On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:
 Is this in IE or firefox?

-- 
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: Dealing with the  character

2010-03-10 Thread George
It appears that Western European (ISO) is selected by default. Is
there something I can do in the code to convert it to UTF-8?

On Mar 10, 9:44 am, orde ohil...@gmail.com wrote:
 Nice that you got it worked out.

 One question, though.

 Open IE, go to the website you're testing, right click, and select
 Encoding.  Is Unicode (UTF-8) selected?

 On Mar 10, 8:26 am, George george.sand...@gmail.com wrote:



  I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
  remaining spaces. It took a long time, but I think I figured it out
  using this:

  x = 3       Jubitz Travel Center              Â
  Portland,OR
  b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
  beginning number/funky chars
  puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
  the second set of funky chars and city/state

  On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:

   Is this in IE or firefox?

-- 
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] Dealing with the  character

2010-03-09 Thread George
I'm not sure if this is a Watir or a Ruby question. I'm pulling all
the contents from a select list, and when I display each option, I get
something similar to the following (without the quotes):

3       Jubitz Travel
Center               Portland,OR

Is there something in Watir that will get rid of the  character? Is
this related to UTF-8? Ultimately, I'm trying to isolate Jubitz
Travel Center from the text string. If someone can help, I would be
most grateful!

Thanks,

George

-- 
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: Another possible solution for popup window handling

2010-03-04 Thread George
Hi Željko,

Sorry about that! I added this solution to the wiki. It would be nice
to know if it works well for others. I couldn't seem to get any of the
other suggestions to work for me.

-George


On Mar 4, 1:14 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Thu, Mar 4, 2010 at 1:16 AM, George george.sand...@gmail.com wrote:
  I was checking out the various solutions presented at
 http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups. I found another
  solution some time ago that isn't listed there. You'll need AutoIt
  installed. I'll present it here, and if you think it might help,
  please feel free to add it to the list:

 George,

 Please add the code to the page yourself. It is a wiki page. Please let me
 know if you need help with that. It should not take more than a few minutes,
 even if you have to create an account.

 Ž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

-- 
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] Another possible solution for popup window handling

2010-03-03 Thread George
Hello all,

I was checking out the various solutions presented at
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups. I found another
solution some time ago that isn't listed there. You'll need AutoIt
installed. I'll present it here, and if you think it might help,
please feel free to add it to the list:

First, create a file called 'popup_closer.rb' and add the following
code:



require 'win32ole'

begin
  autoit = WIN32OLE.new('AutoItX3.Control')

  loop do
   autoit.ControlClick(Windows Internet Explorer,'', 'OK')
   autoit.ControlClick(Security Information,'', 'Yes')
   autoit.ControlClick(Security Alert,'', 'Yes')
   autoit.ControlClick(Security Warning,'', 'Yes')
   autoit.ControlClick(Message from webpage,'', 'OK')
   sleep 3
  end

rescue Exception = e
  puts e
end



Next, add the following to your working script:



@pid = Process.create(
:app_name   = 'ruby popup_closer_cancel.rb',
:creation_flags  = Process::DETACHED_PROCESS
).process_id

#~ at_exit{ Process.kill(9,@pid) }



While the script is running, this will continue to check for any
popups and click OK. You can always change the options to No,
Cancel, etc.

If you want to kill the process earlier, remove the last line and just
type: Process.kill(9,@pid).

HTH,

George

-- 
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] Another possible solution for popup window handling

2010-03-03 Thread George
Hello all,
I was checking out the various solutions presented at
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups. I found
another
solution some time ago that isn't listed there. You'll need AutoIt
installed. I'll present it here, and if you think it might help,
please feel free to add it to the list:
First, create a file called 'popup_closer.rb' and add the following
code:

require 'win32ole'
begin
  autoit = WIN32OLE.new('AutoItX3.Control')
  loop do
   autoit.ControlClick(Windows Internet Explorer,'', 'OK')
   autoit.ControlClick(Security Information,'', 'Yes')
   autoit.ControlClick(Security Alert,'', 'Yes')
   autoit.ControlClick(Security Warning,'', 'Yes')
   autoit.ControlClick(Message from webpage,'', 'OK')
   sleep 3
  end
rescue Exception = e
  puts e
end

Next, add the following to your working script:

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

While the script is running, this will continue to check for any
popups and click OK. You can always change the options to No,
Cancel, etc.
If you want to kill the process earlier, remove the last line and
just
type: Process.kill(9,@pid).
HTH,
George

-- 
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] Another possible solution for popup window handling

2010-03-03 Thread George
Hello all,

I was checking out the various solutions presented at
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups. I found
another
solution some time ago that isn't listed there. You'll need AutoIt
installed. I'll present it here, and if you think it might help,
please feel free to add it to the list:

First, create a file called 'popup_closer.rb' and add the following
code:



require 'win32ole'
begin
  autoit = WIN32OLE.new('AutoItX3.Control')
  loop do
   autoit.ControlClick(Windows Internet Explorer,'', 'OK')
   autoit.ControlClick(Security Information,'', 'Yes')
   autoit.ControlClick(Security Alert,'', 'Yes')
   autoit.ControlClick(Security Warning,'', 'Yes')
   autoit.ControlClick(Message from webpage,'', 'OK')
   sleep 3
  end
rescue Exception = e
  puts e
end



Next, add the following to your working script:



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



While the script is running, this will continue to check for any
popups and click OK. You can always change the options to No,
Cancel, etc.

If you want to kill the process earlier, remove the last line and
just
type: Process.kill(9,@pid).

HTH,

George

-- 
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: Fwd: Regarding Getting Page Text in Watir and FireWatir

2009-12-29 Thread George
Hello,

What does your code look like?



On Dec 27, 8:15 pm, Pallavi Sharma write2pall...@gmail.com wrote:
 Hi

 Has anyone here answer for this please.

 Regards
 Pallavi.



 -- Forwarded message --
 From: Pallavi Sharma write2pall...@gmail.com
 Date: Tue, Dec 22, 2009 at 10:23 AM
 Subject: Regarding Getting Page Text in Watir and FireWatir
 To: watir-general@googlegroups.com

 Hello

 If i try to get the page text for watir and firewatir a peculiar problem
 arises;

 for watir if there is br tag then with the test a new line appers

 but for Firewatir this doesn't happen.

 I am not able to run directly my test cases made in watir into firewatir due
 to this behaviour as the split fails on the output of this method .

 Is there is something we could do about it/ or any other way??

 Regards
 Pallavi.

-- 
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: Firefox JJSH for 64-bit Windows 7?

2009-12-22 Thread George
Hi Angrez,

It looks like I need Visual Studio to make the build. Can I use Visual
Studio Express?

-George


On Dec 21, 12:03 am, Angrez Singh ang...@gmail.com wrote:
 You can also see this 
 link:http://wiki.openqa.org/display/WTR/FireWatir+Installation

 there is a section for compiling JSSh along with the help links.

 - Angrez



 On Mon, Dec 21, 2009 at 1:31 PM, Angrez Singh ang...@gmail.com wrote:
  Use instructions provided here for setting up the pre requisites:
 https://developer.mozilla.org/En/Simple_Firefox_build

  use the following build options in your .mozconfig file:

  mk_add_options MOZ_CO_PROJECT=browser
  mk_add_options moz_objd...@topsrcdir@/firefox-jssh
  ac_add_options --enable-extensions=default,jssh,webservices
  ac_add_options --enable-application=browser

  - Angrez

  On Mon, Dec 21, 2009 at 1:14 PM, Yuping Zhong 
  littlezhong...@gmail.comwrote:

  I want to compile Firefox in my Mac. Can you provide more info about that?

  Thanks.

  On Mon, Dec 21, 2009 at 3:38 PM, Angrez Singh ang...@gmail.com wrote:

  You need to compile Firefox with JSSh on 64 bit machine and then need to
  generate the XPI. If anyone is willing to compile Firefox on his/her 
  machine
  let me know I can provide the links for the same.

  - Angrez

  On Sun, Dec 20, 2009 at 7:56 AM, Yuping Zhong 
  littlezhong...@gmail.comwrote:

  Hi,

  Looks like Mac OS X 10.6.1 is  also 64-bits, is JSSH missed for Snow
  Leopard???

  Anyone can run the FireWatir in Snow Leopard? If so,how to do that?

  Many Thanks.

  -Zhong

  On Sun, Dec 20, 2009 at 8:47 AM, George george.sand...@gmail.comwrote:

  Hello there,

  I noticed that a JIRA ticket was opened for Linux missing a 64-bit
  JSSH extension (http://jira.openqa.org/browse/WTR-383), but will there
  also be one available for Windows?

  Thanks,

  George

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

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

-- 
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] Firefox JJSH for 64-bit Windows 7?

2009-12-19 Thread George
Hello there,

I noticed that a JIRA ticket was opened for Linux missing a 64-bit
JSSH extension (http://jira.openqa.org/browse/WTR-383), but will there
also be one available for Windows?

Thanks,

George

-- 
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: Accessing a overlay popup

2009-11-23 Thread George

Have you tried to use the IE Developer Toolbar to figure out what the
element IDs are?  Keep the overlay window open and click around to
determine how to access what you need.

On Nov 23, 9:00 am, Ethan notet...@gmail.com wrote:
 It would appear that watir can't find a window with a title that matches
 /Select Products/. your html snippet has no mention of any title, so I don't
 know if such a window exists. If that is the title of an html overlay popup,
 it is not a real IE window and watir won't be able to find a real IE window
 with that title.



 On Mon, Nov 23, 2009 at 11:37, Soori sure...@gmail.com wrote:

  Hi Ethan,

  This is the simple ruby script which am trying,

    $ie=Watir::IE.new
    $ie.goto(http://localhost/myurl;)
     i=1
     $ie.select_list(:name,
  tx#local#Xssproduct#Source#category).select(HA)
     $ie.text_field(:name, addNewProductInput).set(product+i.to_s)
     $ie.image(:src, /add.gif/).click
     $ie.text_field(:name, tx#local#Xssproduct#Source#productId).set
  (PI+ts.to_s)
     $ie.text_field(:name,
  tx#local#Xssproduct#Source#productTitle).set(PT+ts.to_s)
     $ie.link(:text, Add).click #Opens a pop up to search the product

  #-Start of Overlay Po pup---#
     $ie2 = Watir::IE.attach(:title, /Select Products/)
     $ie2.button(:name, Button).click
     $ie2.link(:text=Select,:value=Test prd 1).click
  #-End of Overlay Po pup---#

  Error received:
  ---
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
  300:in `attach_browser_window': Unable to locate a window with title
  of (?-mix:Select Products)
  (Watir::Exception::NoMatchingWindowFoundException)

  Hope this will help.

  /Soori

  On Nov 23, 8:36 pm, Ethan notet...@gmail.com wrote:
   Please include the ruby code that you are trying to use, the error that
  you
   are getting, what version of watir you are using.
   Before posting, please readhttp://
  wiki.openqa.org/display/WTR/SupportparticularlyGeneral
   Posting Guidelines.

   -Ethan

   On Mon, Nov 23, 2009 at 06:43, Soori sure...@gmail.com wrote:

Hi Angrez,

We are using the  DHTML Window Widget- By Dynamic Drive, available
at:http://www.dynamicdrive.com; for overlay popup.

Please find below the htm of the popup and let me know if you need
more info,


tbodytr
td style=padding: 0px;
div class=heading
table style= border=0 cellpadding=0 cellspacing=0
tbodytr
td nowrap=true
h1Xss Product Search/h1
/tdtd nowrap=true
div style= class=heading-right/div
/td
/tr
/tbody/table
/div
/td
/tr

tr
td align=center valign=top
form action=search.do method=POST onsubmit=clickSubmitOnSubmit
(this);
input name=zTaskId value=p1 type=hiddeninput
name=zComponentId value=105 type=hiddeninput
name=zComponentName value=Coach

type=hiddeninput name=zWorkflowState value=3
type=hiddeninput name=zDbg value=0 type=hiddeninput
name=zButtonName value=Button0

type=hiddeninput name=zActType value=CoachDesigner
type=hiddeninput name=applicationInstanceId value=undefined
type=hiddeninput

name=applicationId value=1 type=hidden
table class=layout  twLayout  id=section cellpadding=0
cellspacing=0
tbodytr class=layoutBody twLayoutBody
td class=layoutBodyLeftnbsp;/tdtd class=layoutBodyCenter
div class=sectionBody twSectionBody id=section_controls
table class=controlLayout
tbodytr class=twControlTR id=section_Row0
td class=sectionBodyCenterControl twControlTD  rowspan=1
colspan=2 valign=top
div class=customHTML id=CustomHTML1script type=text/
javascript src=/Xss-util/filter/js/external/mootools.js/script
script type=text/javascript src=/Xss-util/filter/js/demo-js/
table.js/script
script type=text/javascript src=/Xss-util/filter/js/dg-
filter.js/script/div

/td
/tr
tr class=twControlTR id=section_Row0
td class=sectionBodyCenterControl twControlTD  rowspan=1
colspan=2 valign=top
div class=customHTML id=CustomHTML0script
function setValue(key)
{
document.getElementById(selectedKey1).value = key;
parent.emailwindow.hide();
}
/script
input name=selectedKey1 id=selectedKey1 value= type=hidden
table cellpadding=0
       tbodytr
               tdSearch: input id=tw#local#searchKey
name=tw#local#searchKey
type=textinput name=Button value=Find

onclick=document.getElementById('ButtonGroup0_Button0').click();
return false; type=button/td
               td align=left/td
       /tr

/tbody/table
/div
/td
/tr
tr class=twControlTR id=section_Row0
td class=sectionBodyCenterControl twControlTD  rowspan=1
colspan=2 valign=top
div style=display: none; class=buttonGroup twControl
twButtonGroup id=ButtonGroup0 align=right
button class=layoutButton twButton type=submit

[wtr-general] Re: Help with tables

2009-11-23 Thread George

I'm assuming that the text 'Something' is actually in a row's cell,
and you're looking for the following cell text, correct?

If 'Something' is only going to be listed once in the entire table,
then this should work for you:

puts @browser.table(:id, 'tableID').cell(:after?, @browser.cell(:text,
'Las Vegas, NV')).text

On Nov 23, 10:00 am, xguarder shams...@gmail.com wrote:
 Hello, can anyone give me some quick tips on how to do the following:

 Say I am searching for the text Something, which is in the first
 column of the table. Exact row and table index won't be known up
 front.

 So I have table.row(:text, Something) thus far

 What method can I use to retrieve the text displayed that I know is in
 the column next to Something?

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



[wtr-general] Re: Help with tables

2009-11-23 Thread George

I'm assuming that the text 'Something' is actually in a row's cell,
and you're looking for the following cell text, correct?

If 'Something' is only going to be listed once in the entire table,
then this should work for you:

puts @browser.table(:id, 'tableID').cell(:after?, @browser.cell(:text,
'Something')).text





On Nov 23, 10:00 am, xguarder shams...@gmail.com wrote:
 Hello, can anyone give me some quick tips on how to do the following:

 Say I am searching for the text Something, which is in the first
 column of the table. Exact row and table index won't be known up
 front.

 So I have table.row(:text, Something) thus far

 What method can I use to retrieve the text displayed that I know is in
 the column next to Something?

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



[wtr-general] Re: WatirRecorder

2009-11-19 Thread George

Not to hijack the thread, but why use WatirRecorder?  Isn't it just as
easy to write the code?

On Nov 19, 3:05 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Haven't you asked about this before?

 This group doesn't support WatirRecorder.  I'm not sure why it's not
 available to download on OpenQA, but if you really need it, I'd
 suggest asking the folks on the Watir Recorder community board:

 http://clearspace.openqa.org/community/watir_recorder

 -Tiffany

 On Nov 19, 3:27 pm, tester86 sagar.am...@gmail.com wrote:



  Can someone give me the link to where I can download the watirRecorder+
  +...as on the homepage it is not there.
--~--~-~--~~~---~--~~
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] Revised HTML report class added to Wiki

2009-11-03 Thread George

Well, this is my first attempt at trying to contribute to the Watir
community. I took the original HTML class listed in the examples
section and snazzed it up a bit:

http://wiki.openqa.org/display/WTR/HTML+report+class+%28version+2%29

Updates include:
- Reformatted the time methods
- Changes to the overall look and format from the original report
- Added a css folder to easily change the color scheme of the report
- Added an images folder to include browser type icons
- Included a test time duration in the report (minutes, seconds)
- Included a field to indicate the environment being tested

Any input (good or bad) is more than welcome, especially any advice to
improve it!

Thanks,

George

--~--~-~--~~~---~--~~
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: Table row

2009-11-03 Thread George

If you wanted to fill out all the text fields in the 3rd table listed,
you would do something like this:

@browser.table(:index, 3).rows.each |row|
  row.text_field(:index, 1).set 'whatever'
end

Otherwise, more information will be helpful.

On Nov 3, 8:40 am, Abhay abhaybas...@gmail.com wrote:
 Hi All,

          I have a web page which contains many tables, none of the
 table has any distinguishing properties, No name, No id etc. In one of
 the table there are 5 text boxes each on differant row of the table
 but same column number. In all these text boxes i want to enter some
 text value. How do i do this? I tried to do lot many things but ended
 up adding one value in the first text box and rest overriding it. I
 would really appreciate if some one could throw some light on this.

 Thanks in advance

 Abhay
--~--~-~--~~~---~--~~
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: Revised HTML report class added to Wiki

2009-11-03 Thread George

I forgot...I also included an attachment in the Wiki that has
everything you need to test it out.

On Nov 3, 3:13 pm, George george.sand...@gmail.com wrote:
 Well, this is my first attempt at trying to contribute to the Watir
 community. I took the original HTML class listed in the examples
 section and snazzed it up a bit:

 http://wiki.openqa.org/display/WTR/HTML+report+class+%28version+2%29

 Updates include:
 - Reformatted the time methods
 - Changes to the overall look and format from the original report
 - Added a css folder to easily change the color scheme of the report
 - Added an images folder to include browser type icons
 - Included a test time duration in the report (minutes, seconds)
 - Included a field to indicate the environment being tested

 Any input (good or bad) is more than welcome, especially any advice to
 improve it!

 Thanks,

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



[wtr-general] Re: how to recognized DIV object

2009-10-27 Thread George

If it's the text field within the div, I believe you can also use the
after? method:

$ie.text_field(:after? $ie.div(:text, 'name1')).set('abc')


On Oct 27, 3:44 am, Pallavi Sharma write2pall...@gmail.com wrote:
 Div doesn't have set function

 What i was saying that the Div contains maybe a text box on which you are
 trying to set the text.

 so directly give the textbox identification

 ie.text_field(:prop,value).set

 this should work..

 Let me know.



 On Tue, Oct 27, 2009 at 4:08 PM, rrash586 rrash...@gmail.com wrote:

  Thanks for input ,
  i tried it as
  $ie.div(:text,'name1').set(abc')
  whether i am doing something wrong ..
  i am not getting it
  for the above i.e $ie.div(:text,'name1').set(abc') for this
  i am getting following error
  undefined method `set' for #Watir::Div:0x8cbe53c (NoMethodError)

  Please let me know if i am missing something.

  On Oct 27, 10:13 am, Pallavi Sharma write2pall...@gmail.com wrote:
   You can try with index property, if any two objects have the same
  property,
   use a third one called index. Watir supports multiple attributes to
   recognize an object.

   You can directly give the object properties, doesn't matter whether it is
  in
   a div or not with watir.

   Hope this helps.

   --
   Pallavi

   On Mon, Oct 26, 2009 at 5:51 PM, rrash586 rrash...@gmail.com wrote:

Hi All,

I am testing the GWT based application on IE7. In my application when
i click on the add button a new row (run time generation) is
generated .I am facing the problem while locating the object as it is
in DIV.

can anyone let me know how to click on the object in DIV
i am having only the text property set for the Div object.

Also one more question is there is that how watir separate out the two
object having the same property name and value.

thanks in Advance- Hide quoted text -

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



[wtr-general] Testing with Windows 7

2009-10-22 Thread George

Hello,

I'm not sure if this has been posted before...with the advent of
Windows 7, has anyone tried using their Watir scripts against this
OS?  Our company is gearing up to do this and just wanted to be ready
for whatever comes up.

Thanks,

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

Hi there,

I think this might work for you:

puts @@leftNav.rstrip!

This should remove the \r\n tags.

-George



On Oct 20, 9:18 am, Shlomit Gazit shlomitpatr...@gmail.com wrote:
 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] Iterating through an unordered list

2009-10-08 Thread George

Hello everyone,

Is it possible to iterate each line item (li) text in an unordered
list (ul)?

Thanks,

George

--~--~-~--~~~---~--~~
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: Iterating through an unordered list

2009-10-08 Thread George

Hey there,

Yep, that did it!  I didn't see the method 'lis' listed when I did
this:

@browser.div(:id, ctl00_cphMain_validationSummary).ul(:class,
VAMValSummaryErrors).methods.sort

Oh well, glad it was available for me to use.  Thanks a lot!





On Oct 8, 2:59 pm, orde ohil...@gmail.com wrote:
 something like this(?):

  browser.lis.each do |x|
    puts x.text
 end

 Hope that helps.

 On Oct 8, 2:09 pm, George george.sand...@gmail.com wrote:



  Hello everyone,

  Is it possible to iterate each line item (li) text in an unordered
  list (ul)?

  Thanks,

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



[wtr-general] Re: How can I get the attribute in the attached?

2009-08-28 Thread George

As far as right-clicking an element, this is all I have as a
reference:

http://wiki.openqa.org/display/WTR/Right+Click+an+Element

It would still be nice to see the HTML of what you're working with.
Are you at least able to click the 'Application List' link?



On Aug 27, 6:03 pm, Eason nbkhic...@gmail.com wrote:
 Dear George,
 The privious trouble has alreadly been clear, I use the Select Element 
 by Click functon to get the attribute.
 But then a follow problem come in...
 In my test page, the drop down list are all div which were created by JS. I 
 used click() method to click the item, but nothing happened, then I use 
 click_no_wait() method, but it did not work yet.
 At last, I use fire_event() method just as following, but it also did not 
 work!
 menu.div(:text, 'Internal Control System').fire_event(onMouseOver)
 menu.div(:text, 'Internal Control System').fire_event(onMouseDown)
 menu.div(:text, 'Internal Control System').fire_event(onClick)
 menu.div(:text, 'Internal Control System').fire_event(ondblclick)
 menu.div(:text, 'Internal Control System').click_no_wait
 Attached is the drop down list.

 PS: Is there a method can operate a right click?

 Eason
 2009-08-28

 发件人: George
 发送时间: 2009-08-28 04:20:26
 收件人: Watir General
 抄送:
 主题: [wtr-general] Re: How can I get the attribute in the attached?

 What sort of information is the developer toolbar giving you?  Have
 you tried using the :index attribute?

 On Aug 26, 8:38 pm, Eason  nbkhic...@gmail.com  wrote:



  Dear All,
  Please view the image in the attached.
  I want to get the arrtibute of the item Quality Management.
  The drop-down list is a div which is created by javascript, I try to use IE 
  devolep tool to get the attribute of the item, but I find that it is 
  impossible, when I use the tool onfocus  to the item, the item will 
  disappear, so I can not fetch the details of this item.
  Can anyone tell me how to get the attribute?

  Eason
  2009-08-27

   截图00.bmp
  516KViewDownload



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



[wtr-general] Re: How can I get the attribute in the attached?

2009-08-28 Thread George

Sorry, I meant the 'Application Set' link...

On Aug 28, 2:15 pm, George george.sand...@gmail.com wrote:
 As far as right-clicking an element, this is all I have as a
 reference:

 http://wiki.openqa.org/display/WTR/Right+Click+an+Element

 It would still be nice to see the HTML of what you're working with.
 Are you at least able to click the 'Application List' link?

 On Aug 27, 6:03 pm, Eason nbkhic...@gmail.com wrote:



  Dear George,
  The privious trouble has alreadly been clear, I use the Select Element 
  by Click functon to get the attribute.
  But then a follow problem come in...
  In my test page, the drop down list are all div which were created by JS. 
  I used click() method to click the item, but nothing happened, then I use 
  click_no_wait() method, but it did not work yet.
  At last, I use fire_event() method just as following, but it also did not 
  work!
  menu.div(:text, 'Internal Control System').fire_event(onMouseOver)
  menu.div(:text, 'Internal Control System').fire_event(onMouseDown)
  menu.div(:text, 'Internal Control System').fire_event(onClick)
  menu.div(:text, 'Internal Control System').fire_event(ondblclick)
  menu.div(:text, 'Internal Control System').click_no_wait
  Attached is the drop down list.

  PS: Is there a method can operate a right click?

  Eason
  2009-08-28

  发件人: George
  发送时间: 2009-08-28 04:20:26
  收件人: Watir General
  抄送:
  主题: [wtr-general] Re: How can I get the attribute in the attached?

  What sort of information is the developer toolbar giving you?  Have
  you tried using the :index attribute?

  On Aug 26, 8:38 pm, Eason  nbkhic...@gmail.com  wrote:

   Dear All,
   Please view the image in the attached.
   I want to get the arrtibute of the item Quality Management.
   The drop-down list is a div which is created by javascript, I try to use 
   IE devolep tool to get the attribute of the item, but I find that it is 
   impossible, when I use the tool onfocus  to the item, the item will 
   disappear, so I can not fetch the details of this item.
   Can anyone tell me how to get the attribute?

   Eason
   2009-08-27

截图00.bmp
   516KViewDownload

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



[wtr-general] Re: How can I get the attribute in the attached?

2009-08-27 Thread George

What sort of information is the developer toolbar giving you?  Have
you tried using the :index attribute?



On Aug 26, 8:38 pm, Eason nbkhic...@gmail.com wrote:
 Dear All,
 Please view the image in the attached.
 I want to get the arrtibute of the item Quality Management.
 The drop-down list is a div which is created by javascript, I try to use IE 
 devolep tool to get the attribute of the item, but I find that it is 
 impossible, when I use the tool onfocus  to the item, the item will 
 disappear, so I can not fetch the details of this item.
 Can anyone tell me how to get the attribute?

 Eason
 2009-08-27

  截图00.bmp
 516KViewDownload
--~--~-~--~~~---~--~~
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: execute_script in 1.6.2 ?

2009-08-21 Thread George

Here Robert, try this:

require 'watir'
b = Watir::IE.new
execute_script(b.document.parentWindow.execScript(alert('hello');))



On Aug 20, 11:29 pm, robert rob99br...@gmail.com wrote:
 Thanks George,

 Yes that works but I'm puzzled by the difference between the code and
 the generated documentation 
 athttp://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000248

 On Aug 21, 4:57 am, George george.sand...@gmail.com wrote:



  Hi Robert,

  I couldn't get that to work either, but this worked for me:

  require 'watir'
  b = Watir::IE.new
  b.document.parentWindow.execScript(alert('hello');)

  I'm not sure if that's an acceptable approach to your problem, but it
  is one solution.

  -George

  On Aug 19, 8:40 pm, robert rob99br...@gmail.com wrote:

   Hi all,

   Having a problem calling this method on IE.  What am I missing?

   # Win Xp, IE7irb

   irb(main):001:0 require 'watir'
   = true
   irb(main):005:0 b = Watir::IE.new
   [snip]
   irb(main):006:0 b.execute_script alert('hello');
   NoMethodError: undefined method `execute_script' for #Watir::IE:
   0x2bca76c
           from (irb):6
   irb(main):007:0
--~--~-~--~~~---~--~~
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: while ie.contains_text(Next) loop problem

2009-08-21 Thread George

Another thought is that the word 'next' could be hidden in the html,
although I'm not sure if Watir searches for hidden text.

On Aug 21, 10:12 am, Chuck van der Linden sqa...@gmail.com wrote:
 Seems to me that the letters 'next'  might be rather common to find on
 a lot of pages, and are you SURE it's not there even if perhaps part
 of another word?

 If the 'next' is a clickable link or button , then perhaps you'd be
 better off to look to see if the link exists?

 while browser.link(:text, 'Next').exists?
   or
 while browser.button(:text, 'Next').exists?

 That's a lot less likely to give you a false hit on some other aspect
 of the page contents

 On Aug 20, 1:38 pm, curious csamigr...@gmail.com wrote:



  I have below WATIR code, which will download series of web pages by
  navigating thru page number.  Each search will present series of
  pages, and the last page in the series does not contain the text
  'Next'.

  However, below code keeps running and goes on presenting the last page
  that does not contain the text Next.  It seems to me that the while
  condition is true to the page right before the last page, and this
  page right before the last page contains the text, Next, and it
  never goes out of the loop, [ ... while ie.contains_text
  (Next)..].

  Is there anyway to make it get out of the loop?  The last page surely
  does not contain the text, Next, but it seems to me that below code
  does not detect it.

  Any help / suggestion will be deeply appreciated.

  Thank you.

  --- 
  ­-

  while ie.contains_text(Next)

    File.open(#{PageNo}.html, wb) { |f|

    f  'html'
    f  ie.html
    f  '/html'

    PageNo = PageNo + 1

    ie.goto(http://www.test.com/#{PageNo};

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



[wtr-general] Re: execute_script in 1.6.2 ?

2009-08-20 Thread George

Hi Robert,

I couldn't get that to work either, but this worked for me:

require 'watir'
b = Watir::IE.new
b.document.parentWindow.execScript(alert('hello');)

I'm not sure if that's an acceptable approach to your problem, but it
is one solution.

-George


On Aug 19, 8:40 pm, robert rob99br...@gmail.com wrote:
 Hi all,

 Having a problem calling this method on IE.  What am I missing?

 # Win Xp, IE7irb

 irb(main):001:0 require 'watir'
 = true
 irb(main):005:0 b = Watir::IE.new
 [snip]
 irb(main):006:0 b.execute_script alert('hello');
 NoMethodError: undefined method `execute_script' for #Watir::IE:
 0x2bca76c
         from (irb):6
 irb(main):007:0
--~--~-~--~~~---~--~~
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: Testing Email

2009-08-07 Thread George

Hey Bret, it's been a long time!

I found a couple of different approaches to this.  I'm leaning towards
Tmail (http://tmail.rubyforge.org/), but I haven't spent too much time
on this. It appears that you can send and read emails.

I also noticed that I can also use 'net/smtp' to send emails.  I'm not
sure how to read them, though.  Here's an example:


require 'watir'
require 'net/smtp'

# Net::SMTP.start('BVTEXS01').send_message(mail.to_s, frommail,
tomail, ccmail)

Net::SMTP.start('email server name') do |smtp|
smtp.send_message message, 'sen...@sender.com',
'recipi...@recipient.com'
 end





On Aug 7, 2:37 pm, b...@pettichord.com bpettich...@gmail.com
wrote:
 Hi there. I've been away for a while, but am now back.

 I would like to automate email testing. Mainly make sure the right
 emails were sent.

 I guess what I want is to set up an email server in our lab, configure
 our app to send emails to it, and then my scripts can access it to
 make sure that the right email was delivered.

 I've done this before with Rails, and with that you can just put the
 email sender in test mode and validate it against directly. It works
 great, but is not an option for me right now.

 Is any one else doing something like this? What are you using? Is
 there an open-source testing-email-server I could use? Obviously, I
 want to be able to access it from Ruby.

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



[wtr-general] Re: Verify does not work while checking the links.

2009-08-06 Thread George

This sounds like more a fundamental Ruby issue than anything.  I'm not
sure how your first assert statement would work since you're calling a
local 'browser' variable within your method.

Try this out:

##
require 'watir'
require 'watir/testcase'

class VerifyTest  Watir::TestCase

  def url()
@browser = Watir::Browser.new
@browser.goto http://www.google.com;
  end

  def test01
# start the method
url()

# verify the element
verify(@browser.text_field(:name, q).exists?, message=Field not
active.)
  end
end

##

This should pass just fine.  If you're interested in a cool free
online Ruby course, I would suggest:

http://rubylearning.org/

I'm currently taking this course, and it has helped me tremendously!
Hope this helps...

-George



On Aug 5, 2:51 am, Yuvraj yuvrajjagad...@gmail.com wrote:
 Hi,

 I have installed the ruby 1.8.6 and WATIR 1.6.2.

 I am checking whether a link is active or not with the following
 verify statement.

 verify((browser.link(:text, 1).exists?), message=Link not active.)

 The above statement works fine.

 But when I use the above statement with global variable as shown below
 it does not work and  pass everytime whether the link is active or
 not.

 verify((@browser.link(:text, 1).exists?), message=Link not
 active.)

 In the above case I am getting the @browser from common file as shown
 below.

 # Calling function url to open specific site browser
   @browser = url()

 And common file has following code.
 # This function open the browser and navigate to site
 def url()
   browser = Watir::Browser.new
   browser.goto http://www.acs.org;
   return browser
 end

 Is there any other way through which I can check the same thing?

 Thanks  Regards
 Yuvraj
--~--~-~--~~~---~--~~
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: handling popups

2009-08-06 Thread George

This is a good one too!

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


On Aug 5, 11:49 pm, Angrez Singh ang...@gmail.com wrote:
 one more thing:

  $ie.text_field(:name,text1).set(This is the text in the popup)
  $ie.button(:name,submit).click
  check_for_popups(Microsoft Internet Explorer, OK)

 You should be using click_no_wait() for handling the pop ups. Else your
 script will get block. Basic idea is to use click_no_wait in the statement
 after which you are clicking the pop up.

 So it should be:
 $ie.text_field(:name,text1).set(This is the text in the popup)
 $ie.button(:name,submit).click_no_wait
 check_for_popups(Microsoft Internet Explorer, OK)

 Also, go through the examples 
 here:http://wiki.openqa.org/display/WTR/Tutorialhttp://wiki.openqa.org/display/WTR/Pop+Ups

 Thanks,
 Angrez



 On Wed, Aug 5, 2009 at 6:09 PM, Angrez Singh ang...@gmail.com wrote:
  I think the error is self explanatory:

  $ie=WATIR::IE.new

  the errors:
  ruby testingpopup2.rb
  C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/
  dependencies.rb:443:in `load_missing_constant': uninitialized constant
  WATIR (NameError)
         from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
  active_support/dependencies.rb:80:in `const_missing'
         from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
  active_support/dependencies.rb:92:in `const_missing'
         from testingpopup2.rb:7
  Exit code: 1

  WATIR should be Watir I think.

  Thanks
  Angrez
--~--~-~--~~~---~--~~
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] Detecting whether or not text in a text field is highlighted

2009-08-03 Thread George

Hello all,

On a web app I'm testing, I'm supposed to check that text in a
particular text field is highlighted.  Is there an attribute that can
help me with this?

Thanks,

George


--~--~-~--~~~---~--~~
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 XPIs for Firefox 3.5.x

2009-07-31 Thread George

Thanks, Angrez...this really helped! :)

On Jul 31, 12:47 am, Angrez Singh ang...@gmail.com wrote:
 Hi,

 The XPIs for Firefox 3.5.x versions are there on WIKI. You can download them
 from:

 http://wiki.openqa.org/display/WTR/FireWatir+Installation

 Let us know if you face any problems while installing/using the XPIs for
 Firefox 3.5

 Thanks,
 Angrez
--~--~-~--~~~---~--~~
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: Help with class,method,objects

2009-07-30 Thread George

Are you using the Excel interface class from Watir's site?

http://wiki.openqa.org/display/WTR/Excel+interface+class


On Jul 29, 9:57 pm, Rohan Ojha rohan.o...@bsil.com wrote:
 Hi All,

 I am not too sure whether I should post it here or in a Ruby forum.

 But there is a problem that I am facing while scripting a data driven Watir
 suite.

 1)       I have a class (say the base class) wherein I am fetching data from
 excel and storing them in a variable.

 2)       Now there's a generic method in the application which is stored in
 another Ruby file (not in a  class, not in a module)

 3)       I need to call this generic method with the object of the base
 class (since the object has the data allotted to the variables)

 4)       But when I do this it says   undefined method `methodName' for
 main:Object.

 So can somebody help me with this? What can I do so that I can access the
 methods and at the same time the data is set to variables for every row of
 excel sheet.

 Thanks in advance.

 Thanks,
 Rohan Ojha
  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
 6999 l *  mailto:rohan.o...@bsil.com rohan.o...@bsil.com
    http://www.bsil.com/www.bsil.com- Where Partnerships Are Built on
 Trust
--~--~-~--~~~---~--~~
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] Differences in behavior between IE and FF3/3.5

2009-07-24 Thread George

Help!

I have a real-life example of some very strange behavior.  This works
just fine in IE but it is NOT working with FF for some reason:

require 'watir'
Watir::Browser.default = 'ie'
browser = Watir::Browser.new
browser.goto http://www.truckersedge.net;
browser.image(:alt, Members Login Here).click
browser.text_field(:id, ctl00_cphMain_txtUserName).set blahblah
browser.text_field(:id, ctl00_cphMain_txtPassword).set blahblah
browser.button(:id, ctl00_cphMain_btnSubmit).click
browser.link(:text, Cancel).click
browser.image(:alt, Members Login Here).click

I got the following error...any ideas why this is happening?

C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :alt, Members Login
Here (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from test.rb:13


--~--~-~--~~~---~--~~
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: Differences in behavior between IE and FF3/3.5

2009-07-24 Thread George

Sorry, please update the script to:

Watir::Browser.default = 'firefox'


On Jul 24, 4:13 pm, George george.sand...@gmail.com wrote:
 Help!

 I have a real-life example of some very strange behavior.  This works
 just fine in IE but it is NOT working with FF for some reason:

 require 'watir'
 Watir::Browser.default = 'ie'
 browser = Watir::Browser.new
 browser.goto http://www.truckersedge.net;
 browser.image(:alt, Members Login Here).click
 browser.text_field(:id, ctl00_cphMain_txtUserName).set blahblah
 browser.text_field(:id, ctl00_cphMain_txtPassword).set blahblah
 browser.button(:id, ctl00_cphMain_btnSubmit).click
 browser.link(:text, Cancel).click
 browser.image(:alt, Members Login Here).click

 I got the following error...any ideas why this is happening?

 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
 element, using :alt, Members Login
 Here (Watir::Exception::UnknownObjectException)
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1112:in `click'
         from test.rb:13
--~--~-~--~~~---~--~~
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: Object repository

2009-07-16 Thread George

Thanks, it's working for me!  Is there a way to handle other
attributes like :alt ?

On Jul 13, 10:15 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 No, this mean 2 steps, which don't depend on each other:
 1. Install libxml-ruby
 2. Put in one folder 'repository.dtd' and 'object_repository.rb'

 On 14 июл, 01:23, George george.sand...@gmail.com wrote:



  Hello, thanks for this!  I'm looking at the README file and it says:

  For correct work install 'libxml-ruby' gem and put 'repository.dtd' near 
  'object_repository.rb'

  Does this mean I need to copy the .dtd and .rb file into the libxml-
  ruby folder?  And if so, where should I place them?

  Thanks,

  George

  On Jul 13, 3:39 am, Ivan Kabluchkov ikabluch...@gmail.com wrote:

   Hello all. I've created an object repository for Watir. May be it will
   be useful for someone. Documentation and examples are in README file

    rep.zip
   2KViewDownload
--~--~-~--~~~---~--~~
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: Object repository

2009-07-13 Thread George

Hello, thanks for this!  I'm looking at the README file and it says:

For correct work install 'libxml-ruby' gem and put 'repository.dtd' near 
'object_repository.rb'

Does this mean I need to copy the .dtd and .rb file into the libxml-
ruby folder?  And if so, where should I place them?

Thanks,

George



On Jul 13, 3:39 am, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 Hello all. I've created an object repository for Watir. May be it will
 be useful for someone. Documentation and examples are in README file

  rep.zip
 2KViewDownload
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >