[wtr-general] Re: :after? and :before? methods not supported for all elements?

2010-01-22 Thread Jarmo Pertman
On Jan 21, 2:38 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Thu, Jan 21, 2010 at 9:48 AM, Jarmo Pertman jarm...@gmail.com wrote:
  then there is an example of using :after? (although not :before?,
  though this is also available)

 I think :before? is deprecated because it did not work.
:before? seems to work for me with the span for example, so why are
you saying it doesn't work? I think that i've seen that beforeText and
afterText are the methods, which doesn't seem to work correctly, maybe
youre confusing with these?
Also, no comments or any other indications that :before? or :after? is
broken in current Watir source code either:
http://github.com/bret/watir/blob/master/watir/lib/watir/element.rb



  In other words - it works okay with span, but not with input field. Is
  there anywhere most up to date documentation so everyone would know if
  it's supported or not? If there is some outdated documentation, can it
  be deleted from the web?

 Wiki should be up to date. If something is wrong, please fix it. If you need
 any help with the wiki, just let me know.
That's the case - i don't know if it is supposed to work like that or
not :-) It seems to me like a bug due to no other indications.



 These are the pages that mention :after?

 http://wiki.openqa.org/display/WTR/Watir+Methods+Supported+by+HTML+El...http://wiki.openqa.org/display/WTR/How+and+Whathttp://wiki.openqa.org/display/WTR/Ways+Available+To+Identify+HTML+El...

 Athttp://wiki.openqa.org/display/WTR/Watir+Methods+Supported+by+HTML+El...
 can mark elements that work with :after?. For now, only link is marked
 as supported.

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host

-- 
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: :after? and :before? methods not supported for all elements?

2010-01-22 Thread Jarmo Pertman
I just had a case where I wanted to check needed fields, for example
there's a form something like this:
form action='blah'
  input name='field1'
  input name='field2'
  input type='submit'
/form

now if i press submit, then the form will have an error message
something like all necessary fields need to be filled, and the form
will be something like this:
form action='blah'
  input name='field1'
  span class='error'*/span
  input name='field2'
  span class='error'*/span
  input type='submit'
/form

So i wanted to make some helper method in my test to check if those *
marks are there and saw that there is a method called :before?
and :after? and thought that i could use them:
def field_needed?(el1, el2)
  span(:after? = el1, :before? = el2).exists?
end

That actually seemed to work, but i wanted to make it even better and
implement :between? to Watir::Element, when I noticed that it doesn't
seem to work with at least text_fields (didn't try anything else, but
i'm also suspecting that the problem seem to exist with
Watir::InputElement).

On Jan 21, 10:56 pm, Charley Baker charley.ba...@gmail.com wrote:
 I've never actually used :after? or :before? either. We are still reporting
 issues in Jira, which does need some maintenance soon.

 Charley Baker

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

2010-01-22 Thread al3kc
FF3.6 was realized yesterday. Any plans for jssh on new version?

-- 
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: File Download - Security Warning popup

2010-01-22 Thread orde
Try click_no_wait instead of click on this line:

ie.link(:html,/return InstallHelper.clickedDownload()/).click

Also, check out: http://wiki.openqa.org/display/WTR/Basic+Authentication

Hope it helps.

On Jan 22, 2:53 pm, capri capricorn...@gmail.com wrote:
 Hi,

 I tried the below code to identify file download -security warning
 message using autoit in my watir script.  However it does not seem to
 work.  I am trying to click the 'Run' button of this window. On
 running the script, it gets struck and doesn't show any errors. Any
 thoughts,inputs would be highly appreciated.

 many thanks.

 Code:
 -
 require 'watir'
 require 'rubygems'
 require 'win32ole' # to invoke Autoit controls

 ie=Watir::IE.new
 autoit=WIN32OLE.new('AutoItX3.Control')

 ie.goto http://www.cooliris.com;

 ie.link(:html,/return InstallHelper.clickedDownload()/).click

 r=autoit.WinExists(File Download - Security Warning)
 puts r

 res=autoit.WinWait(File Download - Security Warning,'',3)
 puts  res
 res=autoit.WinActivate(File Download - Security Warning)
 puts res
 res=ie.autoit.ControlFocus(File Download - Security Warning,,
 Run)
 res=ie.autoit.ControlClick(File Download - Security
 Warning,,Run)
 puts res
 puts \n

-- 
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] ERROR: Error installing watir:

2010-01-22 Thread Jag
Hi,
After installing Ruby 1.8.6 (Also tried 1.9)
then followed the steps

gem update --system
gem install watir

getting this error with ruby1.9

ERROR:  Error installing watir:
ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb
checking for strncpy_s()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby19/bin/ruby
C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed
to generat
e an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:419:in `try_link'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:527:in `try_func'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:772:in `block in
have_func'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:668:in `block in
checking_for'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels)
in postpo
ne'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block in
postpone'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:771:in `have_func'
from extconf.rb:9:in `main'


Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/
win32-api-
1.4.5 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api-1.4.5/
ext/gem_mak
e.out

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