[wtr-general] how can i execute only one worksheet in a spresdsheet in Rasta

2009-03-12 Thread rrash586



Hello all


I have three worksheet in a spreadsheeet with tab name
rasta_math,rast_string,and rasta_numger


it is stored in spreadsheet with name as  "workt.xls"


how can i run only the single worksheet(rasta_math)

when i use command rasta examples/workt.xls -f  example/fixtures it
run all the worksheet i.e. rasta_math,rast_string,and rasta_numger

But iwant to run only rasta_math how can i ?

 IS threr any command to run trhe specific worksheet ?


Thanks in advance
--~--~-~--~~~---~--~~
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] when I do ie.image().exists, it returns true but flash and click doesn't work

2009-03-12 Thread shivanand desai
   Supplier:*






Hi,
when I do ie.image().exists, it returns true, but flash and click doesn't
work on it.
i am using below code for above html source code


 ie_create.cell(:index,34).flash
 ie_create.image(:id, 'suppImg').flash
 ie_create.image(:id, 'suppImg').click
 ie_create.image(:index,7).click
 ie_create.image(:src,/stores/).click


Can someone help me on this???

-- 
THANKS N REGARDS
 SHIVANAND

--~--~-~--~~~---~--~~
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: Package creation

2009-03-12 Thread Vikas Tulashyam

Hi Tiffany,

Thanks for the time, I went through the examples at the link, but I
coudn't find anything suitable. I want to create a executable package
and don't want to provide the source code to the user.

Thanks



On Mar 12, 11:22 pm, Tiffany Fodor  wrote:
> Hi Vikas!
>
> I recommend that you take a look at the wiki - there are lots of
> tutorials and examples:
>
> http://wiki.openqa.org/display/WTR/Examples
>
> -Tiffany
>
> On Mar 11, 11:47 pm, Vikas Tulashyam  wrote:
>
> > Hi,
> > I am trying to create a framework in Watir, so I need to create a
> > package/Installable for this purpose. Please give me some pointer in
> > this area.
>
> > 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: Overiding onclick javascript

2009-03-12 Thread Paul Rogers
I cant do much until I get back - middle of next week. I can try and help
then

Paul

On Thu, Mar 12, 2009 at 3:36 PM, Charley Baker wrote:

> Paul Rogers put some event code on the wiki, I haven't used it but looked
> at it and it might give you a better approach for js events.
>
>
> Charley Baker
> blog: http://blog.charleybaker.org/
> Lead Developer, Watir, http://wtr.rubyforge.org
> QA Architect, Gap Inc Direct
>
>
>
> On Thu, Mar 12, 2009 at 12:54 PM,  wrote:
>
>>
>> Yea, I've tried passing it as a parm with no luck also. Everything
>> says it is supposed to work, but I can't get it.
>>
>> On Mar 12, 12:11 pm, Andy Sipe  wrote:
>> > Take a look at this W3 schools link, it may help:
>> http://www.w3schools.com/jsref/jsref_onkeypress.asp
>> >
>> > Note how they pass the event from the link:
>> >
>> > onmousedown="getEventTrigger(event)"
>> >
>> > vs
>> >
>> > onmousedown="getEventTrigger()
>> >
>> > Maybe that will help - andy
>> >
>> >
>> >
>> >
>> >
>> > On Thu, Mar 12, 2009 at 1:06 PM,  wrote:
>> >
>> > > Thanks for all your help on this - I wouldn't have gotten this far
>> > > without it. I have attached to an onclick of a link, and the function
>> > > is being called. My only remaining issue is a missing 'event' object
>> > > in the js. This is on ie. Here is the js function being attached to
>> > > onclick:
>> >
>> > >onclick_js =   "function(){"
>> > >onclick_js =   "  alert('button clicked');"
>> > >onclick_js +=  "  event = window.event;"
>> > >onclick_js +=  "  if(event){"
>> > >onclick_js +=  "alert('found event');"
>> > >onclick_js +=  "  } else { "
>> > >onclick_js +=  "alert('no event available'); "
>> > >onclick_js +=  "  }"
>> > >onclick_js +=  "}"
>> >
>> > > I get the alert 'button clicked' and then 'no event available'.
>> >
>> > > Has anyone tried this and/or have any ideas on what to try. (I have
>> > > tried passing event as a parm to the funcion - no difference).
>> >
>> > > In case it helps, here is the code that attaches this js to the
>> > > onclick.
>> >
>> > >js = "var top_frame=document.getElementById('top_frame');"
>> > >js +="if(top_frame){"
>> > >js +="  var myelem=top_frame.contentWindow.document.getElementById
>> > > ('" + html_id  + "');"
>> > >js +="  if(myelem){ "
>> > >js +="myelem.onclick=" + onclick_js + ";"
>> > >js +="  }"
>> > >js +="};"
>> >
>> > >#puts "exec_js is " + js
>> >
>> > >SITE.browser.document.parentWindow.execScript(js, "javascript")
>> >
>> > > On Mar 11, 1:04 pm, andrew.d...@lthree.com wrote:
>> >
>> > ...- 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] Click it twice to make it work?

2009-03-12 Thread Jim Matthews

Have any of you run into this problem before?

You have to click a button or link or image twice to get it to take
effect?

I actually have run into this problem some in manual testing and
usually with an image.  The first time I click it, nothing happens.
The second time I click it takes me where it should have gone with the
first click.

I am seeing this with an automated test.  It was running against one
server without a problem.  I started having problems when I ran the
same test, on the same computer, from the same IE version but against
a different server.

After some experimenting, it appears that if I specify clicking the
link twice in a row it works.

Have any of you run into this problem and more importantly, do you
know what might be causing it and how to fix it?

Jim


--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread Chuck van der Linden

I'm still learning a lot regarding how ruby handles modules, classes
etc..

but in general, woudln't using "require" instead of include solve his
problem?  (unless he's actually extending or subclassing stuff from
the modules)

I thought I remember seeing something about a lot of folks using
"include 'watir'" when they should be using "require 'watir'"

On Mar 12, 3:00 pm, marekj  wrote:
> On Thu, Mar 12, 2009 at 4:38 AM, wesley chen  wrote:
> > Thanks, :), it is exactly what I want.
>
> > I ask this kind of questions because I find, in my code, I use too many:
> > include module.
> > When I include the module into the class, all the methods in the module
> > comes into the class's method. That's terrible.
>
> to remove the 'terrible' from listing do this use Object.local_methods
> patch.
>
> class Object
>   def local_methods
>     (methods - Object.instance_methods).sort
>   end
> end
>
> so if you have
>
> class Foo
>   def foo
>     'foo'
>   end
> end
>
> then Bla.new.local_methods #=> ['foo']
> if you want methods defined only as instances of that object.
> useful.
> Wirble uses it for irb inspectionhttp://pablotron.org/software/wirble/
>
> marekj
>
> Watirloo: Semantic Page Objects in UseCases
> Human Readable Machine Executable Acceptance 
> Testinghttp://github.com/marekj/watirloo/
>
>
>
>
>
> > Thanks.
> > Wesley Chen.- 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: Very slow typing speed for firefox 2 : watir 1.6.2

2009-03-12 Thread Aedorn Varanis

Same build/system. Ubuntu running Firefox 3.0.7, and JSSH 0.9.

I think it's time to build a new Linux system and see if it's relative
to the build of Firefox. I'll get on that, just in case...

--~--~-~--~~~---~--~~
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: Overiding onclick javascript

2009-03-12 Thread Charley Baker
Paul Rogers put some event code on the wiki, I haven't used it but looked at
it and it might give you a better approach for js events.


Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Thu, Mar 12, 2009 at 12:54 PM,  wrote:

>
> Yea, I've tried passing it as a parm with no luck also. Everything
> says it is supposed to work, but I can't get it.
>
> On Mar 12, 12:11 pm, Andy Sipe  wrote:
> > Take a look at this W3 schools link, it may help:
> http://www.w3schools.com/jsref/jsref_onkeypress.asp
> >
> > Note how they pass the event from the link:
> >
> > onmousedown="getEventTrigger(event)"
> >
> > vs
> >
> > onmousedown="getEventTrigger()
> >
> > Maybe that will help - andy
> >
> >
> >
> >
> >
> > On Thu, Mar 12, 2009 at 1:06 PM,  wrote:
> >
> > > Thanks for all your help on this - I wouldn't have gotten this far
> > > without it. I have attached to an onclick of a link, and the function
> > > is being called. My only remaining issue is a missing 'event' object
> > > in the js. This is on ie. Here is the js function being attached to
> > > onclick:
> >
> > >onclick_js =   "function(){"
> > >onclick_js =   "  alert('button clicked');"
> > >onclick_js +=  "  event = window.event;"
> > >onclick_js +=  "  if(event){"
> > >onclick_js +=  "alert('found event');"
> > >onclick_js +=  "  } else { "
> > >onclick_js +=  "alert('no event available'); "
> > >onclick_js +=  "  }"
> > >onclick_js +=  "}"
> >
> > > I get the alert 'button clicked' and then 'no event available'.
> >
> > > Has anyone tried this and/or have any ideas on what to try. (I have
> > > tried passing event as a parm to the funcion - no difference).
> >
> > > In case it helps, here is the code that attaches this js to the
> > > onclick.
> >
> > >js = "var top_frame=document.getElementById('top_frame');"
> > >js +="if(top_frame){"
> > >js +="  var myelem=top_frame.contentWindow.document.getElementById
> > > ('" + html_id  + "');"
> > >js +="  if(myelem){ "
> > >js +="myelem.onclick=" + onclick_js + ";"
> > >js +="  }"
> > >js +="};"
> >
> > >#puts "exec_js is " + js
> >
> > >SITE.browser.document.parentWindow.execScript(js, "javascript")
> >
> > > On Mar 11, 1:04 pm, andrew.d...@lthree.com wrote:
> >
> > ...- 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: Very slow typing speed for firefox 2 : watir 1.6.2

2009-03-12 Thread Cliff Cyphers

I've seen similar resuls with putting a little delay in the  
read_socket()..  I thinks it's a resourse issue in where the OS is  
polling till it's free.  It just happens to be with a litle delay  
there's less polling for the file descriptor IO.

The read_socket is waiting on data hence the delay.  We all know it's  
easier to point out the issue to find the  fix.

FYI, for me this is happening on ubuntu with FFv3.0.7 and jssh0.9

Sent from my iPhone

On Mar 12, 2009, at 4:53 PM, Aedorn Varanis  wrote:

>
> Something amusing about this issue. I noticed, by pure chance, that if
> I move another window around while the test is running, the typing
> goes faster. So if I rapidly move a window left to right, over and
> over, the tests I do complete really quickly. Once I stop moving the
> window, it goes back to the really slow 1 character per second typing.
>
> I'm not even sure how that is related, in fact, I can't even begin to
> think of a reasonable explanation as to why. This kind of puts it in
> the realm of a whole other issue all together.
>
> >

--~--~-~--~~~---~--~~
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: When do you start writing WATiR scripts?

2009-03-12 Thread marekj
Look at WatirCraft gem and other frameworks
Do NOT write tests talking to Document Object Model elements,
but DO write tests expressed as Semantic Page Objects, or 'fields' in
WatirCraft

if you are on the page and you need to enter last name you write

page.last_name = 'Manikawalikanisiy'
page.first_name = 'Evgeny'

better yet
page.populate :last_name => 'Foo', :first_name => 'Bar"

Let Page class act as adapter to DOM and Watir.
more here:
http://github.com/bret/watircraft/tree/master

I think I would call this a Semantic Page Objects Testing approach, some
people call this keyword driven testing but the keywords are not action
words necessarily, they are 'token' referencing 'objects of interest' on the
page and you name then based on your Business Domain model.
One can write those tests before UI even exists in a similar manner that
Rspec advocates writing examples using code 'you wish you had'.
You end up with tests that express intent of business entities and actions
and you wire it up to talk to DOM later.
This way you build human readable test case library and you end up having it
executable at some point.


marekj

Watirloo: Semantic Page Objects in UseCases
Human Readable Machine Executable Acceptance Testing
http://github.com/marekj/watirloo/



On Wed, Aug 6, 2008 at 8:06 AM, Bhavna Kumar  wrote:

> Hi,
>
> This is more of a process query than a technical one. We have introduced
> WATiR scripting in our org and are working on getting testers familiar with
> doing test cases in WATiR.
>
> Within the org, we are debating whether to use WATiR to build a
> smoke/regression testing suite (which basically means manual testing for
> releases, followed by post facto WATiR development) or to use it for actual
> testing. Using it for actual testing would mean that scripts would break as
> UI changes happen (and this happens quite a bit till functionality
> stabilizes).
>
> I'm curious to know at what point you folks begin WATiR testing in the
> development cycle? If used for actual testing, then what has your experience
> been?
>
> Thanks in advance,
> Bhavna
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread marekj
On Thu, Mar 12, 2009 at 4:38 AM, wesley chen  wrote:

> Thanks, :), it is exactly what I want.
>
> I ask this kind of questions because I find, in my code, I use too many:
> include module.
> When I include the module into the class, all the methods in the module
> comes into the class's method. That's terrible.


to remove the 'terrible' from listing do this use Object.local_methods
patch.

class Object
  def local_methods
(methods - Object.instance_methods).sort
  end
end


so if you have

class Foo
  def foo
'foo'
  end
end


then Bla.new.local_methods #=> ['foo']
if you want methods defined only as instances of that object.
useful.
Wirble uses it for irb inspection
http://pablotron.org/software/wirble/



marekj

Watirloo: Semantic Page Objects in UseCases
Human Readable Machine Executable Acceptance Testing
http://github.com/marekj/watirloo/



>
>
>
> Thanks.
> Wesley Chen.
>
>

--~--~-~--~~~---~--~~
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: Very slow typing speed for firefox 2 : watir 1.6.2

2009-03-12 Thread Aedorn Varanis

Something amusing about this issue. I noticed, by pure chance, that if
I move another window around while the test is running, the typing
goes faster. So if I rapidly move a window left to right, over and
over, the tests I do complete really quickly. Once I stop moving the
window, it goes back to the really slow 1 character per second typing.

I'm not even sure how that is related, in fact, I can't even begin to
think of a reasonable explanation as to why. This kind of puts it in
the realm of a whole other issue all together.

--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread SuperKevy

Brilliant!

On Mar 12, 4:34 am, Željko Filipin 
wrote:
> On Thu, Mar 12, 2009 at 10:32, wesley chen  wrote:
> > I would like to print all my methods out.
>
> And this is not what you need?
>
> class MyClass
>   # some code
> end
>
> variable = MyClass.new
> variable.methods
>
> Ž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: Counting selection option

2009-03-12 Thread maximore


 actually  it work flawlessly with out any  error message after
inserting the  comma. I  wish there was a way for  Ruby to indicate
some sense of direction like the error message above. maybe
bceuz I am new and don't know how to work it out


On Mar 12, 2:54 pm, Tiffany Fodor  wrote:
> Sorry - my bad - i had a typo in my example.  You need a separator
> between the parameter and the attribute.  You can use either a comma:
>
> list_options = ie.select_list(:name, 'my_list').getAllContents
>
> or =>
>
> list_options = ie.select_list(:name => 'my_list').getAllContents
>
> -Tiffany
>
> On Mar 12, 1:33 pm, maximore  wrote:
>
> >  I added  code and run  program this was the error message that I
> > git .estCases_AgiileIteration1.rb:198: syntax error, unexpected ')',
> > expecting kEND When code is removed form program code error message go
> > away .
>
> >     List_options=ie.select_list(:name
> > "securityQuestion").getAllContents
>
> > On Mar 12, 11:32 am, Tiffany Fodor  wrote:
>
> > > Give this a try:
>
> > > list_options = ie.select_list(:name 'my_list').getAllContents  #gives
> > > you an array of the options
>
> > > number_of_options = list_options.length  #array method length gives
> > > you the number of elements in the array
>
> > > Hope this helps!
>
> > > -Tiffany
>
> > > On Mar 12, 10:11 am, maximore  wrote:
>
> > > >  hello  I want to  count the number of  option on a pull down
> > > > menu  
> > > >  how can i go about  doing  just this  in ruby?  I know there is a
> > > > way of going about this just don't know how .
>
> > > >  thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: watir installation failed. please help

2009-03-12 Thread Bill Attebery

I had a working older version of watir and ran into this when trying
to upgrade.
This is what worked for me (pieced together from other answers on this
forum - thanks for the help gang).

To get the latest ruby/watir to work (I think, I haven't actually ran
a script but I can at least get IE to open), at least the latest 1.8.6
Ruby, haven't even thought about trying 1.9 yet.

1.  (uninstall ruby or rename the directory if you want to keep it
around)
2.  download and install the 1.8.6-27_rc2.exe one click installer
(http://rubyforge.org/frs/?group_id=167&release_id=28426)
3.  C:\>gem install watir (this will install a bad version of win32-
api --"win32-api-1.4.0-x86-mswin32-80")
4.  C:\>gem uninstall win32-api (you can uninstall 1.4.0 only, or all
of them when prompted - unless you know of a need for the old ones)
5.  C:\>gem install win32-api --version '= 1.3.0' (this is an
interestingly critical step, causing the next to work)
6.  C:\>gem install windows-pr (this will install windows-pr 1.0.2 AND
a good win32-api-1.4.0 --"win32-api-1.4.0-x86-mswin32-60")

It's useful learning to do the following between each step 3-6 and see
the results (may help you troubleshoot an install in the future).
C:\>irb
irb(main):001:0>require 'watir'
irb(main):002:0>Watir::IE.new
irb(main):003:0>quit

Step 5 is interesting because without it, step 6 installs the bad
win32-api...-80 again, but with it, step 6 installs the good win32-
api...-60 -- I think that the -80 and -60 reflect the version of
VisualStudio they were compiled with or something.

It seems you can also run with:
win32-api 1.3.0
windows-pr 1.0.1 (in step 6 you could use the --version '= 1.0.1'
switch, which won't install win32-api 1.4.0)

Easy as that. ;-)


On Mar 11, 6:17 am, "Kiran Darekar"  wrote:
> Hi guys,
>
> I am trying to install Watir.
>
> But by starting application, I am getting this error message.
>
> "This application failed to start because msvcr80-ruby18.dll was not found.
> Re-installing the application may fix this problem."
>
> Please help me to resolve this.
>
> Thanks in advance
>
> Best Regards,
>
> Kiran
> NOTICE: This email message, including any attachments, may contain
> information that is confidential and/or proprietary. If you are not an
> intended recipient, please be advised that any review, use, reproduction or
> distribution of this message is prohibited. If you have received this
> message in error, please completely destroy all electronic and hard copies,
> and contact the sender at or kir...@sikkasoft.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: Counting selection option

2009-03-12 Thread Tiffany Fodor

Sorry - my bad - i had a typo in my example.  You need a separator
between the parameter and the attribute.  You can use either a comma:

list_options = ie.select_list(:name, 'my_list').getAllContents

or =>

list_options = ie.select_list(:name => 'my_list').getAllContents

-Tiffany

On Mar 12, 1:33 pm, maximore  wrote:
>  I added  code and run  program this was the error message that I
> git .estCases_AgiileIteration1.rb:198: syntax error, unexpected ')',
> expecting kEND When code is removed form program code error message go
> away .
>
>     List_options=ie.select_list(:name
> "securityQuestion").getAllContents
>
> On Mar 12, 11:32 am, Tiffany Fodor  wrote:
>
> > Give this a try:
>
> > list_options = ie.select_list(:name 'my_list').getAllContents  #gives
> > you an array of the options
>
> > number_of_options = list_options.length  #array method length gives
> > you the number of elements in the array
>
> > Hope this helps!
>
> > -Tiffany
>
> > On Mar 12, 10:11 am, maximore  wrote:
>
> > >  hello  I want to  count the number of  option on a pull down
> > > menu  
> > >  how can i go about  doing  just this  in ruby?  I know there is a
> > > way of going about this just don't know how .
>
> > >  thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Counting selection option

2009-03-12 Thread maximore

 I added  code and run  program this was the error message that I
git .estCases_AgiileIteration1.rb:198: syntax error, unexpected ')',
expecting kEND When code is removed form program code error message go
away .

List_options=ie.select_list(:name
"securityQuestion").getAllContents

On Mar 12, 11:32 am, Tiffany Fodor  wrote:
> Give this a try:
>
> list_options = ie.select_list(:name 'my_list').getAllContents  #gives
> you an array of the options
>
> number_of_options = list_options.length  #array method length gives
> you the number of elements in the array
>
> Hope this helps!
>
> -Tiffany
>
> On Mar 12, 10:11 am, maximore  wrote:
>
> >  hello  I want to  count the number of  option on a pull down
> > menu  
> >  how can i go about  doing  just this  in ruby?  I know there is a
> > way of going about this just don't know how .
>
> >  thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Overiding onclick javascript

2009-03-12 Thread andrew . dahl

Yea, I've tried passing it as a parm with no luck also. Everything
says it is supposed to work, but I can't get it.

On Mar 12, 12:11 pm, Andy Sipe  wrote:
> Take a look at this W3 schools link, it may 
> help:http://www.w3schools.com/jsref/jsref_onkeypress.asp
>
> Note how they pass the event from the link:
>
> onmousedown="getEventTrigger(event)"
>
> vs
>
> onmousedown="getEventTrigger()
>
> Maybe that will help - andy
>
>
>
>
>
> On Thu, Mar 12, 2009 at 1:06 PM,  wrote:
>
> > Thanks for all your help on this - I wouldn't have gotten this far
> > without it. I have attached to an onclick of a link, and the function
> > is being called. My only remaining issue is a missing 'event' object
> > in the js. This is on ie. Here is the js function being attached to
> > onclick:
>
> >    onclick_js =   "function(){"
> >    onclick_js =   "  alert('button clicked');"
> >    onclick_js +=  "  event = window.event;"
> >    onclick_js +=  "  if(event){"
> >    onclick_js +=  "    alert('found event');"
> >    onclick_js +=  "  } else { "
> >    onclick_js +=  "    alert('no event available'); "
> >    onclick_js +=  "  }"
> >    onclick_js +=  "}"
>
> > I get the alert 'button clicked' and then 'no event available'.
>
> > Has anyone tried this and/or have any ideas on what to try. (I have
> > tried passing event as a parm to the funcion - no difference).
>
> > In case it helps, here is the code that attaches this js to the
> > onclick.
>
> >    js = "var top_frame=document.getElementById('top_frame');"
> >    js +="if(top_frame){"
> >    js +="  var myelem=top_frame.contentWindow.document.getElementById
> > ('" + html_id  + "');"
> >    js +="  if(myelem){ "
> >    js +="    myelem.onclick=" + onclick_js + ";"
> >    js +="  }"
> >    js +="};"
>
> >    #puts "exec_js is " + js
>
> >    SITE.browser.document.parentWindow.execScript(js, "javascript")
>
> > On Mar 11, 1:04 pm, andrew.d...@lthree.com wrote:
>
> ...- 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: select_no_wait function does not work for download pop up handling.

2009-03-12 Thread JackieH

I haven encountered the same issue...When using the select method a
pop-up box occurs, but when I added the no_wait routine the code just
ends up in the wait for pop-up routine and no pop-up appearsFrom
what I can, the code gets into the no_wait method fine, but it never
reaches the select method of the select list...A few interesting
tidbits:  I noticed some chatter about a patch for
eval_in_spawned_process for a click_no_wait issue as well as a radio
button no wait issue, so I did implement that with high hopes it might
fix my issue, but alas, no luck...What is interesting is that this
same code has worked on IE6...It sets the select list and handles the
pop-up correctly...

Any advise would be greatly appreciated!

-Jackie

On Feb 16, 3:25 am, Bill Xu  wrote:
> Hi:
>    I want to use select_no_wait function (I am testing on a dropdown control
> and while you select the dropdown control, it pops up download file page),
> select_no_wait is the function i got 
> fromhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups(iteam 6)
> but it seems does not work. It can not trigger the select operation. Do you
> have some ideas? (system will hang when run to select_no_wait function
> and the pop up window will not show up)
>
> #sample code#
> #select_no_wait method for select lists - needed for popups resulting from
> select lists
> module Watir
>     class Element
>         #select_no_wait - selects a drop-down element spawning a new
> process.
>         #this is needed to close potential pop-ups that select drop-down can
> trigger.
>         def select_no_wait(item)
>             assert_enabled
>             puts "calls select_no_wait function"
>             highlight(:set)
>             object = "#{self.class}.new(self,
> :unique_number,#{self.unique_number})"
>             @page_container.eval_in_spawned_process(object +
> ".set('#{item}')")
>             highlight(:clear)
>         end
>     end
> end
>
> def save_file(filepath)
>     ai = WIN32OLE.new("AutoItX3.Control")
>     ai.WinWait("File Download", "", 5)
>     ai.ControlFocus("File Download", "", "&Save")
>     sleep 1
>     ai.ControlClick("File Download", "", "&Save", "left")
>     ai.WinWait("Save As", "", 5)
>     sleep 1
>     ai.ControlSend("Save As", "", "Edit1",filepath)
>     ai.ControlClick("Save As", "", "&Save", "left")
>     ai.WinWait("Download complete", "", 5)
>     ai.ControlClick("Download complete", "", "Close")
>   end
>
> #main code#
> $ie.select_list(:id,"_id0:actions").select("Generate Default Template")
> save_file("C:\\file1.txt")
--~--~-~--~~~---~--~~
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: Package creation

2009-03-12 Thread Tiffany Fodor

Hi Vikas!

I recommend that you take a look at the wiki - there are lots of
tutorials and examples:

http://wiki.openqa.org/display/WTR/Examples

-Tiffany

On Mar 11, 11:47 pm, Vikas Tulashyam  wrote:
> Hi,
> I am trying to create a framework in Watir, so I need to create a
> package/Installable for this purpose. Please give me some pointer in
> this area.
>
> 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: Overiding onclick javascript

2009-03-12 Thread Andy Sipe
Take a look at this W3 schools link, it may help:
http://www.w3schools.com/jsref/jsref_onkeypress.asp

Note how they pass the event from the link:

onmousedown="getEventTrigger(event)"

vs

onmousedown="getEventTrigger()

Maybe that will help - andy



On Thu, Mar 12, 2009 at 1:06 PM,  wrote:

>
> Thanks for all your help on this - I wouldn't have gotten this far
> without it. I have attached to an onclick of a link, and the function
> is being called. My only remaining issue is a missing 'event' object
> in the js. This is on ie. Here is the js function being attached to
> onclick:
>
>onclick_js =   "function(){"
>onclick_js =   "  alert('button clicked');"
>onclick_js +=  "  event = window.event;"
>onclick_js +=  "  if(event){"
>onclick_js +=  "alert('found event');"
>onclick_js +=  "  } else { "
>onclick_js +=  "alert('no event available'); "
>onclick_js +=  "  }"
>onclick_js +=  "}"
>
> I get the alert 'button clicked' and then 'no event available'.
>
> Has anyone tried this and/or have any ideas on what to try. (I have
> tried passing event as a parm to the funcion - no difference).
>
> In case it helps, here is the code that attaches this js to the
> onclick.
>
>js = "var top_frame=document.getElementById('top_frame');"
>js +="if(top_frame){"
>js +="  var myelem=top_frame.contentWindow.document.getElementById
> ('" + html_id  + "');"
>js +="  if(myelem){ "
>js +="myelem.onclick=" + onclick_js + ";"
>js +="  }"
>js +="};"
>
>#puts "exec_js is " + js
>
>SITE.browser.document.parentWindow.execScript(js, "javascript")
>
> On Mar 11, 1:04 pm, andrew.d...@lthree.com wrote:
>


...

--~--~-~--~~~---~--~~
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: Overiding onclick javascript

2009-03-12 Thread andrew . dahl

Thanks for all your help on this - I wouldn't have gotten this far
without it. I have attached to an onclick of a link, and the function
is being called. My only remaining issue is a missing 'event' object
in the js. This is on ie. Here is the js function being attached to
onclick:

onclick_js =   "function(){"
onclick_js =   "  alert('button clicked');"
onclick_js +=  "  event = window.event;"
onclick_js +=  "  if(event){"
onclick_js +=  "alert('found event');"
onclick_js +=  "  } else { "
onclick_js +=  "alert('no event available'); "
onclick_js +=  "  }"
onclick_js +=  "}"

I get the alert 'button clicked' and then 'no event available'.

Has anyone tried this and/or have any ideas on what to try. (I have
tried passing event as a parm to the funcion - no difference).

In case it helps, here is the code that attaches this js to the
onclick.

js = "var top_frame=document.getElementById('top_frame');"
js +="if(top_frame){"
js +="  var myelem=top_frame.contentWindow.document.getElementById
('" + html_id  + "');"
js +="  if(myelem){ "
js +="myelem.onclick=" + onclick_js + ";"
js +="  }"
js +="};"

#puts "exec_js is " + js

SITE.browser.document.parentWindow.execScript(js, "javascript")

On Mar 11, 1:04 pm, andrew.d...@lthree.com wrote:
> Here is a sample. This code does not throw any exceptions. js1,2,3 all
> result in a popup. js 4 does not - indicating that it is not finding
> the element I want. I gaurantee that the html element I am looking for
> is a child of top_frame. In fact, the code that calls this block
> checks that the html element exists using watir.
>
> js1= "alert('hi');"
>
> js2 = "var top_frame=document.getElementById('top_frame'); if
> (top_frame){alert('found top');};"
>
> js3 = "var top_frame=document.getElementById('top_frame'); if
> (top_frame){var myelem = top_frame.document.getElementById('" +
> html_id  + "'); alert('found top');};"
>
> js4 = "var top_frame=document.getElementById('top_frame'); if
> (top_frame){var myelem = top_frame.document.getElementById('" +
> html_id  + "'); if(myelem){ alert('found elem');}};"
>
> js = js4;
>
> puts "my js for " +  html_id + " is " + js
> SITE.browser.document.parentWindow.execScript(js, "javascript")
>
> Any ideas on what I should be using to access an element inside a
> frame? Note: I already tested without all the frame stuff, and it
> doesn't work either.
>
> Andy
>
> On Mar 11, 10:58 am, Andy Sipe  wrote:
>
>
>
> > Post a sample of your code.
>
> >  Remember that when you inject the JS you are working only with the dom and
> > the browser JS engine.  Nothing watir related.  The error your are posting
> > leads me to believe that somewhere  you are treating something that should
> > be JS as something in ruby.
>
> > -andy
>
> > On Wed, Mar 11, 2009 at 12:25 PM,  wrote:
>
> > > Yea, I remembered that 2 secs after posting.
>
> > > Does anyone know anyway to debug js being run with execScript?
>
> > > I am getting
>
> > >      execScript
> > >          OLE error code:80020101 in 
> > >            Could not complete the operation due to error 80020101.
> > >          HRESULT error code:0x80020009
> > >            Exception occurred. (WIN32OLERuntimeError)
> > >      C:/workspace/Guidewire/Common/lib/pages/GuidewirePage.rb:313:in
> > > `method_mi
> > > ssing'
>
> > > Note: I can get some js to work, such as alert('hi'), but it always
> > > fails when I use getElementById('someid')
>
> > > On Mar 11, 9:30 am, Andy Sipe  wrote:
> > > > lower case 'd'
>
> > > > @ie.document
>
> > > > Sorry about that.
>
> > > > -andy
>
> > > > On Wed, Mar 11, 2009 at 11:02 AM,  wrote:
>
> > > > > When I tried this I got
>
> > > > >      undefined method `Document' for #
> > > > > (NoMethodError)
>
> > > > > Is Watir::IE the correct object to be using here?
>
> > > > > On Mar 11, 8:53 am, Andy Sipe  wrote:
> > > > > > You should be able to read it using xpath or some other technique.
>
> > > > > > I don't believe you can set it directly with watir.  However you can
> > > > > always
> > > > > > inject javascript that will change the handler.  Something like:
>
> > > > > > @ie.Document.parentWindow.execScript("$('eleid').onclick =
> > > > > 'alert('hi');');
>
> > > > > > I didn't test that and I'm pretty sure the embedded " and ' are 
> > > > > > wrong
> > > but
> > > > > > you should be able to get the idea of how to set the handler.
>
> > > > > > -andy
>
> > > > > > On Wed, Mar 11, 2009 at 10:33 AM,  wrote:
>
> > > > > > > So I am clicking on a link that has an onclick handler. I would
> > > like
> > > > > > > to read/write the onclick handler. Is there a way to get at that.
> > > Just
> > > > > > > trying
>
> > > > > > > element.onclick = "sss"
>
> > > > > > > didn't work and neither did
>
> > > > > > > element.click = "sss"
>
> > > > > > > Is there a way to do this?
>
> > > > > > > Andy- Hide quoted text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quo

[wtr-general] Re: Counting selection option

2009-03-12 Thread Tiffany Fodor

Give this a try:

list_options = ie.select_list(:name 'my_list').getAllContents  #gives
you an array of the options

number_of_options = list_options.length  #array method length gives
you the number of elements in the array

Hope this helps!

-Tiffany



On Mar 12, 10:11 am, maximore  wrote:
>  hello  I want to  count the number of  option on a pull down
> menu  
>  how can i go about  doing  just this  in ruby?  I know there is a
> way of going about this just don't know how .
>
>  thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Counting selection option

2009-03-12 Thread maximore

 hello  I want to  count the number of  option on a pull down
menu  
 how can i go about  doing  just this  in ruby?  I know there is a
way of going about this just don't know how .

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



[wtr-general] Re: Hoe to Execute another scripts

2009-03-12 Thread marekj
sorry, but Hoe, http://seattlerb.rubyforge.org/hoe/
would not be the best way to execute scripts
Use Rake, SpecTask or good old TestUnit runner.

marekj

Watirloo: Semantic Page Objects in UseCases
Human Readable Machine Executable Acceptance Testing
http://github.com/marekj/watirloo/



On Thu, Mar 12, 2009 at 7:02 AM, Vikas Tulashyam wrote:

>
> Hi Guys,
> Please provide me the solution for the following problems
>
> 1.  I want to execute ruby scripts from a single file, like  I want to
> create a Test suite and want to call each test case which is a
> separate ruby file, so how to call scripts.
>
> 2. I am creating some common utilities for my project , so How I can
> call them in my projects, let say I have created a Module
> 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
> this scripts by providing the exact path of the ruby script and I can
> call this within that folder only.
>
>
>
> Thanks in advance
>
> 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: HttpWatch and Watir 1.6.2

2009-03-12 Thread marekj
I wrote this a year ago
http://www.marekj.com/2008/04/using-httpwatch-with-watir/

With Watir 1.6.2 you don't have to change anything. You stil work with IE
right?
and here is your bug:
plugin = control.browser.Attach(browser.browser) # <= should be
browser.ie

But this gives an error:

in `method_missing': unknown property or method `browser' # <= IE class does
not have browser method

marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/



On Thu, Mar 12, 2009 at 8:32 AM, JArkelen  wrote:

>
> Hi,
>
> With this example you can integrate HttpWatch with Watir:
>
> require 'win32ole'
> require 'watir'
>
> control = WIN32OLE.new('HttpWatch.Controller')
> ie = Watir::IE.new
> plugin = control.ie.Attach(ie.ie)
> plugin.Clear()
> plugin.Record()
> ie.goto("www.google.com")
> plugin.stop()
>
> Now I want to use this with Watir 1.6.2 and I assume that these lines
> would be changed:
>
> browser = Watir::Browser.new
> plugin = control.browser.Attach(browser.browser)
>
> But this gives an error:
>
> in `method_missing': unknown property or method `browser'
>
> Any ideas?
>
> Cheers,
> John
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: soa testing

2009-03-12 Thread Charley Baker
No, Watir is a library to Automate browsers for web testing. That being
said, Ruby has SOAP libraries(soap4r) that we're using quite extensively to
test SOAP based services. The benefit of using a real language as opposed to
VendorScript is that there are libraries for just about anything you'd want
to do - XML, SOAP, databases, MQ, etc.


Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Thu, Mar 12, 2009 at 6:14 AM, bright  wrote:

>
> Just to confirm, does Watir support SOA testing.
>
> >
>

--~--~-~--~~~---~--~~
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: HttpWatch and Watir 1.6.2

2009-03-12 Thread Charley Baker
Close, but it looks like you're confusing httpwatch methods with Watir
methods:


require 'win32ole'
require 'watir'

control = WIN32OLE.new('HttpWatch.
>
> Controller')
>   browser = Watir::Browser.new
> plugin = control.ie.Attach(browser.ie )
> plugin.Clear()
> plugin.Record()
> browser.goto("www.google.com")
> plugin.stop()


control.ie.Attach is an HttpWatch call.

HTH,

Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Thu, Mar 12, 2009 at 7:32 AM, JArkelen  wrote:

>
> Hi,
>
> With this example you can integrate HttpWatch with Watir:
>
> require 'win32ole'
> require 'watir'
>
> control = WIN32OLE.new('HttpWatch.Controller')
> ie = Watir::IE.new
> plugin = control.ie.Attach(ie.ie)
> plugin.Clear()
> plugin.Record()
> ie.goto("www.google.com")
> plugin.stop()
>
> Now I want to use this with Watir 1.6.2 and I assume that these lines
> would be changed:
>
> browser = Watir::Browser.new
> plugin = control.browser.Attach(browser.browser)
>
> But this gives an error:
>
> in `method_missing': unknown property or method `browser'
>
> Any ideas?
>
> Cheers,
> John
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Hoe to Execute another scripts

2009-03-12 Thread JArkelen

Use Rake for executing multiple test scripts.

On Mar 12, 2:21 pm, Al Snow  wrote:
> For #1, check out the Watir unit tests. You can get them at Github.
>
> Thanks,
> Al Snow
> Agile Software Automation Developer
> Linkedin:http://www.linkedin.com/in/alsnow
> Google Talk: jasnow1
> Twitter: jasnow
>
>
>
> > Date: Thu, 12 Mar 2009 05:02:08 -0700
> > Subject: [wtr-general] Hoe to Execute another scripts
> > From: vtulash...@gmail.com
> > To: watir-general@googlegroups.com
>
> > Hi Guys,
> > Please provide me the solution for the following problems
>
> > 1.  I want to execute ruby scripts from a single file, like  I want to
> > create a Test suite and want to call each test case which is a
> > separate ruby file, so how to call scripts.
>
> > 2. I am creating some common utilities for my project , so How I can
> > call them in my projects, let say I have created a Module
> > 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
> > this scripts by providing the exact path of the ruby script and I can
> > call this within that folder only.
>
> > Thanks in advance
>
> > Vikas
>
> _
> Express your personality in color! Preview and select themes for 
> Hotmail®.http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TX...
--~--~-~--~~~---~--~~
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] HttpWatch and Watir 1.6.2

2009-03-12 Thread JArkelen

Hi,

With this example you can integrate HttpWatch with Watir:

require 'win32ole'
require 'watir'

control = WIN32OLE.new('HttpWatch.Controller')
ie = Watir::IE.new
plugin = control.ie.Attach(ie.ie)
plugin.Clear()
plugin.Record()
ie.goto("www.google.com")
plugin.stop()

Now I want to use this with Watir 1.6.2 and I assume that these lines
would be changed:

browser = Watir::Browser.new
plugin = control.browser.Attach(browser.browser)

But this gives an error:

in `method_missing': unknown property or method `browser'

Any ideas?

Cheers,
John



--~--~-~--~~~---~--~~
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: Hoe to Execute another scripts

2009-03-12 Thread Al Snow

For #1, check out the Watir unit tests. You can get them at Github.

Thanks,
Al Snow
Agile Software Automation Developer
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow


> Date: Thu, 12 Mar 2009 05:02:08 -0700
> Subject: [wtr-general] Hoe to Execute another scripts
> From: vtulash...@gmail.com
> To: watir-general@googlegroups.com
> 
> 
> Hi Guys,
> Please provide me the solution for the following problems
> 
> 1.  I want to execute ruby scripts from a single file, like  I want to
> create a Test suite and want to call each test case which is a
> separate ruby file, so how to call scripts.
> 
> 2. I am creating some common utilities for my project , so How I can
> call them in my projects, let say I have created a Module
> 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
> this scripts by providing the exact path of the ruby script and I can
> call this within that folder only.
> 
> 
> 
> Thanks in advance
> 
> Vikas
> 
> 
> > 

_
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
--~--~-~--~~~---~--~~
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: Very slow typing speed for firefox 2 : watir 1.6.2

2009-03-12 Thread bwaybandit

windows XP / SP2 (Version 2002)

On Mar 11, 5:15 pm, Aedorn Varanis  wrote:
> Then we need to figure out what is different between your install, and
> our install. Are you running under Linux or Windows? And if it's
> Linux, did you do a global or per-user install of the jssh extension?
>
> On Wed, Mar 11, 2009 at 5:43 AM, bwaybandit  wrote:
>
> > i have FF3 and jssh 0.9 and do not see the delay anymore.
>
> > On Mar 10, 11:11 pm, aed...@gmail.com wrote:
> >> I'm running into the same issue but on Firefox 3. Slow characters
> >> being typed (about 1 a second as mentioned.) However, I have a Firefox
> >> 2.0 machine that flies through. The only different is the version of
> >> JSSH, and the version of Firefox. It's JSSH 0.1  ... so ... really old
> >> in comparison to 0.9. I would say it is safe to assume that the issue
> >> lies with JSSH.
>
>
--~--~-~--~~~---~--~~
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: When do you start writing WATiR scripts?

2009-03-12 Thread bwaybandit

Bhavna, Step 3 is best approach that has worked for me over the last
two years. I work with 2 week cycles as well and writing automated
tests takes a lot longer than one would imagine. One thing to remember
is that you only see the value of those automated tests till after one
or two releases are already out in production.

Automated testing is suited to people who enjoy development. Refrain
from taking a manual tester and trying to get them to automate. In my
experience, not everyone will want to code and if you get people who
want to but have never written code before, then you have all sorts of
maintainability problems with scripts down the line. This means you
need a development like team structure and go through code reviews
etc. I spend most of my time writing common code and then hammering
out the tests are a whole lot easier and faster.

To answer your question, Watir rocks. No tool is perfect but there are
always work arounds to get the job done and if your work around is
really good, you can actually work on getting it into the Watir code
base.

On Mar 12, 1:31 am, Bhavna Kumar  wrote:
> It's MUCH more than a month, but I thought I would report back on what we
> tried where we met with success.
>
> We tried the following:
>
> 1> A manual tester writing test cases and doing manual testing. An
> "automation tester" wrote methods needed to exercise  functionality and
> handed it over to the manual tester, who then had to "convert" manual test
> cases into test data for the watir script (i.e., populate an Excel sheet)
>
> This approach didn't work AT ALL. The automation tester got focused on the
> beauty of well written code and the manual tester got tied up in knots
> trying to populate the Excel sheet of data, which seemed really alien.
>
> 2> The next approach we tried was to have an automation tester automate
> product functionality for which development had finished and wasn't actively
> being worked on.
>
> IMO, this proved to be fairly wasteful and pointless.
>
> 3> The approach that we currently follow: Dev/Test work in two week
> iterations. While devs work on developing a story, testers work on
> understanding the functionality and generating test ideas. When a story is
> dev complete, the tester first tests manually and after reporting bugs, if
> there are no blockers, works to automate the tests.
>
> This approach works pretty well because IMO we have managed to create a
> structure that is simple enough for non-programmers to work with. We use the
> Ruby Unit Test framework and use asserts to write tests that look
> ridiculously simple (see below). Each iteration we manage to automate some
> percentage of our tests, which is much better than 100% manual testing all
> the time.
>
> class TestCreateNewEmployee< Test::Unit::TestCase
>   include NewEmployeePayslip_Methods
>   ...
>   def test_0010_create_new_employee_mandatory_fields
>
>     tc = '0010'
>
>     test_data =  get_input_data(tc, EMP_SHEET)    //gets a row of data from
> an Excel sheet
>     create_new_employee(tc, test_data) //populates the screen with data from
> the Excel sheet
>   end
>   ...
> end
>
> The cons of this approach is that some manual testers have a mental barrier
> to automation (since it involves writing "code").
>
> 4> The approach that we are currently exploring is to see if we can use
> Cucumber instead of Excel to document our test scenarios.
>
> Can somebody point me to a good, current Cucumber/Watir tutorial? I've
> looked athttp://vimeo.com/2871256already.
>
> Thanks,
> Bhavna
>
> On Thu, Aug 7, 2008 at 2:52 AM, Jeff Fry  wrote:
> > I think this is very context-specific. You're quite right to wonder about
> > the cost of automating an unstable interface. That said, I've found specific
> > situations where I've been very happy to use watir on early code. In fact,
> > watir is light-weight enough that I'm regularly generate 'throw-away' code
> > for a specific test, because the cost is low enough. For example, if I want
> > to explore what'll happen if I a discussion thread has 100s of posts on it,
> > I can quickly use watir to generate that state. That might be a script I
> > want to hold onto and maintain, but it might also be one that I'd be happy
> > to not maintain.
>
> > I'll also add that watir lets you drive a web app through a variety of
> > means. Certain changes (e.g. the placement of a button on the page, or the
> > addition of a new button) may not break existing scripts. I'd probably start
> > by discussing with the programmers what if anything I can expect to be
> > constant. They might be perfectly willing to support some API for you, for
> > example putting IDs on elements, and keeping those IDs the same even if
> > they're changing other things.
>
> > Without knowing more of what your context is, I'd suggest starting with a
> > very small investment to begin, and see what works for you and what doesn't.
>
> > ...Then if you're game, write us a little report a months from now about
> > 

[wtr-general] Re: Very slow typing speed for firefox 2 : watir 1.6.2

2009-03-12 Thread bwaybandit

FF 3.0.5. Not sure if that would make a difference and am not sure at
what point i saw it stop happening. If i have some spare cycles, I
will see if i can step back and see what versions caused the slowdown.

On Mar 11, 5:15 pm, Aedorn Varanis  wrote:
> Then we need to figure out what is different between your install, and
> our install. Are you running under Linux or Windows? And if it's
> Linux, did you do a global or per-user install of the jssh extension?
>
> On Wed, Mar 11, 2009 at 5:43 AM, bwaybandit  wrote:
>
> > i have FF3 and jssh 0.9 and do not see the delay anymore.
>
> > On Mar 10, 11:11 pm, aed...@gmail.com wrote:
> >> I'm running into the same issue but on Firefox 3. Slow characters
> >> being typed (about 1 a second as mentioned.) However, I have a Firefox
> >> 2.0 machine that flies through. The only different is the version of
> >> JSSH, and the version of Firefox. It's JSSH 0.1  ... so ... really old
> >> in comparison to 0.9. I would say it is safe to assume that the issue
> >> lies with JSSH.
>
>
--~--~-~--~~~---~--~~
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] soa testing

2009-03-12 Thread bright

Just to confirm, does Watir support SOA testing.

--~--~-~--~~~---~--~~
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] not able to execute the own created rasta example

2009-03-12 Thread rrash586



Hello ,


I m new to rasta ,i m able to execute the sample example of rasta that
are given .But facing problem while try to run out the simple example
of opening the IE browser and navigating to url (www.google.com)




Error that i get when i run the command is

c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/lib/rasta/
spreadsheet.
rb:303:in `method_missing': Columns (WIN32OLERuntimeError)
OLE error code:800A03EC in 
  
HRESULT error code:0x80020009
  Exception occurred.   from c:/ruby/lib/ruby/gems/1.8/gems/
rasta-0.1.9-
x86-mswin32-60/lib/rasta/spreadsheet.rb:303:in `colname'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:282:in `cellrange'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:288:in `cellrangevals'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:394:in `locate_headers'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:242:in `initialize'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:188:in `new'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:188:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/spreadsheet.rb:183:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/fixture_runner.rb:153:in `execute'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/fixture_runner.rb:150:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
/fixture_runner.rb:150:in `execute'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
.rb:187:in `run_test_fixtures'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
lib/rasta
.rb:93:in `run'
from c:/ruby/lib/ruby/gems/1.8/gems/rasta-0.1.9-x86-mswin32-60/
bin/rasta
:4
from c:/ruby/bin/rasta:16:in `load'
from c:/ruby/bin/rasta:16



any pointing will be helpful

Thanks in advance
--~--~-~--~~~---~--~~
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] Hoe to Execute another scripts

2009-03-12 Thread Vikas Tulashyam

Hi Guys,
Please provide me the solution for the following problems

1.  I want to execute ruby scripts from a single file, like  I want to
create a Test suite and want to call each test case which is a
separate ruby file, so how to call scripts.

2. I am creating some common utilities for my project , so How I can
call them in my projects, let say I have created a Module
'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
this scripts by providing the exact path of the ruby script and I can
call this within that folder only.



Thanks in advance

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: Failed to start because msvcr80-ruby18.dll was not found

2009-03-12 Thread Dragan

I am trying to install watir. That is what I have done:
- install ruby 1.8.6-27 Release Candidate 2
- gem update --system
- gem install watir

Than I've got 'msvcr80-ruby18.dll was not found' problem when trying
to run watir script. I have found this post, and therefore tried this:
- gem uninstall win32-api
 1. win32-api-1.2.0-x86-mswin32-60
 2. win32-api-1.2.1-x86-mswin32-60
 3. win32-api-1.4.0-x86-mswin32-80
 4. All versions
- I select 3, and than Y (Continue with Uninstall? [Yn])
  It says Successfully uninstalled win32-api-1.4.0-x86-mswin32-80 on
the end

Now when I try to run watir script, I get
no such file to load -- watir/ie (LoadError)
for the line
$ie = Watir::IE.new

What did I do wrong?
--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Thanks, :), it is exactly what I want.

I ask this kind of questions because I find, in my code, I use too many:
include module.
When I include the module into the class, all the methods in the module
comes into the class's method. That's terrible.


Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 5:34 PM, Željko Filipin
 wrote:

> On Thu, Mar 12, 2009 at 10:32, wesley chen  wrote:
> > I would like to print all my methods out.
>
> And this is not what you need?
>
> class MyClass
>   # some code
> end
>
> variable = MyClass.new
> variable.methods
>
>
> Ž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: How to print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Thanks.

class.instance_methods
module.instance_methods make it.


Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 5:32 PM, wesley chen  wrote:

> Hi, Zeljko,
> Sorry, I have not demonstrated clearly enough.
>
> Suppose I have written a module or a class, in the module or class, I have
> written many methods. I would like to print all my methods out.
> How can I make it?
>
>
> Any suggestion would be appreciated.
> Thanks.
> Wesley Chen.
>
>
> On Thu, Mar 12, 2009 at 5:24 PM, Željko Filipin
>  wrote:
>
>> On Thu, Mar 12, 2009 at 10:18, wesley chen  wrote:
>> > How to print the methods in the class or module out?
>>
>> Wesley,
>>
>> you need this?
>>
>> >> a = ""
>> => ""
>> >> a.methods
>> => ["%", "select", "[]=", "inspect", "<<", "each_byte", "clone", "method",
>> "gsub", "casecmp", "public_methods", "to_str", "partition", "tr_s",
>> ...
>> "capitalize!", "scan", "[]"]
>>
>>
>>
>> Ž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: How to print all the methods in the Class or Module out?

2009-03-12 Thread Željko Filipin
On Thu, Mar 12, 2009 at 10:32, wesley chen  wrote:
> I would like to print all my methods out.

And this is not what you need?

class MyClass
  # some code
end

variable = MyClass.new
variable.methods

Ž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: How to print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Hi, Zeljko,
Sorry, I have not demonstrated clearly enough.

Suppose I have written a module or a class, in the module or class, I have
written many methods. I would like to print all my methods out.
How can I make it?


Any suggestion would be appreciated.
Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 5:24 PM, Željko Filipin
 wrote:

> On Thu, Mar 12, 2009 at 10:18, wesley chen  wrote:
> > How to print the methods in the class or module out?
>
> Wesley,
>
> you need this?
>
> >> a = ""
> => ""
> >> a.methods
> => ["%", "select", "[]=", "inspect", "<<", "each_byte", "clone", "method",
> "gsub", "casecmp", "public_methods", "to_str", "partition", "tr_s",
> ...
> "capitalize!", "scan", "[]"]
>
>
>
> Ž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: How to print all the methods in the Class or Module out?

2009-03-12 Thread Željko Filipin
On Thu, Mar 12, 2009 at 10:18, wesley chen  wrote:
> How to print the methods in the class or module out?

Wesley,

you need this?

>> a = ""
=> ""
>> a.methods
=> ["%", "select", "[]=", "inspect", "<<", "each_byte", "clone", "method",
"gsub", "casecmp", "public_methods", "to_str", "partition", "tr_s",
...
"capitalize!", "scan", "[]"]



Ž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] How to print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Hi, Guys,
How to print the methods in the class or module out?

Any suggestion would be appreciated.


Thanks.
Wesley Chen.

--~--~-~--~~~---~--~~
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: Sleep function

2009-03-12 Thread wesley chen
:), you're right.


Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 4:49 PM, Jarmo Pertman  wrote:

>
> Why did you use all of this while loop and Time.now and stuff, when
> "sleep 5*60" was the only line needed to sleep for 5 minutes?
>
> Jarmo
>
> On Mar 5, 3:15 am, wesley chen  wrote:
> > If you want to sleep 5 mins, please try the code below:
> >
> > require 'watir'
> > t=Time.now
> > while (Time.now-t)<1
> > sleep 300
> > end
> > puts "OK"
> >
> > Thanks.
> > Wesley Chen.
> >
>

--~--~-~--~~~---~--~~
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: Sleep function

2009-03-12 Thread Jarmo Pertman

Why did you use all of this while loop and Time.now and stuff, when
"sleep 5*60" was the only line needed to sleep for 5 minutes?

Jarmo

On Mar 5, 3:15 am, wesley chen  wrote:
> If you want to sleep 5 mins, please try the code below:
>
> require 'watir'
> t=Time.now
> while (Time.now-t)<1
> sleep 300
> end
> puts "OK"
>
> Thanks.
> Wesley Chen.
--~--~-~--~~~---~--~~
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 add any data into the EXCEL sheet using Excel interface class

2009-03-12 Thread rrash586

Hi  ,Ya i m getting data in myData but i m facing problem while
writring data into excel sheet "i m taking data from one excel sheet
and want to write it on other excel sheet using Excel interface class
"Xls" "
How could i do this ?



On Mar 10, 9:23 pm, Tiffany Fodor  wrote:
> Hi!
>
> Have you verified that you're getting data into myData?  I think you
> need to specify a cell range and worksheet for the data:
>
> myData = xlFile.getRowRecords('A1:Z50', 'Example')
>
> where 'Example' is the name of your worksheet.
>
> Hope this helps!
>
> -Tiffany
>
> On Mar 10, 5:47 am, rrash586  wrote:
>
>
>
> > Hello all actually in the below program i m trying to Retrieve  data
> > from one excel sheet and place that data on text field of google page
> > and after click on search button  will navigate to search result page
> > Now i want to take this "url"(ie.url) of webpage and  write it on
> > other EXCEL sheet .But I m unable to add it using Xls method
> > "write2DArray()"
>
> > How to add single element in excel sheet using "Xls"(Excel Interface
> > Class) class
>
> > can anyone suggest me how to do it  using "Xls"
> > Thanks in advance
>
> > require 'Xls'
> > require 'watir'
>
> > xlFile = XLS.new("D:\\test_XLS_data.xls") #grab the data file in the
> > same dirrectory
> > myData = xlFile.getRowRecords('Google Search Data','Example')  #pull
> > data records  from excel
> > xlFile.close
>
> > $j=0
> > $array =Array.new
> > myData.each do |record|
> >   ie = Watir::IE.start('google.com')
> >   ie.text_field(:name,'q').set(record['SearchString'])
> >   ie.button(:name,'btnG').click
> >   result =ie.url
> > $array[$j] =result
> > $j=$j+1
> > ie.close
> > end
>
> > xlFile = XLS.new("D:\\result_xls.xls")- 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
-~--~~~~--~~--~--~---