[wtr-general] Name of the currently running methods

2009-04-06 Thread Vikas Tulashyam

Hi,
Can I get the name of the currently running methods with the class and
package name. like--

class A

def method()
  puts nameofThecurrentMethod

end

end


let suppose there is a method nameofThecurrentMethod which prints the
name of the currently running method. Is it possible in Watir?

Thanks
vikas
--~--~-~--~~~---~--~~
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: Test Automation? Pashaw!

2009-04-06 Thread Alister Scott

You could always define your tests in a wiki and update the results
directly to there!
A good way to get everyone involved in what you are running and what
the results are.
Some more info on my blog: http://watirmelon.wordpress.com/category/wiki/
(shameless plug!)

Cheers,
Alister Scott
Brisbane, Australia
http://watirmelon.wordpress.com/

On Apr 7, 10:59 am, George  wrote:
> Good tips, Chuck.  We currently have SharePoint (although we're
> getting rid of it in the future...not sure why, though), so I'll need
> to figure out how to link the HTML report from there.  I'll look into
> this...thanks!
>
> On Apr 6, 1:21 pm, Chuck van der Linden  wrote:
>
> > write the results to HTML on a network share everyone can access, send
> > mail when the test finishes that the results are available (or better
> > yet embed the report in the mail)..    or link to it from sharepont or
> > your team wiki or whatever collaboration tools you are using.
>
> > (see the html reporting class in the examples for a starting point)
>
> > Run them really frequently (like if there is an automated nightly
> > 'full build') so you catch a problem as soon after it occurs as
> > possible.
>
> > Then pray to your favored god(s) that a dev messes up and the tests
> > expose the problem, because the instant that happens, management
> > starts to see the value in what you've done.   Seeing the tests pass
> > is a 'feel good' and gives managers a nice 'warm fussy' feeling, but
> > demonstrating that they can catch a regression that might have
> > otherwise gone out the door is a whole level better than that.
> > (because that kind of mistake can be potentially costly)
>
> > The best way to silence naysayers is with results.   If the results
> > happen to be a nicely formatted HTML page, with the company logo on
> > it, and nice color coded PASS and FAIL stuff, so much the better since
> > managers eat that stuff up.
>
> > The more visible your work is, (providing you are doing good work) the
> > higher up the food chain in your org, the more likely you are to get
> > support for what you are doing.
>
> > On Apr 6, 9:54 am, George  wrote:
>
> > > Right now, I'm creating simple regression tests that we can run after
> > > every patch/version update.  And, you're right - there isn't much of a
> > > chance of these tests failing.  We're automating this because it's
> > > boring to do manually.
>
> > > As far as the quick win, I have already completed quite a few scripts
> > > for a couple of our web apps.  My manager has actually been great as
> > > far as being an advocate.  The challenge for me as a beginner is that
> > > I'm constantly seeing ways I can refactor the code to make it better,
> > > or add functionality (such as writing the results to an Excel file),
> > > so I may be working a little too long on these.  Perhaps with the
> > > introduction of the Watircraft framework, the process of writing
> > > scripts can be a little more streamlined.
>
> > > Truth be told, I actually don't mind the unpaid overtime.  Learning
> > > Ruby/Watir is a lot of fun and it doesn't even seem like work to me.
> > > It's just unfortunate that official work time can't be alloted to this
> > > effort.
>
> > > On Apr 5, 5:11 pm, Chuck van der Linden  wrote:
>
> > > > I've run into both.  I've seen orgs where the mandate 'automate
> > > > everything' came down and everyone had to become a SDET (software
> > > > development engineer in test) or find other work somewhere else.
> > > > I've also seen places that having been burned by automation snake oil
> > > > (see stuff by james bach for good examples of this) and there was a
> > > > strong mindset of 'automation doesn't work'
>
> > > > I my mind it's just a tool, a powerful tool if used wisely, but an
> > > > expensive and frustrating one if not used properly.   In terms of
> > > > tools, if manual testing is a drill, then automation is a hammer.
> > > > while it might be possible to somehow use one to do the job of the
> > > > other, it's not generally the best idea.
>
> > > > It seems to me that you are in a trap.  You've been given a task but
> > > > not empowered to complete the task.  That's frankly not fair to you,
> > > > as you are being setup in a situation where you have to work basically
> > > > unpaid overtime or fail in your goals.
>
> > > > One potential way out is to get yourself a quick win, demonstrate some
> > > > success with automation (and learn the time it takes you to do it) and
> > > > then demand that they either give you the time or remove the task,
> > > > since you are in a no-win situation otherwise.
>
> > > > Testing automation works best IMHO in one of the following situations
>
> > > > 1) same test repeated frequently  e.g daily unit tests, build
> > > > validation tests, acceptance tests (if you are using them as a way to
> > > > track progress and show what's working and what's not instead of just
> > > > at the end)
> > > > 2) same test repeated with different data:  e.g. 

[wtr-general] Re: FireWatir 1.6.2 unittests don't run

2009-04-06 Thread Paul Carvalho

I opened Jira ticket #WTR-301 to address the problem.  I'll look over
the wiki information again and see what I can do to help clarify the
steps to get up and running until the problem is addressed in a future
gem release/install.  The present wiki information seems to be really
geared towards developers, which is a big turn-off for me. ;)

Cheers.  Paul C.

(BTW, I apologised to Al off-list for my prior post.  I didn't mean to
harsh on him.. I was just frustrated at the time I spent trying to
resolve the problem when the only advice I could find on the wiki said
that I need to "Get the source code and unit tests from SVN."  To me,
asking a tester to install development tools to retrieve development
source to make something work just seems like the wrong way to go, you
know?  Ah well, such is life sometimes in the Open Source world. ;)
Keep moving forward.)


On Apr 6, 11:27 am, Bret Pettichord  wrote:
> Paul,
>
> Could you update the wiki with this information please?
>
> Bret


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



[wtr-general] Re: Where to run the script

2009-04-06 Thread spike

it worked, thanks a lot


On Apr 6, 5:07 pm, Željko Filipin 
wrote:
> On Mon, Apr 6, 2009 at 13:58, spike  wrote:
> > include Watir
>
> Remove this from your script and try again.
>
> > no such file to
> > load -- safariwatir (MissingSourceFile)
>
> Not sure how you got this error message. Maybe "include Watir" causes it.
>
> Željko
--~--~-~--~~~---~--~~
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: Where to run the script

2009-04-06 Thread spike

it worked, thanks a lot

On Apr 6, 5:05 pm, Angrez Singh  wrote:
> remove Include Watir line from your file
>
> - Angrez
>
>
>
> On Mon, Apr 6, 2009 at 5:28 PM, spike  wrote:
>
> > i'm not able to run the script from SciTE. I typed in the following
> > script saved it and clicked F5.
> > require 'Watir'
> > include Watir
> > ie = Watir::IE.new
> > ie.goto "http://www.google.com/";
> > ie.url == "http://www.google.co.in/";
>
> > In the output panel I'm getting the following data
>
> > >ruby startgoogle.rb
> > C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> > core_ext/module/introspection.rb:70:in `const_get': no such file to
> > load -- safariwatir (MissingSourceFile)
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:70:in
> > `local_constants'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:70:in `each'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:70:in
> > `local_constants'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:68:in `each'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:68:in
> > `local_constants'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/core_ext/module/introspection.rb:86:in
> > `local_constant_names'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/dependencies.rb:498:in `new_constants_in'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > active_support/dependencies.rb:495:in `collect'
> >         ... 6 levels...
> >        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > `gem_original_require'
> >        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > `require'
> >        from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:82
> >        from startgoogle.rb:3
> > >Exit code: 1
>
> > Is this a error in the application?
> > please suggest me if any installation or any error inthe code i've
> > written
>
> > On Apr 6, 4:14 pm, Željko Filipin 
> > wrote:
> > > On Mon, Apr 6, 2009 at 12:58, spike  wrote:
> > > > I'm using watir tool currently i'm running the script in Command
> > > > prompt. Is it the right way? or should i run the script in SciTE.
>
> > > I am running Watir scripts from command prompt for years. Works just
> > fine. I
> > > have tried to run them from Scite and Netbeans and they worked there too.
> > At
> > > the end, it is your choice.
>
> > > Do you have any problems when running scripts from command prompt or
> > Scite?
>
> > > Željko- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to Drag and Drop a DIV element in Watir

2009-04-06 Thread Satish Jantli
Hi Chuck,

Thanks for your suggestion, i will try fireEvent and let you know, even i
will take to dev if they can help me out with this.

regards,
jonty

On Tue, Apr 7, 2009 at 5:05 AM, Chuck van der Linden wrote:

>
> if divs are draggable around the screen it's due to javascript running
> on the client, since that's not a normal behavior in an html page all
> on it's own.
>
> You should probably talk to your devs to find out how it's being
> done.   I suspect you might end up having to do something like firing
> the mousedown event on the div to drag, and then maybe mousemove
> events, and then a mouse-up event to put it down.
>
> I'll soon be dealing with something similar, so I anticipate sharing
> your pain.
>
> On Apr 6, 2:56 am, Jonty  wrote:
> > Hi All,
> >
> > I want your help to findout how should I Automate Drag and Drop a
> >  element to another  element (other than using JavaScript)
> >
> > HTML code:
> > 
> >
> > destination:
> > 
> >
> > i tried the following but it didnt work:
> >
> > ie.text_field(:id, "ext-gem-532").dragContentsTo(:id, "ext-gem-616")
> >
> > ERROR: unknown property or method 'select'
> >
> > Thanks in advance,
> > Jonty
> >
>


-- 
Thanks & regards,
Satish Jantli
Enterprise Quality Center
Borland
2 International Business Park
Singapore 609930
(65) 6725-6908 Direct
www.borland.com

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



[wtr-general] Re: Flash with watir

2009-04-06 Thread Anna Gabutero

Also, keep in mind that FlashWatir is not a universal solution to
testing Flash.  It can only see the functions that the Flash app chooses
to expose to JavaScript.  So testing a random app on the web isn't
likely to work; testing an in-house app will require talking to your
developers about exposing the needed functions.

See this link for more info:
http://code.google.com/p/flash-watir/wiki/ExternalInterface

- Anna

In other words, you'll need cooperation from the 
On Mon, Apr 06, 2009 at 01:41:57PM -0700, Chuck van der Linden wrote:
> 
> For FlashWatir support, you'd probably be best off contacting the
> developer of flashwatir directly since I don't see that they have a
> forum or anything listed on the google code page for it.
> 
> Your example below appears to be just a slightly edited version of
> their generic example code,  Most likely the flash element that you
> are trying to access has an ID other than 'clickcolors' which is why
> it's not found.
> 
> If you dont' understand how identifying page elements and such works,
> I'd strongly recommend you work through the watir tutorial (http://
> wiki.openqa.org/display/WTR/Tutorial).   Without a basic understanding
> of what's going on, you won't know what things need to change (like
> how objects on the page are identified) in order to experience
> anything but failure when you try to utilize sample code in the way
> you are.
> 
> On Apr 6, 11:14 am, kiran  wrote:
> > Hi all,
> > Is it posible to test flash on the web?
> > I am using following code
> >
> > # include the controller
> > require 'flash_watir'
> > include FireWatir
> > # create an instance of the controller
> > browser = Firefox.new
> > # go to the flash page you want to test
> > browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html')
> > sleep(3)
> > # call the default methods available in flash
> > percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded
> >
> > but i am getting the below erroe.>ruby flash.rb
> >
> > C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
> > flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
> > "clickcolors" (Watir::Exception::UnknownObjectException)
> >         from flash.rb:10
> >
> >
> >
> > >Exit code: 1- Hide quoted text -
> >
> > - Show quoted text -
> > 
> 
> 
> Use the link below to report this message as spam.
> https://lavabit.com/apps/teacher?sig=539281&key=2513201441
> 


--~--~-~--~~~---~--~~
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: Test Automation? Pashaw!

2009-04-06 Thread George

Good tips, Chuck.  We currently have SharePoint (although we're
getting rid of it in the future...not sure why, though), so I'll need
to figure out how to link the HTML report from there.  I'll look into
this...thanks!



On Apr 6, 1:21 pm, Chuck van der Linden  wrote:
> write the results to HTML on a network share everyone can access, send
> mail when the test finishes that the results are available (or better
> yet embed the report in the mail)..    or link to it from sharepont or
> your team wiki or whatever collaboration tools you are using.
>
> (see the html reporting class in the examples for a starting point)
>
> Run them really frequently (like if there is an automated nightly
> 'full build') so you catch a problem as soon after it occurs as
> possible.
>
> Then pray to your favored god(s) that a dev messes up and the tests
> expose the problem, because the instant that happens, management
> starts to see the value in what you've done.   Seeing the tests pass
> is a 'feel good' and gives managers a nice 'warm fussy' feeling, but
> demonstrating that they can catch a regression that might have
> otherwise gone out the door is a whole level better than that.
> (because that kind of mistake can be potentially costly)
>
> The best way to silence naysayers is with results.   If the results
> happen to be a nicely formatted HTML page, with the company logo on
> it, and nice color coded PASS and FAIL stuff, so much the better since
> managers eat that stuff up.
>
> The more visible your work is, (providing you are doing good work) the
> higher up the food chain in your org, the more likely you are to get
> support for what you are doing.
>
> On Apr 6, 9:54 am, George  wrote:
>
> > Right now, I'm creating simple regression tests that we can run after
> > every patch/version update.  And, you're right - there isn't much of a
> > chance of these tests failing.  We're automating this because it's
> > boring to do manually.
>
> > As far as the quick win, I have already completed quite a few scripts
> > for a couple of our web apps.  My manager has actually been great as
> > far as being an advocate.  The challenge for me as a beginner is that
> > I'm constantly seeing ways I can refactor the code to make it better,
> > or add functionality (such as writing the results to an Excel file),
> > so I may be working a little too long on these.  Perhaps with the
> > introduction of the Watircraft framework, the process of writing
> > scripts can be a little more streamlined.
>
> > Truth be told, I actually don't mind the unpaid overtime.  Learning
> > Ruby/Watir is a lot of fun and it doesn't even seem like work to me.
> > It's just unfortunate that official work time can't be alloted to this
> > effort.
>
> > On Apr 5, 5:11 pm, Chuck van der Linden  wrote:
>
> > > I've run into both.  I've seen orgs where the mandate 'automate
> > > everything' came down and everyone had to become a SDET (software
> > > development engineer in test) or find other work somewhere else.
> > > I've also seen places that having been burned by automation snake oil
> > > (see stuff by james bach for good examples of this) and there was a
> > > strong mindset of 'automation doesn't work'
>
> > > I my mind it's just a tool, a powerful tool if used wisely, but an
> > > expensive and frustrating one if not used properly.   In terms of
> > > tools, if manual testing is a drill, then automation is a hammer.
> > > while it might be possible to somehow use one to do the job of the
> > > other, it's not generally the best idea.
>
> > > It seems to me that you are in a trap.  You've been given a task but
> > > not empowered to complete the task.  That's frankly not fair to you,
> > > as you are being setup in a situation where you have to work basically
> > > unpaid overtime or fail in your goals.
>
> > > One potential way out is to get yourself a quick win, demonstrate some
> > > success with automation (and learn the time it takes you to do it) and
> > > then demand that they either give you the time or remove the task,
> > > since you are in a no-win situation otherwise.
>
> > > Testing automation works best IMHO in one of the following situations
>
> > > 1) same test repeated frequently  e.g daily unit tests, build
> > > validation tests, acceptance tests (if you are using them as a way to
> > > track progress and show what's working and what's not instead of just
> > > at the end)
> > > 2) same test repeated with different data:  e.g. combinatorial testing
> > > (like testing the word 'font settings' ui), or testing an input field
> > > with a large number of 'valid' vs 'invalid' values to see that they
> > > are all properly accepted or rejected.
> > > 3) not humanly feasable or possible (loadtesting, performance testing)
> > > 4) Utiities to save time (does it take 2 hours to setup your test env
> > > and load it with data?  automate it) or improve testing process (is
> > > the environment setup complicated with ots of settings that need to 

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-06 Thread satish

Its actually just text not a link.

My table  has columns 'Agency', City, State. Each row will have data
populated. I will have to select a row based on the 'Agency' I want,
then only the "OK" button will get Enabled. Once I select a 'Agency' I
could select "OK" button.

Thanks
Satish

On Apr 6, 6:56 pm, Chuck van der Linden  wrote:
> is there something more inside the cell than just the text?   because
> normally 'selecting' a table cell does nothing.  If there's something
> in there that you can act on, maybe you should try to address that
> element, using (:text, 'textyouknow) to identify it.
>
> If you need to be sure it's inside the table you can specify it that
> way (again just like nested tables or frames)
>
> e.g if it was a link, then
>
> browser.table().link(:text, 'textIknow').click
>
> by the way I do the same kind of thing with divs..  say that the same
> link "about" appears in both a standard footer, and a page specific
> header, both of which are defined as divs, you can do things like this
> to make sure you are looking at or working with the correct one
>
> browser.div(:id, 'navheader').link(:text, 'about')
> browser.div(:id, 'footer').link(:text, 'about')
>
> On Apr 6, 3:27 pm, satish  wrote:
>
>
>
> > I have atableinside that I have 3X3 rows/columns.
> > I need to select a cellbasedontext.
>
> > Please tell me how to deal with this.
>
> > HTML tag for the cell is attached under TD tag as #text
> > Ex:-
> > 
> > 
> > Wilmington 
> > 
> > 
>
> > Thank you very much.
>
> > Appreciate your help.
> > Satish- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: how to work with inner tags like td etc..

2009-04-06 Thread Chuck van der Linden

answered in other thread

On Apr 6, 3:25 pm, satish  wrote:
> I have one more question please.
>
> I have a table inside that I have 3X3 rows/columns.
> I need to select a cell based on text.
>
> Please tell me how to deal with this.
>
> HTML tag for the cell is attached under TD tag as #text
> Ex:-
> 
> 
> Wilmington 
> 
> 
>
> On Apr 6, 4:50 pm, Chuck van der Linden  wrote:
>
>
>
> > does the outer table had a good way to identify it?  does the inner
> > table exist inside a specific cell of the outer table?
>
> > You might try using .flash to see if you can sort of work your way in
> > from the outside.
>
> > Potentially (this is theory, I've got no good site I can think of to
> > hit and see if this works) you might end up doing something like is
> > sometimes done with frames
>
> > browser.table(:id, 'outertable')[1][1].table(:index, 1)[1][1].text
>
> >   the [1][1] values above likely have to change to indicate the row
> > and column inside the table that contain the thing you want, be it the
> > inner table, or the cell in the inner table that contains the text you
> > want.
>
> > On Apr 6, 12:06 pm, satish  wrote:
>
> > > I apologise for my questions, I am very new to this watir tool.
> > > ---­­­-
> > > 
> > > 
> > >  > > style="color:#99;font-size:14pt;width:100%;">Login To Agency
> > > 
> > > 
> > > 
> > > Here I have to get the name in side the table, as you can see there is
> > > no id or name associated with it.
> > > I tried using 'innerText' but down side with that is since this table
> > > is part of other tables I am getting large data I do not need.
> > > I realised I can not use td tag like table to my code.
>
> > > Can any one suggest a better way to deal with this?
> > > Is there any documentation of all the HTML tags supported, how to use
> > > them etc?
>
> > > Appreciate your help.
>
> > > Thank you,
> > > Satish.- 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-06 Thread Chuck van der Linden

is there something more inside the cell than just the text?   because
normally 'selecting' a table cell does nothing.  If there's something
in there that you can act on, maybe you should try to address that
element, using (:text, 'textyouknow) to identify it.

If you need to be sure it's inside the table you can specify it that
way (again just like nested tables or frames)

e.g if it was a link, then

browser.table().link(:text, 'textIknow').click

by the way I do the same kind of thing with divs..  say that the same
link "about" appears in both a standard footer, and a page specific
header, both of which are defined as divs, you can do things like this
to make sure you are looking at or working with the correct one

browser.div(:id, 'navheader').link(:text, 'about')
browser.div(:id, 'footer').link(:text, 'about')

On Apr 6, 3:27 pm, satish  wrote:
> I have atableinside that I have 3X3 rows/columns.
> I need to select a cellbasedontext.
>
> Please tell me how to deal with this.
>
> HTML tag for the cell is attached under TD tag as #text
> Ex:-
> 
> 
> Wilmington 
> 
> 
>
> Thank you very much.
>
> Appreciate your help.
> Satish
--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-06 Thread Charley Baker
SemiOT: Javascript can also tend to cause memory leaks in browsers.
There are some best practices out there as well as a tool called jsleaks I
believe. If your pages are using js, then that's something to check into. It
could actually be a bug.

-c

On Mon, Apr 6, 2009 at 3:11 PM, Chuck van der Linden wrote:

>
> the big question is what's using the memory.  its it IE itself, or
> something else.   (you might be able to tell by using taskman, or
> better yet perfmon to look at privatebytes of a few things  while the
> script runs)
>
> On Apr 6, 1:57 pm, IDIEININIIS  wrote:
> > Thanks guys.
> >
> > @Darin,
> >
> > There actually is a puts statement and a counter, I just didn't add it
> > to the example code because puts seemed to be working fine (i.e. it
> > wasn't printing out super large amounts of text).
> >
> > @Chuck,
> >
> > I noticed that as well, that it starts to hog memory.
> > Closing and re-opening the browser after a set amount of iterations
> > sounds like it would work.
> > I'll try it tomorrow and let you guys know.
> >
> > On Apr 6, 5:28 pm, Chuck van der Linden  wrote:
> >
> >
> >
> > > I would also look for opportunities where you could close and re-open
> > > the browser.  IE can be a bit of a memory pig I've noticed, and if you
> > > are going to page after page after page with it, it will eventually
> > > grow to use a lot of memory.
> >
> > > if it really was the text method in watir (or some ie/windows code it
> > > is calling), you'd be able to demonstrate it by having a small loop
> > > with a lot of text method execution, but never navigate off the
> > > current page, and you'd be able to watch the memory used by the
> > > browser swelling as the loop executes.
> >
> > > On Apr 6, 12:52 pm, "Darin Duphorn" 
> > > wrote:
> >
> > > > I guess I would add a puts statement or add a counter to see which
> iteration it's failing on.
> >
> > > > -Original Message-
> > > > From: watir-general@googlegroups.com [mailto:
> watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
> > > > Sent: Monday, April 06, 2009 2:42 PM
> > > > To: Watir General
> > > > Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
> >
> > > > My bad, I meant to say "Here is the error message:".
> >
> > > > The line of code where the error originates from, basically looks
> like
> > > > this:
> >
> > > >ie.div(path).text
> >
> > > > The command is in a loop and 'path' is a variable.
> >
> > > > On Apr 6, 4:24 pm, "Dennis I."  wrote:
> > > > > Hi everyone,
> >
> > > > > I was running a script and after a while an IE message popped up
> > > > > saying it was out of memory.
> > > > > I believe it's a buffer overflow from using the text method a lot.
> >
> > > > > Here is the code:
> > > > > ---
> > > > > The remote procedure call failed.
> >
> > > > > from (eval):3:in `class_name'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:67:in `call'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:67:in `match?'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:43:in `locate'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:41:in `each'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:41:in `locate'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:40:in `catch'
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > locator.rb:40:in `locate'
> >
> > > > >  ... 7 levels...
> >
> > > > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > element.rb:115:in `text'
> > > > > ---
> >
> > > > > I'm new to Ruby as I learned it just to work with Watir.
> >
> > > > > Is there anyway how to prevent this error?- 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-06 Thread satish



I have a table inside that I have 3X3 rows/columns.
I need to select a cell based on text.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-


Wilmington 



Thank you very much.

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



[wtr-general] Re: how to work with inner tags like td etc..

2009-04-06 Thread satish

I have one more question please.

I have a table inside that I have 3X3 rows/columns.
I need to select a cell based on text.

Please tell me how to deal with this.

HTML tag for the cell is attached under TD tag as #text
Ex:-


Wilmington 



On Apr 6, 4:50 pm, Chuck van der Linden  wrote:
> does the outer table had a good way to identify it?  does the inner
> table exist inside a specific cell of the outer table?
>
> You might try using .flash to see if you can sort of work your way in
> from the outside.
>
> Potentially (this is theory, I've got no good site I can think of to
> hit and see if this works) you might end up doing something like is
> sometimes done with frames
>
> browser.table(:id, 'outertable')[1][1].table(:index, 1)[1][1].text
>
>   the [1][1] values above likely have to change to indicate the row
> and column inside the table that contain the thing you want, be it the
> inner table, or the cell in the inner table that contains the text you
> want.
>
> On Apr 6, 12:06 pm, satish  wrote:
>
>
>
> > I apologise for my questions, I am very new to this watir tool.
> > ---­­-
> > 
> > 
> >  > style="color:#99;font-size:14pt;width:100%;">Login To Agency
> > 
> > 
> > 
> > Here I have to get the name in side the table, as you can see there is
> > no id or name associated with it.
> > I tried using 'innerText' but down side with that is since this table
> > is part of other tables I am getting large data I do not need.
> > I realised I can not use td tag like table to my code.
>
> > Can any one suggest a better way to deal with this?
> > Is there any documentation of all the HTML tags supported, how to use
> > them etc?
>
> > Appreciate your help.
>
> > Thank you,
> > Satish.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: how to work with inner tags like td etc..

2009-04-06 Thread satish

You are wonderful. Thank you very very much for your help. :)
Satish


On Apr 6, 4:50 pm, Chuck van der Linden  wrote:
> does the outer table had a good way to identify it?  does the inner
> table exist inside a specific cell of the outer table?
>
> You might try using .flash to see if you can sort of work your way in
> from the outside.
>
> Potentially (this is theory, I've got no good site I can think of to
> hit and see if this works) you might end up doing something like is
> sometimes done with frames
>
> browser.table(:id, 'outertable')[1][1].table(:index, 1)[1][1].text
>
>   the [1][1] values above likely have to change to indicate the row
> and column inside the table that contain the thing you want, be it the
> inner table, or the cell in the inner table that contains the text you
> want.
>
> On Apr 6, 12:06 pm, satish  wrote:
>
>
>
> > I apologise for my questions, I am very new to this watir tool.
> > ---­­-
> > 
> > 
> >  > style="color:#99;font-size:14pt;width:100%;">Login To Agency
> > 
> > 
> > 
> > Here I have to get the name in side the table, as you can see there is
> > no id or name associated with it.
> > I tried using 'innerText' but down side with that is since this table
> > is part of other tables I am getting large data I do not need.
> > I realised I can not use td tag like table to my code.
>
> > Can any one suggest a better way to deal with this?
> > Is there any documentation of all the HTML tags supported, how to use
> > them etc?
>
> > Appreciate your help.
>
> > Thank you,
> > Satish.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Speeding up unit testing for Rails projects

2009-04-06 Thread Pete Dignan

Hi everyone.  There is a new startup here in Colorado that is doing
something pretty cool for Ruby/Rails development projects.  Full
disclosure - I have a (tiny) investment in the company and provide
advice to them from time to time.

Agile Developers may spend (waste?) up to an hour a day waiting for
unit test suites to run. Devver (http://devver.net/) runs your Ruby
Test::Unit test suites in the cloud, in 25% to 35% of the time it
would take on a single computer.  RSpec support is coming soon.

If you have a long-running Test::Unit test suite, Devver would like to
help you speed it up. By participating in their beta program, you can
try Devver for free. It's easy to set up and requires zero changes to
your source code.

If you are interested, please contact them here: contact at devver dot
net.

Pete
--~--~-~--~~~---~--~~
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: watir 1.6.2 installation problem

2009-04-06 Thread Chuck van der Linden

On Apr 4, 11:11 am, kiran  wrote:
> Thank you bret..its workinghow to use for for firefox
>

http://wiki.openqa.org/display/WTR/Browser.new

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

2009-04-06 Thread Chuck van der Linden

Your original script would probably work if you'd had the correct
value for the ID.

You were using the id of the DIV that contained the select list, when
you wanted the id value for the SELECT list itself

were you ripping the values from the code itself using view source, or
were you using the IE developer toolbar?  The toolbar makes it a
little clearer what page element you are looking at the properties
for.

On Apr 6, 5:10 am, spike  wrote:
> Ya that's ok, but wat is the script for selecting a value from the
> list.
>
> On Apr 6, 4:02 pm, JArkelen  wrote:
>
>
>
> > You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
> > id for the select, not the id of the label
>
> > On Apr 6, 12:09 pm, Angrez Singh  wrote:
>
> > > you are trying to access select_list using id of label. I think watir is
> > > right in not recognizing the element. Correct?
>
> > > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
>
> > > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not 
> > > select_list.
> > > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is 
> > > ID
> > > for select list so you should try
>
> > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
>
> > > - Angrez
>
> > > On Mon, Apr 6, 2009 at 3:26 PM, spike  wrote:
>
> > > > hello sir
>
> > > > I used ur solution but its not working i'm getting the following error
>
> > > > irb(main):011:0> ie.select_list(:id,
> > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > set("Select")
> > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > using :id, "
> > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > element.rb:52:
> > > > in `assert_exists'
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:63:in `select_item_in_select_list'
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:47:in `set'
>
> > > > On Apr 6, 11:35 am, spike  wrote:
> > > > > Hi
>
> > > > > The following is the code written for a check list.
>
> > > > >  > > > > align="right">
> > > > >                   > > > > class="dataentrylabelsStyle">Supervisor : > > > > class="cellInput"> > > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > > > class="stylenormalTextbox">
> > > > >                                          > > > value="--Select--">--Select--
> > > > >                                          > > > value="learner2">learner2
> > > > >                                          > > > value="learner1">learner1
> > > > >                                          > > > value="learner3">learner3
> > > > >                                          > > > value="user2">user2
> > > > >                                          > > > value="vinay">vinay
> > > > >                                          > > > value="user3">user3
> > > > >                                          > > > value="vinay1">vinay1
> > > > >                                          > > > value="user_1">user_1
>
> > > > > Now if i'm writing the command
> > > > > irb(main):021:0> ie.select_list(:id,
> > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > set("vinay")
>
> > > > > I'm getting the following error
>
> > > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > > using :id, "
> > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > element.rb:52:
> > > > > in `assert_exists'
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:63:in `select_item_in_select_list'
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:47:in `set'
>
> > > > > please suggest some solution we user .net technology for developing
> > > > > website.
>
> > > > > thankingyou- 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: IE out of memory error (buffer overflow)

2009-04-06 Thread Chuck van der Linden

the big question is what's using the memory.  its it IE itself, or
something else.   (you might be able to tell by using taskman, or
better yet perfmon to look at privatebytes of a few things  while the
script runs)

On Apr 6, 1:57 pm, IDIEININIIS  wrote:
> Thanks guys.
>
> @Darin,
>
> There actually is a puts statement and a counter, I just didn't add it
> to the example code because puts seemed to be working fine (i.e. it
> wasn't printing out super large amounts of text).
>
> @Chuck,
>
> I noticed that as well, that it starts to hog memory.
> Closing and re-opening the browser after a set amount of iterations
> sounds like it would work.
> I'll try it tomorrow and let you guys know.
>
> On Apr 6, 5:28 pm, Chuck van der Linden  wrote:
>
>
>
> > I would also look for opportunities where you could close and re-open
> > the browser.  IE can be a bit of a memory pig I've noticed, and if you
> > are going to page after page after page with it, it will eventually
> > grow to use a lot of memory.
>
> > if it really was the text method in watir (or some ie/windows code it
> > is calling), you'd be able to demonstrate it by having a small loop
> > with a lot of text method execution, but never navigate off the
> > current page, and you'd be able to watch the memory used by the
> > browser swelling as the loop executes.
>
> > On Apr 6, 12:52 pm, "Darin Duphorn" 
> > wrote:
>
> > > I guess I would add a puts statement or add a counter to see which 
> > > iteration it's failing on.
>
> > > -Original Message-
> > > From: watir-general@googlegroups.com 
> > > [mailto:watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
> > > Sent: Monday, April 06, 2009 2:42 PM
> > > To: Watir General
> > > Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
>
> > > My bad, I meant to say "Here is the error message:".
>
> > > The line of code where the error originates from, basically looks like
> > > this:
>
> > >    ie.div(path).text
>
> > > The command is in a loop and 'path' is a variable.
>
> > > On Apr 6, 4:24 pm, "Dennis I."  wrote:
> > > > Hi everyone,
>
> > > > I was running a script and after a while an IE message popped up
> > > > saying it was out of memory.
> > > > I believe it's a buffer overflow from using the text method a lot.
>
> > > > Here is the code:
> > > > ---
> > > > The remote procedure call failed.
>
> > > >         from (eval):3:in `class_name'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:67:in `call'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:67:in `match?'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:43:in `locate'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:41:in `each'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:41:in `locate'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:40:in `catch'
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > locator.rb:40:in `locate'
>
> > > >          ... 7 levels...
>
> > > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > element.rb:115:in `text'
> > > > ---
>
> > > > I'm new to Ruby as I learned it just to work with Watir.
>
> > > > Is there anyway how to prevent this error?- 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to Drag and Drop a DIV element in Watir

2009-04-06 Thread Chuck van der Linden

if divs are draggable around the screen it's due to javascript running
on the client, since that's not a normal behavior in an html page all
on it's own.

You should probably talk to your devs to find out how it's being
done.   I suspect you might end up having to do something like firing
the mousedown event on the div to drag, and then maybe mousemove
events, and then a mouse-up event to put it down.

I'll soon be dealing with something similar, so I anticipate sharing
your pain.

On Apr 6, 2:56 am, Jonty  wrote:
> Hi All,
>
> I want your help to findout how should I Automate Drag and Drop a
>  element to another  element (other than using JavaScript)
>
> HTML code:
> 
>
> destination:
> 
>
> i tried the following but it didnt work:
>
> ie.text_field(:id, "ext-gem-532").dragContentsTo(:id, "ext-gem-616")
>
> ERROR: unknown property or method 'select'
>
> Thanks in advance,
> Jonty
--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-06 Thread IDIEININIIS

Thanks guys.

@Darin,

There actually is a puts statement and a counter, I just didn't add it
to the example code because puts seemed to be working fine (i.e. it
wasn't printing out super large amounts of text).

@Chuck,

I noticed that as well, that it starts to hog memory.
Closing and re-opening the browser after a set amount of iterations
sounds like it would work.
I'll try it tomorrow and let you guys know.

On Apr 6, 5:28 pm, Chuck van der Linden  wrote:
> I would also look for opportunities where you could close and re-open
> the browser.  IE can be a bit of a memory pig I've noticed, and if you
> are going to page after page after page with it, it will eventually
> grow to use a lot of memory.
>
> if it really was the text method in watir (or some ie/windows code it
> is calling), you'd be able to demonstrate it by having a small loop
> with a lot of text method execution, but never navigate off the
> current page, and you'd be able to watch the memory used by the
> browser swelling as the loop executes.
>
> On Apr 6, 12:52 pm, "Darin Duphorn" 
> wrote:
>
> > I guess I would add a puts statement or add a counter to see which 
> > iteration it's failing on.
>
> > -Original Message-
> > From: watir-general@googlegroups.com 
> > [mailto:watir-gene...@googlegroups.com] On Behalf Of IDIEININIIS
> > Sent: Monday, April 06, 2009 2:42 PM
> > To: Watir General
> > Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
>
> > My bad, I meant to say "Here is the error message:".
>
> > The line of code where the error originates from, basically looks like
> > this:
>
> >    ie.div(path).text
>
> > The command is in a loop and 'path' is a variable.
>
> > On Apr 6, 4:24 pm, "Dennis I."  wrote:
> > > Hi everyone,
>
> > > I was running a script and after a while an IE message popped up
> > > saying it was out of memory.
> > > I believe it's a buffer overflow from using the text method a lot.
>
> > > Here is the code:
> > > ---
> > > The remote procedure call failed.
>
> > >         from (eval):3:in `class_name'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:67:in `call'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:67:in `match?'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:43:in `locate'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:41:in `each'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:41:in `locate'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:40:in `catch'
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > locator.rb:40:in `locate'
>
> > >          ... 7 levels...
>
> > >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > element.rb:115:in `text'
> > > ---
>
> > > I'm new to Ruby as I learned it just to work with Watir.
>
> > > Is there anyway how to prevent this error?- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: how to work with inner tags like td etc..

2009-04-06 Thread Chuck van der Linden

does the outer table had a good way to identify it?  does the inner
table exist inside a specific cell of the outer table?

You might try using .flash to see if you can sort of work your way in
from the outside.

Potentially (this is theory, I've got no good site I can think of to
hit and see if this works) you might end up doing something like is
sometimes done with frames

browser.table(:id, 'outertable')[1][1].table(:index, 1)[1][1].text

  the [1][1] values above likely have to change to indicate the row
and column inside the table that contain the thing you want, be it the
inner table, or the cell in the inner table that contains the text you
want.

On Apr 6, 12:06 pm, satish  wrote:
> I apologise for my questions, I am very new to this watir tool.
> ---­-
> 
> 
>  style="color:#99;font-size:14pt;width:100%;">Login To Agency
> 
> 
> 
> Here I have to get the name in side the table, as you can see there is
> no id or name associated with it.
> I tried using 'innerText' but down side with that is since this table
> is part of other tables I am getting large data I do not need.
> I realised I can not use td tag like table to my code.
>
> Can any one suggest a better way to deal with this?
> Is there any documentation of all the HTML tags supported, how to use
> them etc?
>
> Appreciate your help.
>
> Thank you,
> Satish.
--~--~-~--~~~---~--~~
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: Flash with watir

2009-04-06 Thread Chuck van der Linden

For FlashWatir support, you'd probably be best off contacting the
developer of flashwatir directly since I don't see that they have a
forum or anything listed on the google code page for it.

Your example below appears to be just a slightly edited version of
their generic example code,  Most likely the flash element that you
are trying to access has an ID other than 'clickcolors' which is why
it's not found.

If you dont' understand how identifying page elements and such works,
I'd strongly recommend you work through the watir tutorial (http://
wiki.openqa.org/display/WTR/Tutorial).   Without a basic understanding
of what's going on, you won't know what things need to change (like
how objects on the page are identified) in order to experience
anything but failure when you try to utilize sample code in the way
you are.

On Apr 6, 11:14 am, kiran  wrote:
> Hi all,
> Is it posible to test flash on the web?
> I am using following code
>
> # include the controller
> require 'flash_watir'
> include FireWatir
> # create an instance of the controller
> browser = Firefox.new
> # go to the flash page you want to test
> browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html')
> sleep(3)
> # call the default methods available in flash
> percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded
>
> but i am getting the below erroe.>ruby flash.rb
>
> C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
> flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
> "clickcolors" (Watir::Exception::UnknownObjectException)
>         from flash.rb:10
>
>
>
> >Exit code: 1- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] how to work with inner tags like td etc..

2009-04-06 Thread satish

I apologise for my questions, I am very new to this watir tool.



Login To Agency



Here I have to get the name in side the table, as you can see there is
no id or name associated with it.
I tried using 'innerText' but down side with that is since this table
is part of other tables I am getting large data I do not need.
I realised I can not use td tag like table to my code.

Can any one suggest a better way to deal with this?
Is there any documentation of all the HTML tags supported, how to use
them etc?

Appreciate your help.

Thank you,
Satish.

--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-06 Thread Chuck van der Linden

I would also look for opportunities where you could close and re-open
the browser.  IE can be a bit of a memory pig I've noticed, and if you
are going to page after page after page with it, it will eventually
grow to use a lot of memory.

if it really was the text method in watir (or some ie/windows code it
is calling), you'd be able to demonstrate it by having a small loop
with a lot of text method execution, but never navigate off the
current page, and you'd be able to watch the memory used by the
browser swelling as the loop executes.

On Apr 6, 12:52 pm, "Darin Duphorn" 
wrote:
> I guess I would add a puts statement or add a counter to see which iteration 
> it's failing on.
>
>
>
> -Original Message-
> From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
> On Behalf Of IDIEININIIS
> Sent: Monday, April 06, 2009 2:42 PM
> To: Watir General
> Subject: [wtr-general] Re: IE out of memory error (buffer overflow)
>
> My bad, I meant to say "Here is the error message:".
>
> The line of code where the error originates from, basically looks like
> this:
>
>    ie.div(path).text
>
> The command is in a loop and 'path' is a variable.
>
> On Apr 6, 4:24 pm, "Dennis I."  wrote:
> > Hi everyone,
>
> > I was running a script and after a while an IE message popped up
> > saying it was out of memory.
> > I believe it's a buffer overflow from using the text method a lot.
>
> > Here is the code:
> > ---
> > The remote procedure call failed.
>
> >         from (eval):3:in `class_name'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:67:in `call'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:67:in `match?'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:43:in `locate'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:41:in `each'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:41:in `locate'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:40:in `catch'
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > locator.rb:40:in `locate'
>
> >          ... 7 levels...
>
> >         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > element.rb:115:in `text'
> > ---
>
> > I'm new to Ruby as I learned it just to work with Watir.
>
> > Is there anyway how to prevent this error?- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Test Automation? Pashaw!

2009-04-06 Thread Chuck van der Linden

write the results to HTML on a network share everyone can access, send
mail when the test finishes that the results are available (or better
yet embed the report in the mail)..or link to it from sharepont or
your team wiki or whatever collaboration tools you are using.

(see the html reporting class in the examples for a starting point)

Run them really frequently (like if there is an automated nightly
'full build') so you catch a problem as soon after it occurs as
possible.

Then pray to your favored god(s) that a dev messes up and the tests
expose the problem, because the instant that happens, management
starts to see the value in what you've done.   Seeing the tests pass
is a 'feel good' and gives managers a nice 'warm fussy' feeling, but
demonstrating that they can catch a regression that might have
otherwise gone out the door is a whole level better than that.
(because that kind of mistake can be potentially costly)

The best way to silence naysayers is with results.   If the results
happen to be a nicely formatted HTML page, with the company logo on
it, and nice color coded PASS and FAIL stuff, so much the better since
managers eat that stuff up.

The more visible your work is, (providing you are doing good work) the
higher up the food chain in your org, the more likely you are to get
support for what you are doing.



On Apr 6, 9:54 am, George  wrote:
> Right now, I'm creating simple regression tests that we can run after
> every patch/version update.  And, you're right - there isn't much of a
> chance of these tests failing.  We're automating this because it's
> boring to do manually.
>
> As far as the quick win, I have already completed quite a few scripts
> for a couple of our web apps.  My manager has actually been great as
> far as being an advocate.  The challenge for me as a beginner is that
> I'm constantly seeing ways I can refactor the code to make it better,
> or add functionality (such as writing the results to an Excel file),
> so I may be working a little too long on these.  Perhaps with the
> introduction of the Watircraft framework, the process of writing
> scripts can be a little more streamlined.
>
> Truth be told, I actually don't mind the unpaid overtime.  Learning
> Ruby/Watir is a lot of fun and it doesn't even seem like work to me.
> It's just unfortunate that official work time can't be alloted to this
> effort.
>
> On Apr 5, 5:11 pm, Chuck van der Linden  wrote:
>
>
>
> > I've run into both.  I've seen orgs where the mandate 'automate
> > everything' came down and everyone had to become a SDET (software
> > development engineer in test) or find other work somewhere else.
> > I've also seen places that having been burned by automation snake oil
> > (see stuff by james bach for good examples of this) and there was a
> > strong mindset of 'automation doesn't work'
>
> > I my mind it's just a tool, a powerful tool if used wisely, but an
> > expensive and frustrating one if not used properly.   In terms of
> > tools, if manual testing is a drill, then automation is a hammer.
> > while it might be possible to somehow use one to do the job of the
> > other, it's not generally the best idea.
>
> > It seems to me that you are in a trap.  You've been given a task but
> > not empowered to complete the task.  That's frankly not fair to you,
> > as you are being setup in a situation where you have to work basically
> > unpaid overtime or fail in your goals.
>
> > One potential way out is to get yourself a quick win, demonstrate some
> > success with automation (and learn the time it takes you to do it) and
> > then demand that they either give you the time or remove the task,
> > since you are in a no-win situation otherwise.
>
> > Testing automation works best IMHO in one of the following situations
>
> > 1) same test repeated frequently  e.g daily unit tests, build
> > validation tests, acceptance tests (if you are using them as a way to
> > track progress and show what's working and what's not instead of just
> > at the end)
> > 2) same test repeated with different data:  e.g. combinatorial testing
> > (like testing the word 'font settings' ui), or testing an input field
> > with a large number of 'valid' vs 'invalid' values to see that they
> > are all properly accepted or rejected.
> > 3) not humanly feasable or possible (loadtesting, performance testing)
> > 4) Utiities to save time (does it take 2 hours to setup your test env
> > and load it with data?  automate it) or improve testing process (is
> > the environment setup complicated with ots of settings that need to be
> > set the same way to allow test results to be replicated?)
> > 5) regression suites which are boring as hell to execute manually over
> > and over..
>
> > One problem is that many of these rarely find bugs after the test is
> > first written. and since a tester's goal is generaly to find bugs,
> > that can be a problem.
>
> > If I'm looking for a quick win, I want something that can benefit the
> > entire t

[wtr-general] Re: IE out of memory error (buffer overflow)

2009-04-06 Thread Darin Duphorn

I guess I would add a puts statement or add a counter to see which iteration 
it's failing on.

-Original Message-
From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On 
Behalf Of IDIEININIIS
Sent: Monday, April 06, 2009 2:42 PM
To: Watir General
Subject: [wtr-general] Re: IE out of memory error (buffer overflow)


My bad, I meant to say "Here is the error message:".

The line of code where the error originates from, basically looks like
this:

   ie.div(path).text

The command is in a loop and 'path' is a variable.

On Apr 6, 4:24 pm, "Dennis I."  wrote:
> Hi everyone,
>
> I was running a script and after a while an IE message popped up
> saying it was out of memory.
> I believe it's a buffer overflow from using the text method a lot.
>
> Here is the code:
> ---
> The remote procedure call failed.
>
>         from (eval):3:in `class_name'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:67:in `call'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:67:in `match?'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:43:in `locate'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:41:in `each'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:41:in `locate'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:40:in `catch'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:40:in `locate'
>
>          ... 7 levels...
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:115:in `text'
> ---
>
> I'm new to Ruby as I learned it just to work with Watir.
>
> Is there anyway how to prevent this error?



--~--~-~--~~~---~--~~
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: IE out of memory error (buffer overflow)

2009-04-06 Thread IDIEININIIS

My bad, I meant to say "Here is the error message:".

The line of code where the error originates from, basically looks like
this:

   ie.div(path).text

The command is in a loop and 'path' is a variable.

On Apr 6, 4:24 pm, "Dennis I."  wrote:
> Hi everyone,
>
> I was running a script and after a while an IE message popped up
> saying it was out of memory.
> I believe it's a buffer overflow from using the text method a lot.
>
> Here is the code:
> ---
> The remote procedure call failed.
>
>         from (eval):3:in `class_name'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:67:in `call'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:67:in `match?'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:43:in `locate'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:41:in `each'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:41:in `locate'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:40:in `catch'
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> locator.rb:40:in `locate'
>
>          ... 7 levels...
>
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:115:in `text'
> ---
>
> I'm new to Ruby as I learned it just to work with Watir.
>
> Is there anyway how to prevent this error?
--~--~-~--~~~---~--~~
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] IE out of memory error (buffer overflow)

2009-04-06 Thread Dennis I.

Hi everyone,

I was running a script and after a while an IE message popped up
saying it was out of memory.
I believe it's a buffer overflow from using the text method a lot.

Here is the code:
---
The remote procedure call failed.

from (eval):3:in `class_name'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:67:in `call'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:67:in `match?'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:43:in `locate'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:41:in `each'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:41:in `locate'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:40:in `catch'

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:40:in `locate'

 ... 7 levels...

from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:115:in `text'
---

I'm new to Ruby as I learned it just to work with Watir.

Is there anyway how to prevent this error?
--~--~-~--~~~---~--~~
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: Test Automation? Pashaw!

2009-04-06 Thread Lisa Crispin
Hi George,
I appreciate the plugs for the book from Paul and Chris (and it's the
contributions from them and other folks like them that make the book
helpful!)

Does your team do any regression testing? If so, and if you don't have these
tests automated, who is doing the manual regression tests?

What has worked for me in the past is to get support from the team
coach/manager that the whole team should be responsible for quality and
testing. When it's time to do manual regression testing, the entire team
participates. Since you will have more and more regression tests as you
deliver more and more new functionality, it will soon become obvious to
everyone why automating these tests would be really helpful.

In my experience, it takes a commitment from everyone on the development
team, not only the testers, to deliver high-quality software. Programmers
don't want to deliver a crummy product either. If you can get everyone
talking about this, identifying pain points and how to mitigate them, you
may find support for automation efforts.

What language is your app under test written in? As much as I like Watir,
you might get better buy-in if you get the whole team to agree on the most
appropriate automation tools for your situation. While the Java programmers
on my team went along with using Watir, and they all bought the PickAxe book
so they could help with the scripts, they've never been as sold on it as
they have on other tools we use such as FitNesse where they can write the
automation fixtures in Java.

Be patient and take baby steps. Try to get the whole team engaged in an
automation effort. I highly recommend _Fearless Change_ by Rising and Manns,
it has really helpful patterns on how to introduce changes such as this.
-- Lisa

On Mon, Apr 6, 2009 at 10:54 AM, George  wrote:

>
> Right now, I'm creating simple regression tests that we can run after
> every patch/version update.  And, you're right - there isn't much of a
> chance of these tests failing.  We're automating this because it's
> boring to do manually.
>
> As far as the quick win, I have already completed quite a few scripts
> for a couple of our web apps.  My manager has actually been great as
> far as being an advocate.  The challenge for me as a beginner is that
> I'm constantly seeing ways I can refactor the code to make it better,
> or add functionality (such as writing the results to an Excel file),
> so I may be working a little too long on these.  Perhaps with the
> introduction of the Watircraft framework, the process of writing
> scripts can be a little more streamlined.
>
> Truth be told, I actually don't mind the unpaid overtime.  Learning
> Ruby/Watir is a lot of fun and it doesn't even seem like work to me.
> It's just unfortunate that official work time can't be alloted to this
> effort.
>
> On Apr 5, 5:11 pm, Chuck van der Linden  wrote:
> > I've run into both.  I've seen orgs where the mandate 'automate
> > everything' came down and everyone had to become a SDET (software
> > development engineer in test) or find other work somewhere else.
> > I've also seen places that having been burned by automation snake oil
> > (see stuff by james bach for good examples of this) and there was a
> > strong mindset of 'automation doesn't work'
> >
> > I my mind it's just a tool, a powerful tool if used wisely, but an
> > expensive and frustrating one if not used properly.   In terms of
> > tools, if manual testing is a drill, then automation is a hammer.
> > while it might be possible to somehow use one to do the job of the
> > other, it's not generally the best idea.
> >
> > It seems to me that you are in a trap.  You've been given a task but
> > not empowered to complete the task.  That's frankly not fair to you,
> > as you are being setup in a situation where you have to work basically
> > unpaid overtime or fail in your goals.
> >
> > One potential way out is to get yourself a quick win, demonstrate some
> > success with automation (and learn the time it takes you to do it) and
> > then demand that they either give you the time or remove the task,
> > since you are in a no-win situation otherwise.
> >
> > Testing automation works best IMHO in one of the following situations
> >
> > 1) same test repeated frequently  e.g daily unit tests, build
> > validation tests, acceptance tests (if you are using them as a way to
> > track progress and show what's working and what's not instead of just
> > at the end)
> > 2) same test repeated with different data:  e.g. combinatorial testing
> > (like testing the word 'font settings' ui), or testing an input field
> > with a large number of 'valid' vs 'invalid' values to see that they
> > are all properly accepted or rejected.
> > 3) not humanly feasable or possible (loadtesting, performance testing)
> > 4) Utiities to save time (does it take 2 hours to setup your test env
> > and load it with data?  automate it) or improve testing process (is
> > the environment setup complicated with ots of settings 

[wtr-general] Flash with watir

2009-04-06 Thread kiran


Hi all,
Is it posible to test flash on the web?
I am using following code

# include the controller
require 'flash_watir'
include FireWatir
# create an instance of the controller
browser = Firefox.new
# go to the flash page you want to test
browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html')
sleep(3)
# call the default methods available in flash
percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded

but i am getting the below erroe.
>ruby flash.rb
C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
"clickcolors" (Watir::Exception::UnknownObjectException)
from flash.rb:10
>Exit code: 1
--~--~-~--~~~---~--~~
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] Flash with watir

2009-04-06 Thread kiran


Hi all,
Is it posible to test flash on the web?
I am using following code

# include the controller
require 'flash_watir'
include FireWatir
# create an instance of the controller
browser = Firefox.new
# go to the flash page you want to test
browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html')
sleep(3)
# call the default methods available in flash
percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded

but i am getting the below erroe.
>ruby flash.rb
C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
"clickcolors" (Watir::Exception::UnknownObjectException)
from flash.rb:10
>Exit code: 1
--~--~-~--~~~---~--~~
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: Test Automation? Pashaw!

2009-04-06 Thread Jeff Fry

This conversation tends to be quite unproductive when it becomes "is
or isn't test automation useful." It's a lot like "Are books useful?"
Books won't solve any problems on their own. There are plenty of
problems that books will not help with a bit. There are /some/
problems where /the right/ books /well applied/ might add tremendous
value.

Similarly with testing, I like to look at what are the problems that
need to be solved. Then I like to think about each of them, and
consider solutions. Is one of your problems basic functionality
breaking when code is changed? Unit tests /might/ be a great solution
to your problem. Do you suspect intermittent production failures are
the result of concurrency issues? Likewise, computer-assisted tests
might be your best bet in reproducing the problem in house.

I think discussing the relative costs/benefits of automated
browser-based regression testing is a good idea, and getting real
experience reports helps a lot. Even within this specific area, there
may be some problems that're helped through automated browser-based
tests and others where the cost is too high.

By the way, I wrote a bit about some of the most compelling cases
where I've used watir over the past five years here:
http://testingjeff.wordpress.com/2008/04/15/why-do-you-use-watir/

Getting time added into the schedule for test automation is a
different question, but one that /might/ become easier if you're able
to focus the conversation around solutions to particular problems.

Cheers,
Jeff


On Sat, Apr 4, 2009 at 11:14 AM, George  wrote:
>
> It seems that I've been encountering more people within my workplace
> (and, alas, even within my own QA team!) that are not sold on test
> automation. From what I've learned so far, there seems that automation
> will never cover 100% of what needs to be tested, but this doesn't
> negate the need.
>
> Another frustration is that I've been tasked to write automation
> scripts as part of my year-end goals. However, I haven't been assigned
> hours in my work week to do them! All of my script development has
> been after-hours and weekends (notice I'm posting this on a
> Saturday!).
>
> Has anyone else run into naysayers?  How can I convince the decision-
> makers that this is a worthwhile effort?
> >
>



-- 
Jeff Fry

http://testingjeff.wordpress.com
http://associationforsoftwaretesting.org

--~--~-~--~~~---~--~~
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] Flash with watir

2009-04-06 Thread kiran


Hi all,
Is it posible to test flash on the web?
I am using following code

# include the controller
require 'flash_watir'
include FireWatir
# create an instance of the controller
browser = Firefox.new
# go to the flash page you want to test
browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html')
sleep(3)
# call the default methods available in flash
percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded

but i am getting the below erroe.
>ruby flash.rb
C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
"clickcolors" (Watir::Exception::UnknownObjectException)
from flash.rb:10
>Exit code: 1
--~--~-~--~~~---~--~~
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: Test Automation? Pashaw!

2009-04-06 Thread George

Right now, I'm creating simple regression tests that we can run after
every patch/version update.  And, you're right - there isn't much of a
chance of these tests failing.  We're automating this because it's
boring to do manually.

As far as the quick win, I have already completed quite a few scripts
for a couple of our web apps.  My manager has actually been great as
far as being an advocate.  The challenge for me as a beginner is that
I'm constantly seeing ways I can refactor the code to make it better,
or add functionality (such as writing the results to an Excel file),
so I may be working a little too long on these.  Perhaps with the
introduction of the Watircraft framework, the process of writing
scripts can be a little more streamlined.

Truth be told, I actually don't mind the unpaid overtime.  Learning
Ruby/Watir is a lot of fun and it doesn't even seem like work to me.
It's just unfortunate that official work time can't be alloted to this
effort.

On Apr 5, 5:11 pm, Chuck van der Linden  wrote:
> I've run into both.  I've seen orgs where the mandate 'automate
> everything' came down and everyone had to become a SDET (software
> development engineer in test) or find other work somewhere else.
> I've also seen places that having been burned by automation snake oil
> (see stuff by james bach for good examples of this) and there was a
> strong mindset of 'automation doesn't work'
>
> I my mind it's just a tool, a powerful tool if used wisely, but an
> expensive and frustrating one if not used properly.   In terms of
> tools, if manual testing is a drill, then automation is a hammer.
> while it might be possible to somehow use one to do the job of the
> other, it's not generally the best idea.
>
> It seems to me that you are in a trap.  You've been given a task but
> not empowered to complete the task.  That's frankly not fair to you,
> as you are being setup in a situation where you have to work basically
> unpaid overtime or fail in your goals.
>
> One potential way out is to get yourself a quick win, demonstrate some
> success with automation (and learn the time it takes you to do it) and
> then demand that they either give you the time or remove the task,
> since you are in a no-win situation otherwise.
>
> Testing automation works best IMHO in one of the following situations
>
> 1) same test repeated frequently  e.g daily unit tests, build
> validation tests, acceptance tests (if you are using them as a way to
> track progress and show what's working and what's not instead of just
> at the end)
> 2) same test repeated with different data:  e.g. combinatorial testing
> (like testing the word 'font settings' ui), or testing an input field
> with a large number of 'valid' vs 'invalid' values to see that they
> are all properly accepted or rejected.
> 3) not humanly feasable or possible (loadtesting, performance testing)
> 4) Utiities to save time (does it take 2 hours to setup your test env
> and load it with data?  automate it) or improve testing process (is
> the environment setup complicated with ots of settings that need to be
> set the same way to allow test results to be replicated?)
> 5) regression suites which are boring as hell to execute manually over
> and over..
>
> One problem is that many of these rarely find bugs after the test is
> first written. and since a tester's goal is generaly to find bugs,
> that can be a problem.
>
> If I'm looking for a quick win, I want something that can benefit the
> entire team, so something like a useful utility script (if you've a
> need for one) or a BVT type test to save people from wasting time with
> bad buids, might be your best bet..  The tests of type 3 are often
> complicated to setup and may require a speciaized environment to run
> them, so that wouldn't be my first choice, OTOH managers LOVE graphs
> and numbers so something that reports on the product performance and
> can be run on each build might be a way to gain some good visibility.
>
> What is it you are assigned to do in terms of scripting?  can you find
> something in there you believe might represent a potential 'quick win'
> and/or  proof-of-concept?
>
> On Apr 4, 11:14 am, George  wrote:
>
> > It seems that I've been encountering more people within my workplace
> > (and, alas, even within my own QA team!) that are not sold on test
> > automation. From what I've learned so far, there seems that automation
> > will never cover 100% of what needs to be tested, but this doesn't
> > negate the need.
>
> > Another frustration is that I've been tasked to write automation
> > scripts as part of my year-end goals. However, I haven't been assigned
> > hours in my work week to do them! All of my script development has
> > been after-hours and weekends (notice I'm posting this on a
> > Saturday!).
>
> > Has anyone else run into naysayers?  How can I convince the decision-
> > makers that this is a worthwhile effort?
--~--~-~--~~~---~--~~
You received this mes

[wtr-general] Re: undefined method `button' for # (NoMethodError)

2009-04-06 Thread Bret Pettichord

This error means the $ie variable contains an array (not a browser). You 
have code somewhere that is doing this.

Shweta wrote:
> Hi
>
> Am using arrays in my script to test with multiple data,the scenario
> is in my application i have a search page there i am able to search
> with different criteria and there is a clear button to set the values
> to default.I am using different files as a libraries and am calling
> all there files in one mainfile.but am getting the error like this
> "undefined method `button' for # (NoMethodError)"
> This code is from 3rd file where am clickiing on clear button to
> cleaar the criteria but showing this error.can anyone suggest me what
> might be wrong here.
>
>
> def SearchInspections_withInsuredname()
>$ie.button(:name, "clearCriteriaBtn").click#Error occured here
>searches = [ "name1", "GA_Test_AS_TF0220", "name2","name3"]
>searches.each do |search|
>$ie.text_field(:name, "insuredName").set(search)
>$ie.button(:name, "submitBtn").click
>$ie.link(:href, "http://inspectionSearchInit.do";).click
>end
> end
>
>
> >
>   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training



--~--~-~--~~~---~--~~
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: ff.frame(:index,1).button(:index, 2) does not work?

2009-04-06 Thread Michael Hwee


That is strange.
Your email summary said "index,2", but you used "index,0"

Index is based 1.



- Original Message 
From: jason 
To: Watir General 
Sent: Friday, April 3, 2009 10:23:14 AM
Subject: [wtr-general] ff.frame(:index,1).button(:index, 2) does not work?



has anyone an idea about this?
is it me - or is this not supported in firewatir?

ff.frame(:index,1).button(:index, 0).click

#Unable to locate element, using :index, 0
(Watir::Exception::UnknownObjectException)


--~--~-~--~~~---~--~~
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: Watir Recorder

2009-04-06 Thread Bret Pettichord

I don't think any of the recorders have been updated to work with Watir 
1.6.x.

vladimir...@hotmail.com wrote:
> My team does not have strong programming experience.
> Recording can be a starting point that speeds up the script
> development.
> What Watir recorder do you recommend?
>   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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
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?hl=en
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir 1.6.2 unittests don't run

2009-04-06 Thread Bret Pettichord

Paul,

Could you update the wiki with this information please?

Bret


Paul Carvalho wrote:
> Well that advice was fairly useless.
>
> I wasted time on a wild goose chase through wiki pages until I got
> around to downloading the original source.  I copied the new FireWatir
> folder and, of course, the unittests failed.  Again.  Same error as
> above.
>
> I read through the setup.rb file and eventually noticed the part of
> the code where it says it's trying to load some libraries from the
> "CommonWatir" folder.
>
> That's all it took.  I extracted that folder into [what I thought was]
> the right place, and *poof* the unittests worked!
>
> Could have saved me a lot of trouble by just saying that we need to
> download and extract that folder.
>
> Anyhoo, the tests ran, I got 3 errors (actually 1 Fail, 2 Errors), and
> I suspect they have to do with my browser settings and add-ons.  I can
> deal with these.
>
> Just thought I'd post this info back in case anyone else is curious
> about how to get these tests to work after a gem install.  Yes, it can
> be done if you just get one folder and put it in the right place.
>
> P.C.
>
>
> On Apr 5, 10:08 am, Al Snow  wrote:
>   
>> Paul,
>>
>> Looks like you are running the unittests after getting the gem.
>> You can not run the unit tests from the gem. You must get the unit tests 
>> from GIT.
>> See the red box athttp://wiki.openqa.org/display/WTR/Run+the+Watir+Unit+Tests
>>
>> FYI,
>> Al Snow
>> 
>
> >
>   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: Open-source in test automation

2009-04-06 Thread Bret Pettichord

Please see www.watircraft.com/training for my current training.

alex.ikhelis wrote:
> Hi guys!
>
> This is the thing, BTW :): Homebrew Test Automation training by Bret
> http://www.io.com/%7Ewazmo/papers/homebrew_test_automation_200409.pdf
>
> And some articles related to it:
> http://adtmag.com/Articles/2003/08/22/At-Test-Automation-Where-homebrewed-testing-works.aspx
> http://www.pettichord.com/homebrew_automation.html
>
> On 7 окт 2008, 18:32, "alex.ikhelis"  wrote:
>   
>> Hi Zeljko, Pete, Aidy!
>>
>> Thanks a lot for your replies! These are good references!
>> To Zeljko: much appreciate your consecutive and useful response.
>>
>> Just to be on the same page. I was not much clear in my original post.
>> I have already been watching watir community for 1 year. And now I
>> have came up that I would like to systematize my theoretical knowledge
>> from high-level understanding, like: main motivation toopen 
>> sourcetestautomation, what are the common requirements of building
>> frameworks, typical tricks and best practices. And then going down to
>> concrete examples, problem solutions and implementations (where I
>> already have some experience).
>>
>> Thank you!
>>
>> On Oct 7, 4:34 pm, "aidy lewis"  wrote:
>>
>> 
>>> alex,
>>>   
>>> On 07/10/2008, Pete Dignan  wrote:
>>>   
  Alex - if you can wait a few months, Watircraft (www.watircraft.com)
  is starting work on a framework using RSpec (rspec.info), designed for
  use with Watir, that we intend toopen-source.  It should be available
  in late December or January sometime.  It will be general in nature so
  it can be widely applicable.  I hope this helps.
 
  Pete
 
  On Oct 6, 8:08 am, "alex.ikhelis"  wrote:
  > Hi skilled!
 
  > I would like to systematize my knowledge. Would you suggest some good
  > references or your thoughts regarding general ideas and principles of:
  > -open-sourcetestautomation
  > - buildingopen sourcetestautomationframeworks
  > - watir-based frameworks.
 
  > The main point is: key ideas (or main concept) in buildingopen source
  >testautomationframeworks.
 
  > I have not found anything particularly related to such discussion s in
  > the group. I believe it might be useful for a lot of people. Thank
  > you.
 
>>> There is a Rspec Story Runner here:
>>>   
>>> http://wiki.openqa.org/display/WTR/Framework+that+objects+models+AUT
>>>   
>>> Although I am porting to Cucumber from this.
>>>   
>>> Aidy
>>>   
>
> >
>   


--~--~-~--~~~---~--~~
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: SelectList behaves differently with 1.6.2?

2009-04-06 Thread Bret Pettichord

There was this fix to the wait logic:
* Fix for "undefined method 'document'" error that was occuring when 
loading pages with frames that were slow to load. Reported here: 
http://groups.google.com/group/watir-general/browse_thread/thread/ddde6251e30588c9

Based on your previous description, I do not see your current issues as 
indicating a bug in Watir.

If you want to diff code, you should diff the wait method.

Bret

Jarmo Pertman wrote:
> Release notes (http://wiki.openqa.org/display/WTR/Release+Notes) from
> 1.5.6 to 1.6.2 doesn't seem to mention anything regarding wait method
> or wait logics.
>
> I also diffed methods click, click!, click_no_wait, fire_event and
> wait from 1.5.6 and 1.6.2 and they were exactly the same (one
> difference existed though, 1.6.2 had one additional rescue
> NoMethodError, but since I didn't get these errors with 1.5.6 then
> it's not the culprit).
>
> Any other ideas what change might be causing the problem?
>
> Jarmo
>
> On Apr 3, 6:40 pm, Bret Pettichord  wrote:
>   
>> My guess is that Watir1.6.2is faster. You can check the release notes,
>> but I think there are several improvements to the wait logic.
>>
>> --
>> Bret Pettichord
>> CTO, WatirCraft LLC,www.watircraft.com
>> Lead Developer, Watir,www.watir.com
>> Blog,www.io.com/~wazmo/blog
>> Twitter,www.twitter.com/bpettichord
>>
>> Watir Training: Portland/Beaverton April 16-17www.watircraft.com/training
>> 
> >
>   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: Is there an easy way to see if specific text exists inside a div?

2009-04-06 Thread Bret Pettichord

Chuck van der Linden wrote:
> The harder part is purging all the examples that have been printed out
> and pinned to walls...
>
> Is there any way to display some kind of readme (where we could list
> things like this) when someone updates a gem?
>   
No. The standard method is to issue a warning on usage, as indicated by 
Charley's post.

Bret


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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] How to Drag and Drop a DIV element in Watir

2009-04-06 Thread Jonty

Hi All,

I want your help to findout how should I Automate Drag and Drop a
 element to another  element (other than using JavaScript)

HTML code:


destination:


i tried the following but it didnt work:

ie.text_field(:id, "ext-gem-532").dragContentsTo(:id, "ext-gem-616")

ERROR: unknown property or method 'select'


Thanks in advance,
Jonty

--~--~-~--~~~---~--~~
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: Watir returns first element found. How to return all elements found?

2009-04-06 Thread IDIEININIIS

@George,

Yes they are all divs.

@Tiffany,

Hi Tiffany,
I am trying to get a list of all the objects that are similar.

I'm dealing with nested divs in my case.

E.g.) I'm after all div class="b" (I didn't expand div class a, b and
c in this case. But they contain info.)


  



  
  



  
  



  



I'll try both methods that you mentioned and will write back if I had
any success.
Thanks.

On Apr 3, 7:51 pm, Tiffany Fodor  wrote:
> Hi Dennis!
>
> Are you trying to get a list of all of the objects that are similar,
> or are you trying to perform an action on a specific object that
> doesn't happen to be the first one?
>
> You can specify multiple attributes for an object like this:
>
> ie.div(:class => 'something', :index => 1)
>
> If you really want a list of all the div objects on your page you can
> do this:
>
> ie.show_divs
>
> Hope this helps!
>
> -Tiffany
>
> On Apr 3, 1:18 pm, "Dennis I."  wrote:
>
> > Watir returns the first element found when there are multiple elements
> > with the same name. I'd like for it to return all the elements instead
> > of just the first one found.
>
> > I know I can do this by using xpath plus an iterator, but is there any
> > other quicker way?
>
> > e.g.)  ie.div(:class, "something")
>
> > would return the first element with the "something" class attribute.
>
> > I'd like for it to return ALL "something" classes in that division.
--~--~-~--~~~---~--~~
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: Watir Recorder++ and Watir

2009-04-06 Thread Željko Filipin
On Mon, Apr 6, 2009 at 06:57, spike  wrote:
> I've installed watir recorder++ and i'm getting an error while
> playback

This is not watir recorder support forum. They have their own forum, so you
should ask there. Let me know if you can not find their forum and I will
send you the link.

Željko

--~--~-~--~~~---~--~~
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: Watir Recorder++ and Watir

2009-04-06 Thread bwaybandit

Did you by any chance install this as admin and are trying to run it
as a regular user? Might want to check your permissions?

i played with watir recorder++ a long while back and never had
problems with watir not working after that. A suggestion though - try
to stay away from the recording tools and get straight into writing
your own scripts. Will make your tests more robust and you will have
control of maintainability. If you are new to Ruby and Watir and not
sure where to start, you might want to look at WatirCraft and start
there. (http://www.watircraft.com/) Have not personally played with it
but I hear you might be better off starting with it.

On Apr 6, 12:57 am, spike  wrote:
> Hello
>
> I've installed watir recorder++ and i'm getting an error while
> playback
>
> System.UnauthorizedAccessException: Access to the path "C:\Program
> Files\WatirRecorder++\temp.rb" is denied.
>
> and also
>
> i was previously working on watir, after i installed watir recorder++
> i'm not able to run watir wat may be the problem. Should i uninstall
> any in these two?
>
> please suggest me some solution.
>
> thankingyou
--~--~-~--~~~---~--~~
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: Watir

2009-04-06 Thread Angrez Singh
see this http://wiki.openqa.org/display/WTR/Selection+Boxes

- Angrez

On Mon, Apr 6, 2009 at 5:48 PM, bwaybandit  wrote:

>
> you mean what is the "method" for selecting a value from the list.
>
> Try 'select'
>
> On Apr 6, 8:10 am, spike  wrote:
> > Ya that's ok, but wat is the script for selecting a value from the
> > list.
> >
> > On Apr 6, 4:02 pm, JArkelen  wrote:
> >
> > > You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
> > > id for the select, not the id of the label
> >
> > > On Apr 6, 12:09 pm, Angrez Singh  wrote:
> >
> > > > you are trying to access select_list using id of label. I think watir
> is
> > > > right in not recognizing the element. Correct?
> >
> > > > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
> >
> > > > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not
> select_list.
> > > > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> is ID
> > > > for select list so you should try
> >
> > > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
> >
> > > > - Angrez
> >
> > > > On Mon, Apr 6, 2009 at 3:26 PM, spike 
> wrote:
> >
> > > > > hello sir
> >
> > > > > I used ur solution but its not working i'm getting the following
> error
> >
> > > > > irb(main):011:0> ie.select_list(:id,
> > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > set("Select")
> > > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > > using :id, "
> > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > >from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > element.rb:52:
> > > > > in `assert_exists'
> > > > >from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:63:in `select_item_in_select_list'
> > > > >from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:47:in `set'
> >
> > > > > On Apr 6, 11:35 am, spike  wrote:
> > > > > > Hi
> >
> > > > > > The following is the code written for a check list.
> >
> > > > > >  > > > > > align="right">
> > > > > >   id="ctl00_ContentPlaceHolder1_lblSupervisor"
> > > > > > class="dataentrylabelsStyle">Supervisor : > > > > > class="cellInput"> > > > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > > > > class="stylenormalTextbox">
> > > > > >  > > > > value="--Select--">--Select--
> > > > > >  > > > > value="learner2">learner2
> > > > > >  > > > > value="learner1">learner1
> > > > > >  > > > > value="learner3">learner3
> > > > > >  > > > > value="user2">user2
> > > > > >  > > > > value="vinay">vinay
> > > > > >  > > > > value="user3">user3
> > > > > >  > > > > value="vinay1">vinay1
> > > > > >  > > > > value="user_1">user_1
> >
> > > > > > Now if i'm writing the command
> > > > > > irb(main):021:0> ie.select_list(:id,
> > > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > > set("vinay")
> >
> > > > > > I'm getting the following error
> >
> > > > > > Watir::Exception::UnknownObjectException: Unable to locate
> element,
> > > > > > using :id, "
> > > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > > > from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > element.rb:52:
> > > > > > in `assert_exists'
> > > > > > from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > input_elements
> > > > > > .rb:63:in `select_item_in_select_list'
> > > > > > from
> D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > > input_elements
> > > > > > .rb:47:in `set'
> >
> > > > > > please suggest some solution we user .net technology for
> developing
> > > > > > website.
> >
> > > > > > thankingyou- Hide quoted text -
> >
> > > - Show quoted text -
> >
> >
> >
>

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



[wtr-general] Re: Watir

2009-04-06 Thread bwaybandit

you mean what is the "method" for selecting a value from the list.

Try 'select'

On Apr 6, 8:10 am, spike  wrote:
> Ya that's ok, but wat is the script for selecting a value from the
> list.
>
> On Apr 6, 4:02 pm, JArkelen  wrote:
>
> > You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
> > id for the select, not the id of the label
>
> > On Apr 6, 12:09 pm, Angrez Singh  wrote:
>
> > > you are trying to access select_list using id of label. I think watir is
> > > right in not recognizing the element. Correct?
>
> > > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
>
> > > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not 
> > > select_list.
> > > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is 
> > > ID
> > > for select list so you should try
>
> > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
>
> > > - Angrez
>
> > > On Mon, Apr 6, 2009 at 3:26 PM, spike  wrote:
>
> > > > hello sir
>
> > > > I used ur solution but its not working i'm getting the following error
>
> > > > irb(main):011:0> ie.select_list(:id,
> > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > set("Select")
> > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > using :id, "
> > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > element.rb:52:
> > > > in `assert_exists'
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:63:in `select_item_in_select_list'
> > > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:47:in `set'
>
> > > > On Apr 6, 11:35 am, spike  wrote:
> > > > > Hi
>
> > > > > The following is the code written for a check list.
>
> > > > >  > > > > align="right">
> > > > >                   > > > > class="dataentrylabelsStyle">Supervisor : > > > > class="cellInput"> > > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > > > class="stylenormalTextbox">
> > > > >                                          > > > value="--Select--">--Select--
> > > > >                                          > > > value="learner2">learner2
> > > > >                                          > > > value="learner1">learner1
> > > > >                                          > > > value="learner3">learner3
> > > > >                                          > > > value="user2">user2
> > > > >                                          > > > value="vinay">vinay
> > > > >                                          > > > value="user3">user3
> > > > >                                          > > > value="vinay1">vinay1
> > > > >                                          > > > value="user_1">user_1
>
> > > > > Now if i'm writing the command
> > > > > irb(main):021:0> ie.select_list(:id,
> > > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > > set("vinay")
>
> > > > > I'm getting the following error
>
> > > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > > using :id, "
> > > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > element.rb:52:
> > > > > in `assert_exists'
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:63:in `select_item_in_select_list'
> > > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > > input_elements
> > > > > .rb:47:in `set'
>
> > > > > please suggest some solution we user .net technology for developing
> > > > > website.
>
> > > > > thankingyou- Hide quoted text -
>
> > - Show quoted text -
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir

2009-04-06 Thread spike

Ya that's ok, but wat is the script for selecting a value from the
list.


On Apr 6, 4:02 pm, JArkelen  wrote:
> You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
> id for the select, not the id of the label
>
> On Apr 6, 12:09 pm, Angrez Singh  wrote:
>
>
>
> > you are trying to access select_list using id of label. I think watir is
> > right in not recognizing the element. Correct?
>
> > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
>
> > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not select_list.
> > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is ID
> > for select list so you should try
>
> > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
>
> > - Angrez
>
> > On Mon, Apr 6, 2009 at 3:26 PM, spike  wrote:
>
> > > hello sir
>
> > > I used ur solution but its not working i'm getting the following error
>
> > > irb(main):011:0> ie.select_list(:id,
> > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > set("Select")
> > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > using :id, "
> > > ct100_ContentPlaceHolder1_IbISupervisor"
> > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > element.rb:52:
> > > in `assert_exists'
> > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:63:in `select_item_in_select_list'
> > >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:47:in `set'
>
> > > On Apr 6, 11:35 am, spike  wrote:
> > > > Hi
>
> > > > The following is the code written for a check list.
>
> > > >  > > > align="right">
> > > >                   > > > class="dataentrylabelsStyle">Supervisor : > > > class="cellInput"> > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > > class="stylenormalTextbox">
> > > >                                          > > value="--Select--">--Select--
> > > >                                          > > value="learner2">learner2
> > > >                                          > > value="learner1">learner1
> > > >                                          > > value="learner3">learner3
> > > >                                          > > value="user2">user2
> > > >                                          > > value="vinay">vinay
> > > >                                          > > value="user3">user3
> > > >                                          > > value="vinay1">vinay1
> > > >                                          > > value="user_1">user_1
>
> > > > Now if i'm writing the command
> > > > irb(main):021:0> ie.select_list(:id,
> > > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > > set("vinay")
>
> > > > I'm getting the following error
>
> > > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > > using :id, "
> > > > ct100_ContentPlaceHolder1_IbISupervisor"
> > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > element.rb:52:
> > > > in `assert_exists'
> > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:63:in `select_item_in_select_list'
> > > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > > input_elements
> > > > .rb:47:in `set'
>
> > > > please suggest some solution we user .net technology for developing
> > > > website.
>
> > > > thankingyou- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Where to run the script

2009-04-06 Thread Željko Filipin
On Mon, Apr 6, 2009 at 13:58, spike  wrote:
> include Watir

Remove this from your script and try again.

> no such file to
> load -- safariwatir (MissingSourceFile)

Not sure how you got this error message. Maybe "include Watir" causes it.

Željko

--~--~-~--~~~---~--~~
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: Where to run the script

2009-04-06 Thread Angrez Singh
remove Include Watir line from your file

- Angrez

On Mon, Apr 6, 2009 at 5:28 PM, spike  wrote:

>
> i'm not able to run the script from SciTE. I typed in the following
> script saved it and clicked F5.
> require 'Watir'
> include Watir
> ie = Watir::IE.new
> ie.goto "http://www.google.com/";
> ie.url == "http://www.google.co.in/";
>
> In the output panel I'm getting the following data
>
> >ruby startgoogle.rb
> C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> core_ext/module/introspection.rb:70:in `const_get': no such file to
> load -- safariwatir (MissingSourceFile)
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:70:in
> `local_constants'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:70:in `each'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:70:in
> `local_constants'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:68:in `each'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:68:in
> `local_constants'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/core_ext/module/introspection.rb:86:in
> `local_constant_names'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/dependencies.rb:498:in `new_constants_in'
>from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> active_support/dependencies.rb:495:in `collect'
> ... 6 levels...
>from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:82
>from startgoogle.rb:3
> >Exit code: 1
>
> Is this a error in the application?
> please suggest me if any installation or any error inthe code i've
> written
>
>
>
> On Apr 6, 4:14 pm, Željko Filipin 
> wrote:
> > On Mon, Apr 6, 2009 at 12:58, spike  wrote:
> > > I'm using watir tool currently i'm running the script in Command
> > > prompt. Is it the right way? or should i run the script in SciTE.
> >
> > I am running Watir scripts from command prompt for years. Works just
> fine. I
> > have tried to run them from Scite and Netbeans and they worked there too.
> At
> > the end, it is your choice.
> >
> > Do you have any problems when running scripts from command prompt or
> Scite?
> >
> > Željko
> >
>

--~--~-~--~~~---~--~~
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: Where to run the script

2009-04-06 Thread spike

i'm not able to run the script from SciTE. I typed in the following
script saved it and clicked F5.
require 'Watir'
include Watir
ie = Watir::IE.new
ie.goto "http://www.google.com/";
ie.url == "http://www.google.co.in/";

In the output panel I'm getting the following data

>ruby startgoogle.rb
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
core_ext/module/introspection.rb:70:in `const_get': no such file to
load -- safariwatir (MissingSourceFile)
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:70:in
`local_constants'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:70:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:70:in
`local_constants'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:68:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:68:in
`local_constants'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/module/introspection.rb:86:in
`local_constant_names'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:498:in `new_constants_in'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:495:in `collect'
 ... 6 levels...
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:82
from startgoogle.rb:3
>Exit code: 1

Is this a error in the application?
please suggest me if any installation or any error inthe code i've
written



On Apr 6, 4:14 pm, Željko Filipin 
wrote:
> On Mon, Apr 6, 2009 at 12:58, spike  wrote:
> > I'm using watir tool currently i'm running the script in Command
> > prompt. Is it the right way? or should i run the script in SciTE.
>
> I am running Watir scripts from command prompt for years. Works just fine. I
> have tried to run them from Scite and Netbeans and they worked there too. At
> the end, it is your choice.
>
> Do you have any problems when running scripts from command prompt or Scite?
>
> Željko
--~--~-~--~~~---~--~~
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: Where to run the script

2009-04-06 Thread Željko Filipin
On Mon, Apr 6, 2009 at 12:58, spike  wrote:
> I'm using watir tool currently i'm running the script in Command
> prompt. Is it the right way? or should i run the script in SciTE.

I am running Watir scripts from command prompt for years. Works just fine. I
have tried to run them from Scite and Netbeans and they worked there too. At
the end, it is your choice.

Do you have any problems when running scripts from command prompt or Scite?

Željko

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

2009-04-06 Thread JArkelen

You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the
id for the select, not the id of the label

On Apr 6, 12:09 pm, Angrez Singh  wrote:
> you are trying to access select_list using id of label. I think watir is
> right in not recognizing the element. Correct?
>
> ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").
>
> "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not select_list.
> As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is ID
> for select list so you should try
>
> ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")
>
> - Angrez
>
> On Mon, Apr 6, 2009 at 3:26 PM, spike  wrote:
>
> > hello sir
>
> > I used ur solution but its not working i'm getting the following error
>
> > irb(main):011:0> ie.select_list(:id,
> > "ct100_ContentPlaceHolder1_IbISupervisor").
> > set("Select")
> > Watir::Exception::UnknownObjectException: Unable to locate element,
> > using :id, "
> > ct100_ContentPlaceHolder1_IbISupervisor"
> >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > element.rb:52:
> > in `assert_exists'
> >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > input_elements
> > .rb:63:in `select_item_in_select_list'
> >        from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > input_elements
> > .rb:47:in `set'
>
> > On Apr 6, 11:35 am, spike  wrote:
> > > Hi
>
> > > The following is the code written for a check list.
>
> > >  > > align="right">
> > >                   > > class="dataentrylabelsStyle">Supervisor : > > class="cellInput"> > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > > class="stylenormalTextbox">
> > >                                          > value="--Select--">--Select--
> > >                                          > value="learner2">learner2
> > >                                          > value="learner1">learner1
> > >                                          > value="learner3">learner3
> > >                                          > value="user2">user2
> > >                                          > value="vinay">vinay
> > >                                          > value="user3">user3
> > >                                          > value="vinay1">vinay1
> > >                                          > value="user_1">user_1
>
> > > Now if i'm writing the command
> > > irb(main):021:0> ie.select_list(:id,
> > > "ct100_ContentPlaceHolder1_IbISupervisor").
> > > set("vinay")
>
> > > I'm getting the following error
>
> > > Watir::Exception::UnknownObjectException: Unable to locate element,
> > > using :id, "
> > > ct100_ContentPlaceHolder1_IbISupervisor"
> > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > element.rb:52:
> > > in `assert_exists'
> > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:63:in `select_item_in_select_list'
> > >         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:47:in `set'
>
> > > please suggest some solution we user .net technology for developing
> > > website.
>
> > > thankingyou
--~--~-~--~~~---~--~~
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] Where to run the script

2009-04-06 Thread spike

Hi

I'm using watir tool currently i'm running the script in Command
prompt. Is it the right way? or should i run the script in SciTE.
Please suggest me a solution.


thankingyou
--~--~-~--~~~---~--~~
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: Get script name within the script

2009-04-06 Thread Jarmo Pertman

You could also use variable called __FILE__

On Mar 25, 9:31 am, "vladimir...@hotmail.com"
 wrote:
> Thank you very much, Bill.
>
> The idea is to name the results file for each script in a test set by
> the name of the script.
> All scripts use Test::Unit class and have the same setup method.
> If I run system("ruby test1.rb"), in setup I read the name of the
> script and create a results file called test1.txt.
>
> Regards,
> Vladimir
>
> On Mar 24, 1:25 pm, Bill Agee  wrote:
>
> > $0 contains the filename being executed, so that should do what you want.
>
> > For more info on this kind of thing, this page is pretty useful:
>
> >http://www.zenspider.com/Languages/Ruby/QuickRef.html
>
> > The Ruby O'Reilly book is also great as a reference for this sort of stuff.
>
> > Thanks
> > Bill
>
> > On Tue, Mar 24, 2009 at 12:16 PM, vladimir...@hotmail.com <
>
> > vladimir...@hotmail.com> wrote:
>
> > > ARGV allows us to get script's input parameters.
> > > Is there a way to extract the script name from the following command:
>
> > > ruby script_name.rb param1 param2
>
> > > I need to get 'script_name'. I use it later to name the results file
> > > after the script name.- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir

2009-04-06 Thread Angrez Singh
you are trying to access select_list using id of label. I think watir is
right in not recognizing the element. Correct?

ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor").


"ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not select_list.
As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is ID
for select list so you should try

ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor")

- Angrez

On Mon, Apr 6, 2009 at 3:26 PM, spike  wrote:

>
> hello sir
>
> I used ur solution but its not working i'm getting the following error
>
> irb(main):011:0> ie.select_list(:id,
> "ct100_ContentPlaceHolder1_IbISupervisor").
> set("Select")
> Watir::Exception::UnknownObjectException: Unable to locate element,
> using :id, "
> ct100_ContentPlaceHolder1_IbISupervisor"
>from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:52:
> in `assert_exists'
>from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:63:in `select_item_in_select_list'
>from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:47:in `set'
>
>
> On Apr 6, 11:35 am, spike  wrote:
> > Hi
> >
> > The following is the code written for a check list.
> >
> >  > align="right">
> >   > class="dataentrylabelsStyle">Supervisor : > class="cellInput"> > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> > class="stylenormalTextbox">
> >  value="--Select--">--Select--
> >  value="learner2">learner2
> >  value="learner1">learner1
> >  value="learner3">learner3
> >  value="user2">user2
> >  value="vinay">vinay
> >  value="user3">user3
> >  value="vinay1">vinay1
> >  value="user_1">user_1
> >
> > Now if i'm writing the command
> > irb(main):021:0> ie.select_list(:id,
> > "ct100_ContentPlaceHolder1_IbISupervisor").
> > set("vinay")
> >
> > I'm getting the following error
> >
> > Watir::Exception::UnknownObjectException: Unable to locate element,
> > using :id, "
> > ct100_ContentPlaceHolder1_IbISupervisor"
> > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > element.rb:52:
> > in `assert_exists'
> > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > input_elements
> > .rb:63:in `select_item_in_select_list'
> > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > input_elements
> > .rb:47:in `set'
> >
> > please suggest some solution we user .net technology for developing
> > website.
> >
> > thankingyou
> >
>

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

2009-04-06 Thread spike

hello sir

I used ur solution but its not working i'm getting the following error

irb(main):011:0> ie.select_list(:id,
"ct100_ContentPlaceHolder1_IbISupervisor").
set("Select")
Watir::Exception::UnknownObjectException: Unable to locate element,
using :id, "
ct100_ContentPlaceHolder1_IbISupervisor"
from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:52:
in `assert_exists'
from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:63:in `select_item_in_select_list'
from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:47:in `set'


On Apr 6, 11:35 am, spike  wrote:
> Hi
>
> The following is the code written for a check list.
>
>  align="right">
>                   class="dataentrylabelsStyle">Supervisor : class="cellInput"> name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> class="stylenormalTextbox">
>                                          value="--Select--">--Select--
>                                          value="learner2">learner2
>                                          value="learner1">learner1
>                                          value="learner3">learner3
>                                         user2
>                                         vinay
>                                         user3
>                                         vinay1
>                                         user_1
>
> Now if i'm writing the command
> irb(main):021:0> ie.select_list(:id,
> "ct100_ContentPlaceHolder1_IbISupervisor").
> set("vinay")
>
> I'm getting the following error
>
> Watir::Exception::UnknownObjectException: Unable to locate element,
> using :id, "
> ct100_ContentPlaceHolder1_IbISupervisor"
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:52:
> in `assert_exists'
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:63:in `select_item_in_select_list'
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:47:in `set'
>
> please suggest some solution we user .net technology for developing
> website.
>
> thankingyou
--~--~-~--~~~---~--~~
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: Performance Testing

2009-04-06 Thread Tim Koopmans

At the company where I work using oss tools for performance testing
(www.altentee.com) we often use JMeter to 'spin up the wheels' or as
Chuck put it, conduct 'protocol' level testing. At the same time we
also run a quasi-smoke test if you like, using Watir to conduct
'browser' level testing.

Protocol level tests do apply load differently albeit in subtle ways.
Things like re-use or discontinued use of http connections, parallel
execution of browser threads, client render time (DOM tree parsing and
javascript processing) sometimes have an effect on end user response
time. I have seen peculiar behavior of browsers (particularly IE) when
the SUT is under load or when emulating network conditions (latency &
bandwidth). Things like '1 items remaining' or hung AJAX calls or even
large discrepancies b/w protocol level response time and *actual*
browser level response times...  That's why we see significant value
in using Watir + JMeter/the Grinder/OpenSTA at the same time.

Operations such as BrowserMob (using selenium to control ur botnet) is
useful in the sense it does sometimes simplify the script effort for
your load test. We generally script 80% of the SUT with JMeter, but
the other 20% often complicated by pesky AJAX controls and the like
are sometimes easier done in Selenium and/or Watir.

Another great use of Watir is to generate your load scripts in JMeter
from Watir scripts. It sounds like overkill, but if you know you will
be re-scripting again and again due to successive code drops etc, it's
often easier to generate & maintain these from Watir scripts i.e.
playback watir with the JMeter/Badboy proxy/recorder after each code
drop. Once you get familiar with the SUT you generally have a template
bunch of regex extractors etc to apply to your freshly generated load
scripts. I prefer to read Watir scripts rather than look at .jmx or .c
files...

Regards,
Tim Koopmans

On Apr 6, 9:21 am, Chuck van der Linden  wrote:
> On Apr 3, 2:56 am, sai  wrote:
>
> > Even if you use http clients to generate requests and load test the
> > app it is advisable to use real browsers to do some kind of load
> > testing because thats how the app is going to be used in the end
> > through real internet in the middle.
>
> Yes, that's how it will be 'used' but how can the server tell?   The
> point of a loadtest is to see how your servers hold up under load,
> that load takes the form of http requests..  How exactly is the server
> supposed to be able to tell the difference between requests generated
> by a browerser, or a protocol evel tool that emulated the requests
> sent by the browser?   I fail to see what value you are adding for the
> expense of having to maintain scripts for two different platforms
> (protocol level vs browser level).   If you REALLY want to experience
> the 'user experience' while the test is running, just interact
> manually with a browser.
>
>
>
> > The approach I take is when we are developing a functionality in an
> > iteration I tend to use something like http clients to find
> > bottlenecks and correct them. This gives me a fast feedback on parts I
> > need to concentrate on. But once the app is in good shape where I can
> > use it I tend to prefer using real browsers to test it along with http
> > clients. The advantage of real browser approach is it is how the app
> > will be used as well it takes away lots of complexities like ajax
> > processing, streaming away from you.
>
> Again I fail to see the advantage.. emulating ajax processing doesn't
> matter, all that matters is what kind of post or get resuts when that
> processing is done and the user responds  to it.  If there's a delay
> due to the ajax or the user 'reading' or filling in a form or
> whatever, that's what "Think Time" is for.   Steaming can be trickier
> I'll admit, but there are some things out there for testing flash and
> such that will let you start up a large number of streams and maintain
> them for however long you want.   But ultimately we get back to the
> question of 'how can the server tell the difference'    because if it
> can, then you have an issue with your loadtest tool, and if it can't
> why bother with the browser?
>
> >The disadvantage is it is not
> > possible to run more than three browsers at a time as they are
> > resource heavy.
>
> There's also the expense of maintaining two sets of scripts/tests.
>
> >And so clouds may help to scale in this issue.
>
> IF you have a suitable connection to the intenet that you can afford
> to load up with cloud traffic perhaps..
>
> If you are running a production site you dare not clog it's pipe with
> loadtest traffic.   So that means you need two more pipes one for the
> cloud load to arrive on, and one for a 'back channel' that you use to
> control the cloud, and receive instrumentation regarding response
> times, lost packets or failed responses, and perhaps telemetry as to
> what the scripts are doing at a particuar moment.. which you wil then
> need to correlat

[wtr-general] Re: Regex in the link's text

2009-04-06 Thread Jarmo Pertman

Or, since vb is already a string, then even cleaner syntax would be:
ie.link(:text, Regexp.new(vb)).click

Also, Netbeans for example doesn't mess syntax highlighting up with
the /#{vb}/ solution.

Jarmo

On Mar 24, 9:31 pm, "vladimir...@hotmail.com"
 wrote:
> Thank you, Bret. This syntax is cleaner.
>
> On Mar 24, 7:55 am, Bret Pettichord  wrote:
>
> > Another way, that probably won't mess up your editor's highlighting, is
> > this:
>
> >   ie.link(:text, Regexp.new("#{vb}")).click
>
> > Bret
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir

2009-04-06 Thread JArkelen

Perhaps you should set the select element and not the span element?
(And could you please give your topic a more meaningful name instead
of 'watir'?)

Cheers,
John


On Apr 6, 8:35 am, spike  wrote:
> Hi
>
> The following is the code written for a check list.
>
>  align="right">
>                   class="dataentrylabelsStyle">Supervisor : class="cellInput"> name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor"
> id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor"
> class="stylenormalTextbox">
>                                          value="--Select--">--Select--
>                                          value="learner2">learner2
>                                          value="learner1">learner1
>                                          value="learner3">learner3
>                                         user2
>                                         vinay
>                                         user3
>                                         vinay1
>                                         user_1
>
> Now if i'm writing the command
> irb(main):021:0> ie.select_list(:id,
> "ct100_ContentPlaceHolder1_IbISupervisor").
> set("vinay")
>
> I'm getting the following error
>
> Watir::Exception::UnknownObjectException: Unable to locate element,
> using :id, "
> ct100_ContentPlaceHolder1_IbISupervisor"
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> element.rb:52:
> in `assert_exists'
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:63:in `select_item_in_select_list'
>         from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements
> .rb:47:in `set'
>
> please suggest some solution we user .net technology for developing
> website.
>
> thankingyou
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---