[wtr-general] Re: canxth element

2010-05-07 Thread Chuck van der Linden
I feel obligated to point out one thing here:

Per the current (and the earliest of) HTML standards, values for id
attributes are supposed to be UNIQUE within a document(page).

id=name
  Define a reference name for the tag that is UNIQUE in the
document.  (emphasis mine)

There are parts of Watir (identifying objects by ID value) and other
tools and perhaps even browsers that expect pages to adhere to the
HTML standard and will not function correctly if the page violates the
standards and contains 'invalid HTML' such as this.

You should file a bug to inform the appropriate parties that the web
pages are violating HTML standards by using the same 'ID' attribute
values repeatedly within the same document.

'class' and many other attributes can appear as many times, with
identical values, as you want.. the restriction to 'uniqueness'
applies only to the 'id' attribute so far as I know.


On May 6, 7:58 am, tjp kris...@gmail.com wrote:
 First off, apologies if I'm in the wrong group. Although I think I'm
 in the right place. I have the following html

 td id=zippyOne/td
 td id=zippyTwo/td
 td id=zippyThree/td

 .//*...@id='zippy']/@class is what xPath gives me for every one of
 those. How do I refer to the third one? I tried using
 ff.contains_text(One) and it gave me an index that was huge (1043)
 but couldn't translate that into anything.

 Advice on a solution, where to find a solution (I've searched the API)
 or otherwise is appreciated.

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


Re: [wtr-general] Re: Saving Javascript Files

2010-05-07 Thread Brendan Grainger
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 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.
 
 --
 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
 
 
 -- 
 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

-- 
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: [Wtr-development] Vapir

2010-05-07 Thread b...@pettichord.com
The biggest change in Vapir is that class names have been
systematically changed. We've been reluctant to make these changes in
Watir because it would lead to a lot of compatibility problems for
people who have extended the existing Watir classes. I'm happy to
reconsider if there really is a demand for this kind of change.

If I was starting from scratch and didn't have any legacy users, I'd
probably propose making most of the changes that Ethan made. But I
have found that Watir users have very little stomach for introducing
incompatible changes.

If there is stuff you like in Vapir that is compatible, please let us
know.

Bret

On May 5, 2:39 pm, Tim Koopmans tim.ko...@gmail.com wrote:
 This makes no sense to me. Shouldn't we just merge important changes  
 like modal support into Watir main? Or am I missing something? Is  
 vapir a silent protest of sorts?

 Regards,
 Tim

 On 06/05/2010, at 3:47, Ethan notet...@gmail.com wrote:



  Dear Watir people,
  I am happy to announce the release of the Vapir library, which is a
  fork of Watir and FireWatir.

  It is documented primarily at the github wiki at
 http://wiki.github.com/vapir/vapir/
  Documentation is sorely lacking at the moment, and improving it is my
  highest priority, but putting the code out for people to use preceded
  that.

  Links to other aspects of the forked project are listed athttp://vapir.org/

  The API is in most cases the same, with some changes where I felt it
  was best; these are enumerated at
 http://wiki.github.com/vapir/vapir/differences-from-watir-api

  It is a release candidate currently, and can be installed using the
  --pre flag to rubygems (rubygems 1.3.6 is required; run gem update
  --system if you are on an earlier version).
  gem install --pre vapir-firefox
  gem install --pre vapir-ie

  Major improvements over Watir are:
  - Modal dialog API which is (mostly) consistent between IE and Firefox
  -http://wiki.github.com/vapir/vapir/modal-dialogs
  - Unified codebase for both Firefox and IE interaction - basically,
  everything that works in IE works in Firefox as well, which is not the
  case with FireWatir.
  - Many bug fixes and feature enhancements for issues in Watir's issue
  tracker, which will be documented more thoroughly on the wiki in the
  coming days.

  I would encourage any questions or discussion to go to Vapir's mailing
  list, not Watir's. The forked project is intended to stand on its own,
  separate from the Watir library due to a great deal of changes in the
  codebase which make it to some degree (a small degree, hopefully)
  incompatible. Support will be on Vapir's mailing list at
 http://groups.google.com/group/vapir

  -Ethan
  ___
  Wtr-development mailing list
  wtr-developm...@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-development

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