[wtr-general] Re: Converting Watir::Waiter.wait_until to element.wait_until

2010-11-23 Thread Alastair Montgomery
Thanks for the information, that will really help.
I don't think I am doing anything with the first link afterwards, I am
just using it to tell when the JQuery part of the page is finished
rendering.

On Nov 19, 8:43 pm, Jarmo Pertman jarm...@gmail.com wrote:
 Hi!

 First, please note that #wait_until_present is not the same as
 wait_until #exists? because #present? does mean that the link has to
 #exist? AND has to be #visible?. But i guess that doesn't matter most
 of the time.

 Depending of what you're doing with that link later on i'd recommend
 even easier way of using #when_present:
 $browser.link(:i, checkNode).when_present.click # or whatever you're
 going to do when the link exists and is visible...

 The second one would be:
 Watir::Wait.wait_until {{$browser.image(:id, nodeID[i][0]).src !=
 images/wait18.gif}

 So, the most easiest fix to hide all deprecation warnings would do
 one global search  replace of Watir::Waiter to Watir::Wait and
 you're done. Those #when_present, #wait_until_present and
 #wait_while_present methods are added just for convenience.

 Jarmo Pertman
 -
 IT does really matter -http://www.itreallymatters.net

 On Nov 19, 7:34 am, Alastair Montgomery doodl...@gmail.com wrote:







  Hi,

  I've just updated the Watir install at our Indian site to 1.6.7 and
  started seeing the messages about Watir::Waiter being deprecated.

  I've been able to convert the following format lines from
      Watir::Waiter.wait_until {$browser.link(:id,checkNode).exists?}
  to
      $browser.link(:id,checkNode).wait_until_present

  But my brain is drawing a blank with this line,
      Watir::Waiter.wait_until {$browser.image(:id, nodeID[i][0]).src !=
  images/wait18.gif}

  I couldn't find the new methods on the API docs, maybe it is the jet
  lag catching up on me.

  Can you point me at examples or how the above line checking the image
  source URL would work in the new format?

  Thank you.
  Alastair

-- 
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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)

2010-11-23 Thread Kushal
Anyone? And I forgot to mention that I am using IE7.

Thanks.

Kushal

On Nov 21, 12:29 pm, Kushal kushal...@gmail.com wrote:
 Hi all,

 I am stuck in this problem for three days now. I need to open a modal
 dialog from a button on a webpage. When I use click or
 fire_event(onclick), execution just hangs. This is understandable as
 it waits for work to be completed on the modal dialog.

 Therefore, I am trying to use click_no_wait, but it returns nil. I
 made some changes in the click_no_wait function, to display the call
 by adding puts command on line 249 and replaced start rubyw
 #{command} with rubyw #{command}

 I get the following error on the console:

 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:58:in
 `assert_exists': Unable to locate element, using :unique_number, 1
 (Watir::Exception::UnknownObjectException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/
 element.rb:263 :in `click!' from -e:1

 The command that is executed in the above call is:

 ruby -e require 'rubygems';require 'c:/ruby/lib/ruby/gems/1.8/gems/
 watir-1.6.7/lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd,
 656538), :unique_number, 1).click!

 Also, I read this article (http://jira.openqa.org/browse/WTR-144)
 which describes how fire_event_no_wait could be added to element.rb
 for fire_event(onmousedown) with no wait. However,
 eval_in_spawned_process method is not present in PageContainer module
 in Watir 1.6.7.

 Thanks.

 Kushal

-- 
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: Excel interface class - does excel actually need to be installed

2010-11-23 Thread Dan
Thanks!  I found roo to be kind of a pain to work with, so I ended up
just storing the data in xml files.

Dan

On Nov 18, 4:04 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, Nov 17, 2010 at 11:10 PM, Dan dfra...@gmail.com wrote:
  Hello!  This may be a silly question, but does excel actually need to
  be installed on the machine to be able to read from an excel file with
  the Excel interface class?  Chances are the machines that will be
  running my scripts won't have Excel installed.

 Take a look at roo if you need to work with Excel and do not have it
 installed.

 http://roo.rubyforge.org/

 Ž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] Option in select

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

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

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


[wtr-general] Re: Option in select

2010-11-23 Thread orde
Not according to 
http://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir.
Check out the select_list method, and there's a red X for :title
attribute.

orde


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

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

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


[wtr-general] Re: Option in select

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

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

 orde

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



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

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

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