[wtr-general] Re: Quick Start, Unit Tests, & Server 2003 sp2

2008-11-07 Thread Chuck vdL

Should I just update the Wiki page for this portion or the quickstart/
tutorial ?  or are there only specific folks that should be updating
those pages?

I also found one other discrepency that I noted, which was at the
point where the quickstart had me enter
  ie.text_field(:name, "q").set "Watir"

and the expected response was given as "true"  (sans quotes).  but
what I saw appeared to just be an empty string as demarked by a pair
of double-quotes  ("")

Is that an error in the quickstart doc, or should the set message be
returning true on success and it's not?

On Nov 3, 2:12 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> Thanks for the info.
>
>
>
> [EMAIL PROTECTED] wrote:
> > Hey folks, apologies if this is not be proper venu for this info.. but
> > I'm brand new to Watir and this group.
>
> > Just starting out, going through the Quick start using Watir v1.5.6
> > and I wanted to note that the info given regarding the IE settings
> > change needed for XPsp2 (Enabling Active Content for local files on my
> > computer) applies to Server 2003 SP2 as well.
>
> > I was getting errors (19 of them) running the unit tests,  Made that
> > single change, and now the unit tests run without errors.
>
> > FYI: not that I expect it would matter, but this 2003 Server is
> > actually a virtual machine, hosted under Server2008 Hyper-V, running
> > the VM console on a Vista system.   So far no issues with Ruby or
> > Watir in that environment, but I'll be sure to let you know if
> > something turns up.
>
> > --Chuck- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.2 has been uploaded to Rubyforge

2008-11-09 Thread Chuck vdL



On Nov 7, 8:43 am, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> Comments inline.
>
 
>> CONCLUSION:
>> I would like to run tests after gems are installed. I think most users
>> want to do that so they can see watir in action.
>
>
>Unfortunately this is not easy to fix right now. We are about half-way
>to the point of having a merged watir/firewatir testsuite, at which
>point the tests will be in the commonwatir module, not watir or
>firewatir. Would you like to help with this? I've found it to be much
>more time consuming than I originally expected.

I realize there are 'good reasons' for this, but from the outside
persective of someone new to Watir, not having running unit tests
really gives a bad impression.. it makes people question if you are
really doing 'test first' development, and makes people wonder things
like 'how can they know this thing even works right if it's released
without unit tests in a running condition?"

Do you really intend to release 1.6  (e.g. it's what gets installed if
someone does 'gem install watir' ) without unit tests working?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Tutorial Examples now 'missing'

2008-11-09 Thread Chuck vdL

I think I found them back on the 1.5 branch, but the trunk based links
to the Examples folder given in the tutorial are no longer working.

I installed watir just before you bumped to 1.6  but have been busy
with other things at work and was just now starting on the tutorial.

Is someone slated to go through the tutorial examples and make sure
they work correctly with 1.6?   If not I suppose I could try doing
this, since I'm a totally fresh set of eyes that might be good, but
since I'm new to watir and ruby it might be a wee bit difficult for me
to differentiate between my own mistakes and errors due to changes in
1.6

I suppose I can set-up a different VM or snapshot tree and put 1.6 on
it, and then compare the results with the existing VM I've got 1.5
installed on..  (total Hyper-V addict here), which should allow me to
tell if the code works on one and not the other.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Tutorial Examples now 'missing'

2008-11-10 Thread Chuck vdL

two links on this page  http://wiki.openqa.org/display/WTR/Example+Test+Case

right below the header "google test search"

They point at:
  http://svn.openqa.org/svn/watir/trunk/watir/examples/google_search.rb
  http://svn.openqa.org/svn/watir/trunk/watir/examples/


On Nov 10, 7:51 am, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> It is unclear to me what examples you mean.
>
> Examples that had been included in the 1.5 source tree were moved to the
> wiki.http://wiki.openqa.org/display/WTR/Examples
>
> Bret
>
>
>
> Chuck vdL wrote:
> > I think I found them back on the 1.5 branch, but the trunk based links
> > to the Examples folder given in the tutorial are no longer working.
>
> > I installed watir just before you bumped to 1.6  but have been busy
> > with other things at work and was just now starting on the tutorial.
>
> > Is someone slated to go through the tutorial examples and make sure
> > they work correctly with 1.6?   If not I suppose I could try doing
> > this, since I'm a totally fresh set of eyes that might be good, but
> > since I'm new to watir and ruby it might be a wee bit difficult for me
> > to differentiate between my own mistakes and errors due to changes in
> > 1.6
>
> > I suppose I can set-up a different VM or snapshot tree and put 1.6 on
> > it, and then compare the results with the existing VM I've got 1.5
> > installed on..  (total Hyper-V addict here), which should allow me to
> > tell if the code works on one and not the other.- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Login problem using watir

2008-11-11 Thread Chuck vdL

A few things to check before the other more experienced folks chime in

 is the field name the same each time the page is rendered?
 name not duplicated elsewhere in the page code?
 have you tried an attribute other than 'name' that might be used to
identify the field?

On Nov 10, 1:54 am, Giri <[EMAIL PROTECTED]> wrote:
> I m using watir for my web application. watir is not identifying my
> Login text field.
> i tried with ie.text_field(:name,"fieldname in html
> code").set("login").
> plz guide me if any of u is familir with it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Should Tutorial and Quickstart be updated to use Watir::Browser?

2008-11-14 Thread Chuck vdL

right now both of them are very IE specific

Shouldn't they be changed to reflect the new integration with
Firewatir and altered so that

* They use Watir::Browser instead of Watir::IE
* show how to set the browser type
* use an a generic name for the browser object other than 'ie'
* show how to change the script from using IE, to using Firefox by
changing the browser type (and then re-run the script)

* Discuss FireBug along with the IE developer toolbar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Should a logger be included in Watir?

2008-11-14 Thread Chuck vdL

I think JArkelen points out something fairly valuable here.

we're overloading the term 'logger' and that's causing confusion..
perhaps using more distinct nomenclature would be good?

In my view there is both "Logging" used for debugging of scripts or
how exactly the application is failing when scripts are run, and
'Reporting' of test case results (especially useful when a suite of
tests is run automatically)

I view 'Reporting' as something that belongs in a overall test
framework..  and I wish we had one because I'm not relishing re-
creating that particular wheel, (and as Brett pointed out that's a
huge advantage that many of the commercial products have over watir at
the moment) BUT that's entirely outside the scope of the current watir
work, and sounds more like the kind of thing Brett is hoping for
WatirCraft to accomplish..

OTOH I really would like to see some kind of fully integrated
'logging' built into watir..  Somethig where I could just set a flag
to enable the logging and specify a few things like where to establish
the logging file, and the system would automagically log each method
being executed, along with parameters and return values).  It would
also need its own method that you could call to manually throw
something into the log if it was needed.   I think that would be
highly valuable and does have a place in a 'browser driver'.

just my $.05


On Nov 13, 12:36 pm, JArkelen <[EMAIL PROTECTED]> wrote:
> I use to kinds of logs in my test:
> 1. In all my self created classes and methods I use puts statements to
> output the test case flow to the command window. This is for myself to
> investigate quckly when something goes wrong.
> 2. I have a self created report class which creates nice html reports
> with screenshots of every test case. This is for official reporting in
> my QA team.
>
> On Nov 13, 6:55 pm, marekj <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have not needed logger for watir internal methods.
> > However I do use logger for my tests using Logger class in Ruby for some
> > test noise generation
> > Here is a hacked up example which is sufficient for my needs.
> > here is a gist:http://gist.github.com/3466
>
> > my two.to_a cents
>
> > --
> > marekj | i can has watir frameworkhttp://www.bitbucket.org/marekj/watirloo/
> > Semantic Page Objects Modeling in Watir
>
> > On Thu, Nov 13, 2008 at 10:40 AM, Bret Pettichord <[EMAIL PROTECTED]>wrote:
>
> > > I agree that it would be great if we had a way to log all of the watir
> > > driver actions. I've thought about doing this for years but have never
> > > really had the need for it, and it is non-trivial to implement (although
> > > the refactoring i've done shouldn't make this any harder to do).
>
> > > If Alister's question is whether people would like to have this level of
> > > logging embedded in Watir, then I think that is a fair question, and my
> > > guess would be that the answer would be yes.
>
> > > Another question would be who wants to do it? Not simple.
>
> > > Bret
>
> > > Paul Rogers wrote:
> > > > when I put the original logger in to watir, I really only intended it
> > > > to get overwritten by a plugged in logger, but this unfortunately
> > > > caused a lot of confusion. Probably cos the way I implemented it wasnt
> > > > the best.
> > > > A common thing is for people to want to log that they are clicking a
> > > > certain link ( or button etc ), so its definitely useful for the main
> > > > watir methods to be able to log this info, but with the merge and
> > > > refactoring that Bret has been doing it may be much harder to do.
>
> > > > So, what Im really saying is that its nice for the Watir browser
> > > > drivers to be able to log their  actions, but shouldnt force users to
> > > > use that mechanism completely.
>
> > > > Paul
>
> > > > On Thu, Nov 13, 2008 at 8:50 AM, Bret Pettichord <[EMAIL PROTECTED]
> > > > > wrote:
>
> > > >     I think you've misunderstood some comments that I made.
>
> > > >     Someone pointed out that the WatirLogger was in Watir but not in
> > > >     FireWatir. In response, I suggest that instead of putting it in
> > > >     both, we
> > > >     remove it. Here is the code in question:
>
> > > >      class WatirLogger < Logger
> > > >        def initialize(filName, logsToKeep, maxLogSize)
> > > >          super(filName, logsToKeep, maxLogSize)
> > > >          self.level = Logger::DEBUG
> > > >          self.datetime_format = "%d-%b-%Y %H:%M:%S"
> > > >          self.debug("Watir starting")
> > > >        end
> > > >      end
>
> > > >     My point was that it is vestigial. The Watir browser drivers don't
> > > >     use it.
>
> > > >     My view is that this should be treated as example framework code,
> > > >     not as
> > > >     part of Watir. To me, this is just an example of how to use the
> > > Logger
> > > >     class and in fact obscures the fact that it is really a fully
> > > featured
> > > >     logger by making you think it is a special Watir

[wtr-general] Re: Should Tutorial and Quickstart be updated to use Watir::Browser?

2008-11-17 Thread Chuck vdL

I'm just getting started learning Watir, I've not even finished the
tutorial  (distractions at work keep pulling me away) and I only now
many of the items I mentioned because either other folks have told me
they exist (firebug) or because I saw references to them in other
messages here in the last few days.

I'm at that lovely stage where because I'm learning the stuff and have
fresh eyes I can see what's missing, or in some cases needs to change,
but unfortunately don't know the subject well enough to make the
changes myself.

On Nov 17, 1:07 am, "Željko Filipin" <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 14, 2008 at 17:23, Chuck vdL <[EMAIL PROTECTED]> wrote:
> > Shouldn't they be changed to reflect the new integration with
> > Firewatir
>
> +1
>
> You sound like you know what you are talking about (a lot of you's in this
> short sentence). Would you do it?
>
> Željko
> --http://watirpodcast.com/alister-scott/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Text field Numeric Issue

2008-11-20 Thread Chuck vdL

OK here's the thing.  neither HTML nor the HTTP protocol used to send
requests to the webserver have any concept of string vs numeric
datatypes.   it's all effectively just ascii characters (strings
basically).

So if you are seeing some kind of form validation occuring WITHOUT
posting some or part of the form back to the webserver, then it's
happening via code on the client side.  Typically this is javascript,
and it's either evaluating the entire form at the point the submit
button is clicked, or it's evaluating each field as the contents
change.  Javascript typically does this via events like onclick or
onchange, and then uses functions like 'alert' to create a popup
warning, or makes changes to the page and re-renders it to indicate
values that need to be corrected.

So you're going to have to dig into the code for the webpage to figure
out what's going on with that field in the form, and once you set the
value, fire the event that causes it to be checked (presuming your
intent is to test the client side code).

Now, the security tester in me feels obligated to point out that while
client side validation is a fine thing to prevent users from wasting
time submitting forms with missing or invalid values, it should in no
way be depended on to protect your webserver from invalid input.  As
far as webserver code goes it should adopt the 'all input is evil'
mentality and use whatever means nessary (whitelists or other input
validation) to reject invalid input.So it's a perfectly valid test
to use any method you want (including watir, or some tool operating at
the HTTP level like fiddler or MS Visual Studio Webtests) to bypass
the client side code and submit bad data to the webserver.   If you
can do that sort of thing and crash the site, it's a prefectly valid
bug.  (because that's exactly the thing someone attacking your site
would do)


On Nov 19, 10:04 pm, Prince3105 <[EMAIL PROTECTED]> wrote:
> Hi Friend,
>
> I couldn't understand, Its a text field it should accept only numeric
> value. If we enter any other values it will create a error message pop
> up. I am using the any one of the above codes, but it creates the pop
> up, Just i want to know that,
>
> Any error on the code?
> or any other codes available to enter numeric value?
>
> Actually i am having experience in QTP only, its a user friendly tool
> where i faced the same issue, take a look on below code,
>
> Browser().Page().WebEdit().set "20"
>
> but i changed the code as below and worked well.
>
> Browser().Page().WebEdit().set 20
>
> Here this modification is not working, WatIR enters the value as
> string not a numeric value, that's why application shows the error
> message.
>
> On Nov 19, 6:25 pm, juuser <[EMAIL PROTECTED]> wrote:
>
>
>
> > You have to probably fire_event("onchange") or whatever JavaScript
> > event you have tied to that text_field after you've set the value.- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click dijit button char

2008-11-24 Thread Chuck vdL

is there anything in the html that is defining something like an
'onclick' for that thing?  all I see in the code above is basically
just text..and normal text isn't clickable as far as I know.
maybe there's some other object that's actually overlapping that
button

On Nov 21, 11:30 am, maven999 <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a drop down menu that can only be accessed by clicking on a
> down arrow character (▼) on the combo box. The html for the click
> location is pasted below:
>
>  role="presentation">
> ▼
> 
>
> Flashing the button works:
>
> $ie.div(:class, 'dijitDownArrowButtonInner').flash
>
> But clicking it does not work:
>
> $ie.div(:class, 'dijitDownArrowButtonInner').click
>
> Any ideas? Also, since it is not a traditional select_list, how do I
> select an item when I do get the drop-down list to appear?
>
> Thanks!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click dijit button char

2008-11-25 Thread Chuck vdL

OK so we can't see what the functions called by them do, but it does
look like there are 4 events getting defined..  have you tried using
code to fire one of the events ("onmousedown" seems the most obvious
candidate) to see if that makes the list appear?

odds are after the mousedown, you're going to then have to fire some
kind of mouseover event for a list item perhaps followed by another
mousedown, or mouseup ..

but without interacting with the site it's hard to tell (is it
designed to click on the list, then click on the item, or as a click-
drag-release?)

just as a guess I'd expect the meat of the work to be done by
mousedown events, while mouseover and others that seem to be calling
'_onmouse' are probably just causing it to change colors for the
illusion of focus being on the thing under the mouse.

So if that's not enough to get you going in the right direction,
please post a larger section of the page code (or point us at a
similar page that is publically available) as Wesley requested.

On Nov 24, 10:35 am, maven999 <[EMAIL PROTECTED]> wrote:
> Hi Chuck,
>
> Here is the preceding html which I should have included in my original
> question:
>
> 
>  dojoattachevent="onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseen-ter:_onMouse,onmouseleave:_onMouse"
> dojoattachpoint="downArrowNode">
>  role="presentation">
> ▼
> 
> 
> 
>
> Thanks!
>
> On Nov 24, 12:44 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
>
>
> > is there anything in the html that is defining something like an
> > 'onclick' for that thing?  all I see in the code above is basically
> > just text..and normal text isn't clickable as far as I know.
> > maybe there's some other object that's actually overlapping that
> > button
>
> > On Nov 21, 11:30 am, maven999 <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I have a drop down menu that can only be accessed by clicking on a
> > > down arrow character (▼) on the combo box. The html for the click
> > > location is pasted below:
>
> > >  > > role="presentation">
> > > ▼
> > > 
>
> > > Flashing the button works:
>
> > > $ie.div(:class, 'dijitDownArrowButtonInner').flash
>
> > > But clicking it does not work:
>
> > > $ie.div(:class, 'dijitDownArrowButtonInner').click
>
> > > Any ideas? Also, since it is not a traditional select_list, how do I
> > > select an item when I do get the drop-down list to appear?
>
> > > Thanks!- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Getting error at installing 1.6.1

2008-11-25 Thread Chuck vdL

FYI:   got this same builder doc error when I tried to install just
now..

Do we need to update the install instructions in the tutorial and such
to reflect that users might expect to see this error, and what (if
anything) they need to do about it?

Perhaps also update the 'Output should be something like this:"
example to reflect what users currently see when they do the install
(sample below)

=-=-=- My experience =-=-=

Environment is a CLEAN (as in pristine, fresh) windows 2003 server
system (it's a VM but I doubt that matters).   Never had Ruby or Watir
on it.

 Installed Ruby 186-27-RC2 without issues  (yeah living on the 'edge'
with the RC {smirk})

Rest of the install looked like this (yes I'm an admin on the box)

C:\Documents and Settings\Chuckv>gem update --system
Updating RubyGems
Nothing to update

C:\Documents and Settings\Chuckv>gem install watir
Successfully installed activesupport-2.2.2
Successfully installed xml-simple-1.0.11
Successfully installed rubyforge-1.0.1
Successfully installed rake-0.8.3
Successfully installed hoe-1.8.2
Successfully installed s4t-utils-1.0.4
Successfully installed builder-2.1.2
Successfully installed user-choices-1.1.6
Successfully installed commonwatir-1.6.2
Successfully installed firewatir-1.6.2
Successfully installed watir-1.6.2
11 gems installed
Installing ri documentation for activesupport-2.2.2...
Installing ri documentation for rubyforge-1.0.1...
Installing ri documentation for rake-0.8.3...
Installing ri documentation for hoe-1.8.2...
Installing ri documentation for s4t-utils-1.0.4...
Installing ri documentation for builder-2.1.2...
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text=""
... RDOC args: --ri --op C:/Ruby/lib/ruby/gems/1.8/doc/builder-2.1.2/
ri --title
Builder -- Easy XML Building --main README --line-numbers --quiet lib
CHANGES Ra
kefile README doc/releases/builder-1.2.4.rdoc doc/releases/
builder-2.0.0.rdoc do
c/releases/builder-2.1.1.rdoc
(continuing with the rest of the installation)
Installing ri documentation for user-choices-1.1.6...
Installing ri documentation for commonwatir-1.6.2...
Installing ri documentation for firewatir-1.6.2...
Installing ri documentation for watir-1.6.2...
Installing RDoc documentation for activesupport-2.2.2...
Installing RDoc documentation for rubyforge-1.0.1...
Installing RDoc documentation for rake-0.8.3...
Installing RDoc documentation for hoe-1.8.2...
Installing RDoc documentation for s4t-utils-1.0.4...
Installing RDoc documentation for builder-2.1.2...
Installing RDoc documentation for user-choices-1.1.6...
Installing RDoc documentation for commonwatir-1.6.2...
Installing RDoc documentation for firewatir-1.6.2...
Installing RDoc documentation for watir-1.6.2...

C:\Documents and Settings\Chuckv>

On Nov 11, 1:32 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> Lisa Crispin wrote:
> > If you are monkey-patching and want to use firefox, what do you do
> > instead of
> > require 'watir/ie' - do you say require 'watir/firefox'?  We tried
> > that and it didn't work.
>
> use 'require "firewatir"' as before.
>
>
>
> > Maybe our assumption is bad - we assumed that since the new version
> > can use firefox, we can run watir on the mac?
>
> > If you use the environment variable to set the browser version, and
> > use Watir::Browser.new instead, do you need require 'watir/ie' at all?
> No.
> > I'm just trying to get pointed down the right road. require 'watir/ie'
> > is working when we run our scripts on windows. But we want more
> > flexibility.
> > thanks,
> > Lisa- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

I'm having a look at Ruby in Steel as a potential IDE for doing
testing automation with Watir.
 

Mostly because:
 1) all my devs use Visual Studio for their work, so it puts me on the
same platform, gives me good integration with our source control etc.
 2) Intellisense!!!   since I'm new to Watir and have not memorized
all the applicable methods for each object etc.. and also new to
ruby.  Well it just makes it a hell of a lot easier.
 3) awsome debugger

Firstly:  Has anyone else looked at this?  Does anyone else use it?

I could only find one reference here when searching this group.

Secondly, I'm having a problem:  It appears to get Intellisense
working, I have to add the watir code using their 'ruby librarian'
utility.. so I pointed it at the various lib directories under c\ruby
\lib\ruby\gems\1.8\gems   for commonwatir, firewatir, watir and asked
it to add all the .rb files found there.

In the process it gives me the following error
"unexpected token - '*'   htmlelements.rb  Line 1563  column 20  "

 the file appears to be part of Firewatir.  Anyone here have an idea
why it might be giving me that message?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click dijit button char

2008-12-01 Thread Chuck vdL

re having words with the developer..

The dev probably has what they feel is a good reason for using the
mouseup to select the item from the list..

Except for instances were it affects testability, or performance, I
generally try to stay away from telling the devs how to do their job
(lest they tell me how to do mine) .

OTOH if the purpose of the talk is to better understand how the dev
thinks, so you can have an easier time coding your automation, well in
that case have fun picking his brain and getting him to explain the
conventions he's using for making the controls work etc.   just make
sure s/he understands you are questioning to understand, not
questioning their coding skills or methods..

On Dec 1, 10:10 am, maven999 <[EMAIL PROTECTED]> wrote:
> Chuck, your guess was correct.
>
> The following code worked in that I was able to click the down button
> and cause the dropdown list to appear:
>
> $ie.div(:class, 'dijitDownArrowButtonInner').fire_event('onmousedown')
>
> But when I then try to select an item in the dropdown list,
> 'onmousedown' does not work. But 'onmouseup' DOES work. I think its
> time to have a few words with the developer :-)
>
> Thanks to Chuck and Wesley for their help!
>
> On Nov 25, 4:37 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
>
>
> > OK so we can't see what the functions called by them do, but it does
> > look like there are 4 events getting defined..  have you tried using
> > code to fire one of the events ("onmousedown" seems the most obvious
> > candidate) to see if that makes the list appear?
>
> > odds are after the mousedown, you're going to then have to fire some
> > kind of mouseover event for a list item perhaps followed by another
> > mousedown, or mouseup ..
>
> > but without interacting with the site it's hard to tell (is it
> > designed to click on the list, then click on the item, or as a click-
> > drag-release?)
>
> > just as a guess I'd expect the meat of the work to be done by
> > mousedown events, while mouseover and others that seem to be calling
> > '_onmouse' are probably just causing it to change colors for the
> > illusion of focus being on the thing under the mouse.
>
> > So if that's not enough to get you going in the right direction,
> > please post a larger section of the page code (or point us at a
> > similar page that is publically available) as Wesley requested.
>
> > On Nov 24, 10:35 am, maven999 <[EMAIL PROTECTED]> wrote:
>
> > > Hi Chuck,
>
> > > Here is the preceding html which I should have included in my original
> > > question:
>
> > > 
> > >  > > dojoattachevent="onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseen--ter:_onMouse,onmouseleave:_onMouse"
> > > dojoattachpoint="downArrowNode">
> > >  > > role="presentation">
> > > ▼
> > > 
> > > 
> > > 
>
> > > Thanks!
>
> > > On Nov 24, 12:44 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
> > > > is there anything in the html that is defining something like an
> > > > 'onclick' for that thing?  all I see in the code above is basically
> > > > just text..and normal text isn't clickable as far as I know.
> > > > maybe there's some other object that's actually overlapping that
> > > > button
>
> > > > On Nov 21, 11:30 am, maven999 <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi all,
>
> > > > > I have a drop down menu that can only be accessed by clicking on a
> > > > > down arrow character (▼) on the combo box. The html for the click
> > > > > location is pasted below:
>
> > > > >  > > > > role="presentation">
> > > > > ▼
> > > > > 
>
> > > > > Flashing the button works:
>
> > > > > $ie.div(:class, 'dijitDownArrowButtonInner').flash
>
> > > > > But clicking it does not work:
>
> > > > > $ie.div(:class, 'dijitDownArrowButtonInner').click
>
> > > > > Any ideas? Also, since it is not a traditional select_list, how do I
> > > > > select an item when I do get the drop-down list to appear?
>
> > > > > Thanks!- Hide quoted text -
>
> > > - Show quoted text -- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

OK so I went and looked..  it's not javascript

-=-=- snip-=-=
class Radio < RadioCheckCommon
  def initialize *args

=-=-=-= snip =-=-=-=

its the *  in *args  that's giving it a fit..   Now understand please
that my ruby coding skills are in their infancy..  and I've not gotten
into defining my own classes or subclassing or any of that.. so I've
no idea (other than it looks something like a C++ pointer, but I know
ruby doesn't have pointers) what in the world *args  is doing at that
point in the code..

Is this valid ruby code and I'm perhaps looking at a bug in ruby in
steel?Is this something added really recently to ruby?  RiS comes
with ruby 186-25  (although I thought I updated this)

ruby-v reports   "1.8.6  (2007-09-24 patchlevel 111)"
 that should be the correct version for working with Watir 1.6.2
right?

On Dec 1, 10:32 am, "Paul Rogers" <[EMAIL PROTECTED]> wrote:
> heres my guess - the firewatir code uses lots of whats really
> javascript embedded in the ruby file. I think the parser is having  a
> hard time figuring out whats ruby and whats javascript
>
> If you poke around in the lines suggested by the parser, you might be
> able rearrange some of the code to better help the parser
>
> Paul
>
>
>
> On Mon, Dec 1, 2008 at 11:16 AM, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
> > I'm having a look at Ruby in Steel as a potential IDE for doing
> > testing automation with Watir.
> >  <http://www.sapphiresteel.com/>
>
> > Mostly because:
> >  1) all my devs use Visual Studio for their work, so it puts me on the
> > same platform, gives me good integration with our source control etc.
> >  2) Intellisense!!!   since I'm new to Watir and have not memorized
> > all the applicable methods for each object etc.. and also new to
> > ruby.  Well it just makes it a hell of a lot easier.
> >  3) awsome debugger
>
> > Firstly:  Has anyone else looked at this?  Does anyone else use it?
>
> > I could only find one reference here when searching this group.
>
> > Secondly, I'm having a problem:  It appears to get Intellisense
> > working, I have to add the watir code using their 'ruby librarian'
> > utility.. so I pointed it at the various lib directories under c\ruby
> > \lib\ruby\gems\1.8\gems   for commonwatir, firewatir, watir and asked
> > it to add all the .rb files found there.
>
> > In the process it gives me the following error
> > "unexpected token - '*'   htmlelements.rb  Line 1563  column 20  "
>
> >  the file appears to be part of Firewatir.  Anyone here have an idea
> > why it might be giving me that message?- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

OK the putting that in 'brackets'  (sorry still think of those as
parenthesis, and [] as brackets..)  eliminated that error and got me a
new one..  (heh  isn't this fun)

Now the problem is on line 1078 column 39 of firefox.rbanother
unexpected token, this time a comma..

So I went and looked, here's the code in that area

--=-=-=-=- snip -=-=-=-=
   # 5/16/08 Derek Berner
# Wrapper method to send JS commands concisely,
# and propagate errors
def js_eval(str)
  #puts "JS Eval: #{str}"
  $jssh_socket.send("#{str};\n",0)
  value = read_socket()
  if md=/^(\w+)Error:(.*)$/.match(value)
eval "class JS#{md[1]}Error\nend"
raise (eval "JS#{md[1]}Error"), md[2]
  end
  #puts "Value: #{value}"
  value
end
--=-=-=-=-=- snip -=-=-=-

The problem is on the 'raise' line, it doesn't like the comma after
the closing backet, before  "md[2]"   any ideas?  do I need to wrap
everything after 'raise' in another set of brackets?so it reads
like

raise ((eval "JS#{md[1]}Error"), md[2])

??

 (and if these things get stuff working, do I need to raise a jira
issue for this so we make sure to make these changes in the watir
source?  (point me at instructions for this if they exist, so I do it
'right'  I'm used to using Jira at work, but in my experience every
group has their own standards for how they want bugs filed)

On Dec 1, 11:12 am, "Paul Rogers" <[EMAIL PROTECTED]> wrote:
> try changing it to
>
> def initialize( *args )
>
> the * means that it takes a variable number of parameters as an niput
> to the method, I think youd use it like this
>
> def my_method( *args )
>
>     if args.length ==2
>         puts "arg[0] is " + arg[0]
>     else
>         puts "you didnt supply 2 args"
>     end
>
> end
>
> my_method( 2,3)     # produces arg[0] is 2
> my_method( 4,5,6)  # produces you didnt supply 2 args
>
> Paul
>
>
>
> On Mon, Dec 1, 2008 at 12:09 PM, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
> > OK so I went and looked..  it's not javascript
>
> > -=-=- snip-=-=
> > class Radio < RadioCheckCommon
> >  def initialize *args
>
> > =-=-=-= snip =-=-=-=
>
> > its the *  in *args  that's giving it a fit..   Now understand please
> > that my ruby coding skills are in their infancy..  and I've not gotten
> > into defining my own classes or subclassing or any of that.. so I've
> > no idea (other than it looks something like a C++ pointer, but I know
> > ruby doesn't have pointers) what in the world *args  is doing at that
> > point in the code..
>
> > Is this valid ruby code and I'm perhaps looking at a bug in ruby in
> > steel?    Is this something added really recently to ruby?  RiS comes
> > with ruby 186-25  (although I thought I updated this)
>
> > ruby-v reports   "1.8.6  (2007-09-24 patchlevel 111)"
> >  that should be the correct version for working with Watir 1.6.2
> > right?
>
> > On Dec 1, 10:32 am, "Paul Rogers" <[EMAIL PROTECTED]> wrote:
> >> heres my guess - the firewatir code uses lots of whats really
> >> javascript embedded in the ruby file. I think the parser is having  a
> >> hard time figuring out whats ruby and whats javascript
>
> >> If you poke around in the lines suggested by the parser, you might be
> >> able rearrange some of the code to better help the parser
>
> >> Paul
>
> >> On Mon, Dec 1, 2008 at 11:16 AM, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
> >> > I'm having a look at Ruby in Steel as a potential IDE for doing
> >> > testing automation with Watir.
> >> >  <http://www.sapphiresteel.com/>
>
> >> > Mostly because:
> >> >  1) all my devs use Visual Studio for their work, so it puts me on the
> >> > same platform, gives me good integration with our source control etc.
> >> >  2) Intellisense!!!   since I'm new to Watir and have not memorized
> >> > all the applicable methods for each object etc.. and also new to
> >> > ruby.  Well it just makes it a hell of a lot easier.
> >> >  3) awsome debugger
>
> >> > Firstly:  Has anyone else looked at this?  Does anyone else use it?
>
> >> > I could only find one reference here when searching this group.
>
> >> > Secondly, I'm having a problem:  It appears to get Intellisense
> >> > working, I have to add the watir code using their 'ruby librarian'
> >> > utilit

[wtr-general] Re: Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

Brett,

ACK  I'm still at babysteps level of ruby coding and you're trying to
turn me into a contributor aren't you ;)

ok ok  I'll read up on patches and such and see if I can manage to
submit something for this that doesn't totally screw up everything...

this is how it starts isn't it.  how you rope people into working on
open source stuff..  heh

 just wait.. I told Maura that there's docs here in need of work, and
since she's trying to move into doing more technical editing and
such.. I just might be able to  convince her to do a few re-writes of
things like the tutorial and such, to ah  you know, help her build up
a portfolio of work  

Paul,

thanks loads.   Where are you finding the documentation like that?  I
was looking in the ruby user's guide and the most I could find so far
in raise said that it took a single string parameter.. so I was
scratching my head wondering how that code even worked at all.

heh  OK  next error..
Unexpected token - "number ="   form.rb  line 135, column 15

 def flash number = 10

 I'm starting to sense a pattern here...  their parser doesn't seem to
be very good with the places that parenthesis are implied or optional

 So re wrote it as :
 def flash( number = 10 )#is that the style you folks like in
terms of where parethesis and spaces are place?)

and that got me past  that one and into  element.rb,  line 238 column
15 with exact same error.. (same code, same fix)

Next comes ie-class.rb   line 86  column 20

def initialize suppress_new_window=nil
  re-wrote as
def initialize( suppress_new_window=nil )

then  ie.class.rb  line 98  column 20

def self.start url=nil
   re-wrote as
def self.start( url=nil )

(bite me twice in same file, I start looking for more..  I find and
change

Line 104: def self.start_window url=nil
  into: def self.start_window( url=nil )

Line 129: def self.start_process url=nil
  into: def self.start_process url=nil

and  WOOT  'library generation complete'

but... grumble  intellisense is not working the way I'd expect..  ok
I'm off to the sapphiresteel forums to ask them about this...

Thanks for the help folks.
















On Dec 1, 11:59 am, "Paul Rogers" <[EMAIL PROTECTED]> wrote:
> the ri command ( ri Kernel#raise in this case ) shows
> -- Kernel#raise
>      raise
>      raise(string)
>      raise(exception [, string [, array]])
>      fail
>      fail(string)
>      fail(exception [, string [, array]])
> 
>      With no arguments, raises the exception in +$!+ or raises a
>      +RuntimeError+ if +$!+ is +nil+. With a single +String+ argument,
>      raises a +RuntimeError+ with the string as a message. Otherwise,
>      the first parameter should be the name of an +Exception+ class (or
>      an object that returns an +Exception+ object when sent an
>      +exception+ message). The optional second parameter sets the
>      message associated with the exception, and the third parameter is
>      an array of callback information. Exceptions are caught by the
>      +rescue+ clause of +begin...end+ blocks.
>
>         raise "Failed to create socket"
>         raise ArgumentError, "No parameters", caller
>
> which menas you could do as you describe - add brackets round it all.
>
> To submit a patch, open a jira ticket and do a diff of what you have
> compared to the current svn
> Im sure how to do that is described on the wiki or in this list
>
> Paul
>
>
>
> On Mon, Dec 1, 2008 at 12:55 PM, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
> > OK the putting that in 'brackets'  (sorry still think of those as
> > parenthesis, and [] as brackets..)  eliminated that error and got me a
> > new one..  (heh  isn't this fun)
>
> > Now the problem is on line 1078 column 39 of firefox.rb    another
> > unexpected token, this time a comma..
>
> > So I went and looked, here's the code in that area
>
> > --=-=-=-=- snip -=-=-=-=
> >   # 5/16/08 Derek Berner
> >    # Wrapper method to send JS commands concisely,
> >    # and propagate errors
> >    def js_eval(str)
> >      #puts "JS Eval: #{str}"
> >      $jssh_socket.send("#{str};\n",0)
> >      value = read_socket()
> >      if md=/^(\w+)Error:(.*)$/.match(value)
> >        eval "class JS#{md[1]}Error\nend"
> >        raise (eval "JS#{md[1]}Error"), md[2]
> >      end
> >      #puts "Value: #{value}"
> >      value
> >    end
> > --=-=-=-=-=- snip -=-=-=-
>
> > The problem is on the 'raise' line, it doesn't like 

[wtr-general] Re: Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

On Dec 1, 12:14 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> Please do note that all of the examples you've found so far represent
> correct Ruby code. In many cases with Ruby, parentheses are optional.
>
> It might be best if you reported your findings to the Ruby in Steel
> people so that they can fix their parser.
>

++

headed over there right now, to do just that.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir & Ruby in Steel

2008-12-01 Thread Chuck vdL

OK  posted a message in the forums over at SapphireSteel  regarding my
experience so far.

here's a link <http://sapphiresteel.com/forum/index.php?topic=303.0>
for any that are interested to follow along.

All in all I think if it will work, RubyInSteel could be a kick-ass
IDE for working with Ruby and Watir both.  I'm rather hoping that it's
something simple I've not done right and not a bug, but we will have
to see how the Sapphire people respond.

On Dec 1, 12:58 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
> On Dec 1, 12:14 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
>
> > Please do note that all of the examples you've found so far represent
> > correct Ruby code. In many cases with Ruby, parentheses are optional.
>
> > It might be best if you reported your findings to the Ruby in Steel
> > people so that they can fix their parser.
>
> ++
>
> headed over there right now, to do just that.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to find the value "blah..." within a listbox. Value is retrieved from excel cell

2008-12-01 Thread Chuck vdL

Is 'Blah" the actual value defined in the HTML for that listbox
item, or is perhaps the browser UI visually truncating something
longer down to what will fit in available space  for the way the
listbox is defined?

On Dec 1, 1:11 pm, Moochie <[EMAIL PROTECTED]> wrote:
> For some reason when I attempt to find a value in a listbox that
> contains three dots it doesn't find the value.
>
> Has anyone else seen this?
>
> Thanks,
>
> Darin
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to find the value "blah..." within a listbox. Value is retrieved from excel cell

2008-12-01 Thread Chuck vdL

Can you show us the HTML that defines the listbox and its items?

On Dec 1, 2:24 pm, "Darin Duphorn" <[EMAIL PROTECTED]>
wrote:
> The actuall value is "Filter by Coach..."
>
> The ... That follow the work coach are displaying as á.
>
> I believe in excel that ... Means á
>
> Not sure though.
>
>
>
> -Original Message-
> From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> Chuck vdL
> Sent: Monday, December 01, 2008 4:18 PM
> To: Watir General
> Subject: [wtr-general] Re: Unable to find the value "blah..." within a 
> listbox. Value is retrieved from excel cell
>
> Is 'Blah" the actual value defined in the HTML for that listbox item, or 
> is perhaps the browser UI visually truncating something longer down to what 
> will fit in available space  for the way the listbox is defined?
>
> On Dec 1, 1:11 pm, Moochie <[EMAIL PROTECTED]> wrote:
> > For some reason when I attempt to find a value in a listbox that
> > contains three dots it doesn't find the value.
>
> > Has anyone else seen this?
>
> > Thanks,
>
> > Darin- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click the ► on the page?

2008-12-02 Thread Chuck vdL

There was another thread here in the last week on just this same sort
of thing.  try reading this thread, which I think had sample code and
all  

You'll need to fire the onclick event for that object, you can see in
the HTML section you hilighted in your screenshot that's what's
causing things to happen when the object is clicked

On Dec 2, 7:43 am, "wesley chen" <[EMAIL PROTECTED]> wrote:
> Please see the picture enclosed.
> There is an text arrow on the page, when click the icon, another table will
> turn up, but how to click such a text arrow?
>
> Any suggestion would be appreciated.
>
> Thanks.
> Wesley Chen.
>
>  arrow2.jpg
> 260KViewDownload
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Updating RubyForge info for Watir?

2008-12-02 Thread Chuck vdL

Is this on the todo list?

I was just there and noticed that  the info still indicates it's
windows only, ie only, there's no release notice for 1.6.2 under
'latest news,  and is the development status still actually considered
to be 'beta' ?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Clicking tabs has no effect

2008-12-05 Thread Chuck vdL

try mouseup instead of mousedown..

some webdevs seem to like to use two events, one to take care of the
visual effect when you 'press' the button down, and another than
actually makes things happen when the mouse button is released.  (a
side effect of this btw is that if a user 'slides' off the control
with the mouse button down, and then releases it, nothing happens..
depending on your viewpoint that can be a good or bad thing)

You can generally get a good idea of what's going on by looking at the
code and the names of the functions that are called when the events
associated with that element on the page are fired..  if you see an
event calling a function named something like 'flash' or 'hilight' or
somesuch, (really common with mouseover events) it's a good bet all
that's happening is a visual effect rendered by the browser.. Look for
a function with a name that would tend to indicate something more uh
'eventful' is going on, such as "changetab" or "opendiv".. (actual
names of functions depend on your own dev's conventions etc)


On Dec 4, 1:38 am, LiquidBeard <[EMAIL PROTECTED]> wrote:
> This again causes it to flash yellow but with no effects in the
> browser.
>
> The DOM source shows the cell in question to look like this:
>
>  align="center">Working/Non-Working
>
> On Dec 3, 8:20 pm, al3kc <[EMAIL PROTECTED]> wrote:
>
>
>
> > Try ie.cell(:id, "tab2").fireEvent("onmousedown")- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir & Ruby in Steel

2008-12-05 Thread Chuck vdL

Hmm  something else just occured to me, when I installed Watir it
pulled down a bunch of gems with it.  I wonder if I need to use their
librarian utlitity to add ALL the ruby code in all of these gems to
the library?

If so, would this list be complete?

activesupport-2.2.2
xml-simple-1.0.11
rubyforge-1.0.1
rake-0.8.3
hoe-1.8.2
s4t-utils-1.0.4
builder-2.1.2
user-choices-1.1.6
commonwatir-1.6.2
firewatir-1.6.2
watir-1.6.2



On Dec 1, 2:15 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
> OK  posted a message in the forums over at SapphireSteel  regarding my
> experience so far.
>
> here's a link <http://sapphiresteel.com/forum/index.php?topic=303.0>
> for any that are interested to follow along.
>
> All in all I think if it will work, RubyInSteel could be a kick-ass
> IDE for working with Ruby and Watir both.  I'm rather hoping that it's
> something simple I've not done right and not a bug, but we will have
> to see how the Sapphire people respond.
>
> On Dec 1, 12:58 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 1, 12:14 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
>
> > > Please do note that all of the examples you've found so far represent
> > > correct Ruby code. In many cases with Ruby, parentheses are optional.
>
> > > It might be best if you reported your findings to the Ruby in Steel
> > > people so that they can fix their parser.
>
> > ++
>
> > headed over there right now, to do just that.- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to pick amount from the script

2008-12-09 Thread Chuck vdL

it's possible the regular expression isn't matching ..

The first thing I'd do to debug is remove the split  and just puts ksh
to see what you 'have' in the string before you try to split it.

eg  for debugging purposes try

if $ie.div(:text, /Balance:/).exists?
ksh = $ie.d(:text, /Balance:/).txt
puts ksh
end

You could even add an else to the if  that did something like 'puts
ksh div not found'

That should tell you if it's findinging the target div, and if it is,
what string is being extracted using that regular expression..

That should tell you if it's finding what you want, and able to
extract the right stuff into the string.  Then you can figure out how
to split the string.

-
 If this advice is way below your level of scripting/programming
skill, then you need to be more specific when you say 'is not
working'  in terms of what is actually happening, and what you've
tried in terms of debugging.

 (consider how you would feel if someone came to you to try and
diagnose/fix/repro and issue and all you had to work with is "this is
not working")

--Chuck

On Dec 9, 12:12 am, Divya <[EMAIL PROTECTED]> wrote:
> Sir,
>
> This is not working.
> Kindly help me out on this.
> thanks
> divya
>
> On Dec 5, 7:03 pm, Moochie <[EMAIL PROTECTED]> wrote:
>
>
>
> >  if $ie.div(:text, /Balance:/).exists?
> >     ksh = $ie.d(:text, /Balance:/).text.split(" ")
> >     puts ksh[2]
> > end
>
> > On Dec 5, 4:51 am, Divya <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > View Source is like this:
>
> > > 
> > >                         
> > >                         Sent to: -nn Amount: Ksh 
> > > 100.00Date: 05/12/2008
> > > 03:41 PMMessage: Transaction ID: 73538Balance: Ksh
> > > 7487.68
>
> > > 
>
> > > I want to pick that amount Ksh 100 from the script.
>
> > > Iam New to WATIR can please anyone help me in this regard.
>
> > > Thanks
> > > divi- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to pick amount from the script

2008-12-09 Thread Chuck vdL

gah  just noticed typo in the below..   the method is of
course .text   not .txt as I've typed it

On Dec 9, 1:20 pm, Chuck vdL <[EMAIL PROTECTED]> wrote:
> it's possible the regular expression isn't matching ..
>
> The first thing I'd do to debug is remove the split  and just puts ksh
> to see what you 'have' in the string before you try to split it.
>
> eg  for debugging purposes try
>
> if $ie.div(:text, /Balance:/).exists?
>     ksh = $ie.d(:text, /Balance:/).txt
>     puts ksh
> end
>
> You could even add an else to the if  that did something like 'puts
> ksh div not found'
>
> That should tell you if it's findinging the target div, and if it is,
> what string is being extracted using that regular expression..
>
> That should tell you if it's finding what you want, and able to
> extract the right stuff into the string.  Then you can figure out how
> to split the string.
>
> -
>  If this advice is way below your level of scripting/programming
> skill, then you need to be more specific when you say 'is not
> working'  in terms of what is actually happening, and what you've
> tried in terms of debugging.
>
>  (consider how you would feel if someone came to you to try and
> diagnose/fix/repro and issue and all you had to work with is "this is
> not working")
>
> --Chuck
>
> On Dec 9, 12:12 am, Divya <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sir,
>
> > This is not working.
> > Kindly help me out on this.
> > thanks
> > divya
>
> > On Dec 5, 7:03 pm, Moochie <[EMAIL PROTECTED]> wrote:
>
> > >  if $ie.div(:text, /Balance:/).exists?
> > >     ksh = $ie.d(:text, /Balance:/).text.split(" ")
> > >     puts ksh[2]
> > > end
>
> > > On Dec 5, 4:51 am, Divya <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
> > > > View Source is like this:
>
> > > > 
> > > >                         
> > > >                         Sent to: -nn Amount: Ksh 
> > > > 100.00Date: 05/12/2008
> > > > 03:41 PMMessage: Transaction ID: 73538Balance: Ksh
> > > > 7487.68
>
> > > > 
>
> > > > I want to pick that amount Ksh 100 from the script.
>
> > > > Iam New to WATIR can please anyone help me in this regard.
>
> > > > Thanks
> > > > divi- Hide quoted text -
>
> > - Show quoted text -- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: set watir_browser=ie is not working

2008-12-11 Thread Chuck vdL

The set option is a nice way to be able to run the very same script
against both browsers without having to edit the script itself.   e.g.
run in one system set for IE, and it uses IE, run it on another system
set for firefox, and it uses firefox..

but speaking of that, if both are used, which takes precidence?   If
you try to use (or accidentially end up using) both the environment
variable and the inscript .default= at the same time, which one wins?
(or do we file that under 'bad ideas' along with crossing the streams
or sneaking up on a piersons puppeteer from behind and suprising
them)?

On Dec 10, 9:55 pm, Margam <[EMAIL PROTECTED]> wrote:
> Thanks for the reply and explanation.
>
> The
> Watir::Browser.default = 'ie'
> and
> Watir::Browser.default = 'firefox'
> lines in my Ruby script worked fine.
> Will try the set lines also.
>
> On Dec 10, 7:40 pm, marekj <[EMAIL PROTECTED]> wrote:
>
>
>
> > set watir_browser=ie lines are 'environment variables' you would set at the
> > command line and not in your ruby script.
> > On the spage page on the wiki it shows you how to set the browser in Ruby
> > code.
> > Watir::Browser.default = 'ie'
> > or
> > Watir::Browser.default = 'firefox'
> > keep expermimenting.
>
> > marekj | Semantic Page Objects Automation
>
> > Watirloo: Browser Page Helper 
> > Frameworkhttp://www.bitbucket.org/marekj/watirloo/
> > for IE, Firefox and others?
>
> > On Wed, Dec 10, 2008 at 6:45 PM, Margam <[EMAIL PROTECTED]> wrote:
>
> > > HI All,
> > > I am trying to write one script that will work on both IE and FF. As
> > > per the link:
> > >http://wiki.openqa.org/display/WTR/Browser.new
>
> > > I am trying to use the "set watir_browser=ie" command and
> > > Watir::Browser.new
>
> > > The code is :
> > > --
> > > require 'rubygems'
> > > require 'watir'
>
> > > set watir_browser=ie
> > > browser = Watir::Browser.new
> > > browser.goto("http://www.hotmail.com";)
> > > --
>
> > > But keep getting the following error:
> > > -
> > >  undefined method `set' for main:Object (NoMethodError)
> > > -
> > > What am I doing wrong? Should I require any other library?
>
> > > Thank you.
> > > Margam- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Does Watir support

2009-01-03 Thread Chuck vdL

>>5.Can be used for Load Testing?

 ok I'm gonna get up on a soapbox for a moment.

THIS is a bogus requirement.  If you want to say "simple" or
"rudimentary" loadtesting then I can accept it, but ANY tool maker
that claims their tool is good for both functional testing at the UI
level, and can ALSO function as a 'true' loadtesting tool either
doesn't understand loadtesting, or is just flat out lying to you.

The targets of these two things are vastly different, and the needs
are very different..  a functional test tool focusses on emulating a
single user driving the the way user's do, clicking on buttons,
inputting text in fields, etc..  it's looking at the function of the
UI and aims to do things like execute client side scripts, etc.   Such
a tool generally has to opeate at the UI level itself, not the
protocol level.  you need to emulate mouse clicks, typing, events like
mouseovers, and validate the client responds correctly.  You're also
looking to use different data for test for proper error handling, and
want things like the ability to do data driven tests etc.

A loadtesting tool aims at emulating the load upon a server or set of
servers ("system under test") from MANY users often over a period of
time, often emulating the peak load or a worst case load that may
involved thousands upon thousands of 'virtual users' hitting the SUT.
You don't care about client side code, and most often drive things at
the protocol level in order to allow a few physical systems to
generate those levels of load (something that is flat out impossible
if you are trying to drive multiple instances of a browser ).  You
need controls for scaling up the load, monitoring and controlling how
many virtual users are running at once, running multiple scenarios at
once (new users signing up, existing users doing transactions, etc)
AND the whole time you are doing that you want integrated montoring of
performance counters from all the systems under test (and the systems
generating the load).  You are looking to discover the capacity of the
system, or find problems in system design, scalability etc.

FYI: For this level of loadtesting I'd recommend either Microsoft
Visual Studio Team System (either Test Edition or Team Suite edition)
or a product like LoadRunner.  The former will run you several
thousand, the latter can easily run from tens to hundreds of thousands
depending on your needs.  (I've heard of a few opensource or free
tools that claim to do loadtesting, but I've yet to personally see one
that will match the capabilities of either of those.  I welcome input
from others,familiar with good low cost loadtesting tools, but lets
not derail the discussion too far shall we?)

Now, a tool like Watir (which I LOVE for functional testing of web
based apps), and many other tools that work at the browser level can
do very simple loadtests, e.g. concurrency tests, or simulate a
handful of users hitting a system at the same time, but that's about
it, simply due to lmitations of doing such things at the browser
level.  They also don't have the integrated systems to do the
performance monitoring of the SUT, which ends up being very critical
in terms of figuring out what part of the system failed)

If someone is trying to sell you on a tool they claim does both
things, it's time to nail then down on specifics..  such as how many
virtual users can a single client system emulate?   For a true
loadtesting tool the answer is typically along the lines of "it
depends on the complexity of the scripts (which truely it does) but
typicaly around 600-1000 vusers per system (or more)"  Ask them what
kind of instrumentation of the SUT and load rig is provided.. what
performance counters are monitored, if you are alerted when counters
pass critical thresholds indicating a performance bottleneck.  And if
they start trying to give you a song and dance about their tool being
more 'realistic' because it's actually driving a ui, turn around and
walk away because that kind of thing is 100% snake oil! .. (because
the servers are responding to HTTP requests, and frankly there is NO
WAY for the servers to tell if the requests came from a tool like
VSTS, or a browser).

sorry for the tirade, but his is a pet peeve of mine.  You shouldn't
try to do loadtesting with a Functional test tool, any more than you
should use a wrench as a hammer.. (it might work sort of, in a pinch,
but you are not very likely to get the results you need)

--Chuck

On Jan 2, 12:43 am, Parul  wrote:
> Hi all,
> Can anyone help me in giving answers that which of these are supported
> by watir and which are not.Below are some project requirement:
>
> 1.Should support all type of Fonts.
> 2.Sturts2
> 3.Overlay Pages
> 4.Help Bubbles
> 5.Can be used for Load Testing?
> 6.Command Line, Batch Mode, Versioning
> 7.Tidal Invocation
> 8.Data Wizard(data bank)
> 9.Navigation should support by two ways
>     1)By programmatically and clicking buttons [ Index wise, position
> wise]
> 10.Fault Tolera

[wtr-general] Re: Does Watir support

2009-01-04 Thread Chuck vdL

That's a great tip Alex, and yeah that will work for really simple
stuff that doesn't have any kind of session or user id..  However,
once you login a user and start playing with session id's, or any
ASP.NET stuff designed to prevent plaback spoofing (like viewstate)
you get hosed unless the thing you are using allows you to capture
stuff from responses, and insert it into specific places in the
requests.  You'll also need the ability to read from datafiles to
substitute things like userid and login, at the HTTP level.
Otherwise you're going to have to use multiple threads and multiple
browser instances and run the stuff in watir directly where the
browser takes care of the ASP, cookies, and other session stuff, and
watir can deal with parameters for things like userid's and passwords.

The thing is, anything not dealing with sessions and transactions
(e.g. hitting db and/or middle tier) really doesn't tend to be that
'interesting' in terms of loadtests (since most of the data is static
and cached)  So in general (presuming you don't have issues with
something like oh your homepage when a new user hits it) most of the
things you could do via simple http capture and playback are not
normally the things that cause load issues..  so it's good for really
basic tests, but again not terribly useful for most serious
loadtests.


On Jan 4, 3:35 am, Alex Collins  wrote:
> On 4 Jan 2009, at 07:13, Chuck vdL wrote:
>
>
>
> >>> 5.Can be used for Load Testing?
>
> Following from Chuck's points which are all valid, I have had success  
> in using WATIR to write the script for a load test.
>
> Having written the script doing what you would like, play this into  
> jmeter using the proxy server and use jmeter to perform the load  
> generation. This captures the HTTP traffic for later playback.
>
> You normally still have to do some additional work in adapting the  
> jmeter script depending upon technologies in use and what you wish to  
> achieve.
>
> You will not get the same analysis tools as you might with the  
> commercial products, but the tools are free.
>
> Alex
--~--~-~--~~~---~--~~
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] Preference for where to put example improvements?

2009-03-10 Thread Chuck vdL

I've been playing with the CLReport example html reporting class, I've
added the concept of a 'blocked' test (e.g. if you were going to check
the URL of a link, but the link doesn't exist)

 and also have what I think might be slightly more useful examples of
how to use it (by creating a 'validate' function )

Would the local 'lifeguards' preference be for me to edit the existing
wiki example,  or create a new one?

--Chuck

You can invoke:  tester.leadto(knowledge.location)
but unfortunately: tester.drink()
is a private method
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---