[wtr-general] Re: Error while running Watir

2009-03-05 Thread amit kulkarni
Hi,

   When i tried for the first time then it didnt work,

   But after trying for 2-3 times it worked.I am using it on Vista platform.

   Try it out for 2-3 times..

   Also did u installed the jssh addon for firefox?

Thanks,

Amit

--~--~-~--~~~---~--~~
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 send a mail from outlook express using watir

2009-03-05 Thread prasoona alluri
Thank for the reply.

But i am facing the following error
`initialize': unknown OLE server: `Outlook.Application'
(WIN32OLERuntimeError)
for the following statement
require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')

Thanks


On Thu, Mar 5, 2009 at 5:12 AM, Walter Kruse ou_ryp...@hotmail.com wrote:

 This is for Outlook, but maybe it can help:
 http://rubyonwindows.blogspot.com/search/label/outlook


 --
 Date: Thu, 5 Mar 2009 04:40:02 -0600
 Subject: [wtr-general] How to send a mail from outlook express using watir
 From: pallu...@gmail.com
 To: watir-general@googlegroups.com


 Hello,

  Please help me to delvelop a script for  sending  a mail from outlook
 express using watir.
 The message text should be read from a log file .

 Thanks in advance.
 -Prasoona



 --
 See all the ways you can stay connected to friends and 
 familyhttp://www.microsoft.com/windows/windowslive/default.aspx
 


--~--~-~--~~~---~--~~
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] MYSQL error

2009-03-05 Thread Vikas Tulashyam

Hi Friends,
I have installed the MYSQL server 5.1. But when I am trying to connect
it through watir I am gettin an error - This Application has failed
to start becasue LIBMYSQL.dll was not found. Re-installing the
application may fix this problem. I tried to register this dll but i
got an error -libmysql.dll was loaded, but the dllserver registry
entry point was not found. This file cannot be registered.

Please help me if anyone has any idea.

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] link tag

2009-03-05 Thread TCBlues

Hallo,
I have this on the html: link rel=stylesheet href=/Cad/css/
sheetCP.css type=text/css media=screen, projection

How is possible to get access to this tag? I need to get the href.

It's not possible through ie.link.

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] Re: Watir users: What is your role at work?

2009-03-05 Thread Pete Dignan

Some related data... we've had a poll on the front page of the
WatirCraft site for a while now that asks who uses Watir in your
organization?  there have been 129 responses as of this morning.

35% say just me (sorry, that doesn't tell you their role)

36% say testers only

17% say testers and developers

2% say developers only

10% say we don't distinguish between developers and testers

Pete



On Mar 4, 8:39 am, george.sand...@gmail.com
george.sand...@gmail.com wrote:
 I was just curious to know who is purely a QA tester (like myself) and
 who is both a tester and a developer...
--~--~-~--~~~---~--~~
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] Help Object repository

2009-03-05 Thread Neeraj Sharma

Hi,
i am very new to Ruby as well as Watir,i have seen somewhere on this
group that Object repository concept is not supported completely by
Watir.
any comments on this

--~--~-~--~~~---~--~~
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: link tag

2009-03-05 Thread bwaybandit

one whacky way of doing it is to use the html of the page. will
require some parsing on your part to get to the href.

pageToParse=ie.html

getMeTheHref=pageToParse.grep(/href/)

now you can parse getMeTheHref to get your href out.

On Mar 5, 7:17 am, TCBlues tcbl...@gmail.com wrote:
 Nope... it doesn't work

 On Mar 5, 12:11 pm, wesley chen cjq@gmail.com wrote:

  Try the code below
  $ie.links.collect { |link|
  puts link.href

  }

  Thanks.
  Wesley Chen.

  On Thu, Mar 5, 2009 at 8:07 PM, TCBlues tcbl...@gmail.com wrote:

   Hallo,
   I have this on the html: link rel=stylesheet href=/Cad/css/
   sheetCP.css type=text/css media=screen, projection

   How is possible to get access to this tag? I need to get the href.

   It's not possible through ie.link.

   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] Re: link tag

2009-03-05 Thread TCBlues

So there is no other option...

On Mar 5, 4:05 pm, bwaybandit lenridge...@gmail.com wrote:
 one whacky way of doing it is to use the html of the page. will
 require some parsing on your part to get to the href.

 pageToParse=ie.html

 getMeTheHref=pageToParse.grep(/href/)

 now you can parse getMeTheHref to get your href out.

 On Mar 5, 7:17 am, TCBlues tcbl...@gmail.com wrote:

  Nope... it doesn't work

  On Mar 5, 12:11 pm, wesley chen cjq@gmail.com wrote:

   Try the code below
   $ie.links.collect { |link|
   puts link.href

   }

   Thanks.
   Wesley Chen.

   On Thu, Mar 5, 2009 at 8:07 PM, TCBlues tcbl...@gmail.com wrote:

Hallo,
I have this on the html: link rel=stylesheet href=/Cad/css/
sheetCP.css type=text/css media=screen, projection

How is possible to get access to this tag? I need to get the href.

It's not possible through ie.link.

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] Re: clicking on a link, with certain parameters changing every time

2009-03-05 Thread SQAPro

I think you have a few potential solutions

1) talk to your developers about making this thing more testable, e.g.
assign something like an ID or Name value to that link in the HTML, it
won't be visable on the page, but it would make it easier to select
the right link.  I don't know your app, but potentially this could be
a very simple change for the developers to make and could vastly
increase the testability of the product.

2) don't get the link by index.   You obviously have some idea what
makes this the 'right' link, and it seems to center around the URL
value.  So figure out how to express the pattern of the 'right url' as
a regular expression, and select the link by :URL using that regular
expression.  (watir devs, I'm not nuts right? that should work
shouldn't it?)

On Mar 4, 9:43 pm, Rasika rasika.bahiram...@gmail.com wrote:
 Thanks for rresponses
 I used
 ie.link(index,2).text
 to fetch the values
 value.split to use them in next step.

 But another issue,
 Index of link always changes, and there is no other attribute to
 identify this link.
 How can I make sure I am clicking on correct link every time?

 On Mar 5, 2:53 am, SuperKevy kpe...@scholarshipamerica.org wrote:



  You want the URL I'm assuming.. then parse that for the info at the
  end

  ---Sample of Google.  Whats the URL to the Privacy link --
  require 'watir'
  include Watir
  ie. = IE.new
  ie.goto('http://www.google.com')
  puts ie.link(:text,'Privacy').attribute_value('href')- 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] watir installed to non-default gem path

2009-03-05 Thread Cliff

Hello Group

Has anybody tried running watir installed to a non-default gem system
path?  For example, assuming you've installed all required gems using
something like:

gem install gem --no-rdoc --no-ri --ignore-dependencies -i /temp/
gems

Then in irb:
require 'rubygems'
Gem.clear_paths
ENV['GEM_HOME'] = \temp\gems
ENV['GEM_PATH'] = \temp\gems

require 'watir'
Watir::options = {:browser = 'ie'}
Watir::Browser.new  NameError: (eval):1:in `klass': uninitialized
constant Watir::IE

Note, with this setup if :browser = 'firefox' the Watir::Browser.new
opens firefox as expected.
--~--~-~--~~~---~--~~
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: enabled_popup internal error

2009-03-05 Thread Jim Matthews

One thing I forgot to mention: someone else got click_no_wait to work
by going into IE -Tools - Internet Options...-Advanced and under
Security, check the box titled Allow active content to run in files
on My Computer.

Jim

On Mar 5, 9:32 am, Jim Matthews jim_m...@swbell.net wrote:
 Glad to know that helped.  Now you are at the point I am at.  There
 are several of us working to see if we can resolve the problem.  It
 appears that the same Ruby / Watir combination works for some people
 and does not work for others as far as handling the javascript
 popups.  Because of this, we think there is some system setting that
 makes the difference rather than it being strictly a Ruby and Watir
 problem.  If you have any insights on this, please share them.

 I will try to answer some of your questions.  First the normal click
 that brings up the javascript popup is blocking.  The script cannot
 proceed until the popup is dismissed.  If the code to dismiss the
 popup is in the same thread, it stays that way forever (well you know
 what I mean).  The click_no_wait is non blocking, which allows your
 script to continue with the routine to dismiss the popup.

 So, the short answer is that just click won't work for something
 that brings up a popup (I'll add the qualification that it does work
 if you create a separate thread to click the popup.  I only mention
 this because there some examples floating around that do that.  I do
 not want to lead you too far astray if you find one.)  So the
 preferred method of clicking something that brings up a popup is
 click_no_wait.  Unfortunately, what I am seeing is that the button
 flashes but no popup ever comes up and the routine to click it times
 out.  I have had a little success with  click!.  click!  is also not
 blocking.  That works one time for me but not the second time in the
 same script.

 I think the confusion about the page and page container has to do with
 confusion over the term page.  The cucumber page is not the same
 exactly the same as the Watir page.  Beyond that,  I cannot offer
 much information.  Just be aware that although people use the same
 name for things in different programs, they might not mean the same
 thing.

 Try the  click!  on the button that brings up the popup and see if
 that works for you (since it sounds like the click_no_wait doesn't
 work for you) and let us know your results.  If you figure anything
 out about system settings that might affect this, let us know.  If I
 find out anything else for you, I'll post it here.

 Jim

 On Mar 5, 8:12 am, andrew.d...@lthree.com wrote:

  That got me further.

  Now I have a question about click_no_wait. When I use just 'click', I
  get a popup with an OK and Cancel button. When I use click_no_wait, I
  am now not getting any popup. If I use sleep right after
  click_no_wait, does the browser keep going so I would expect to see a
  popup?

  And no, the OK button is not getting clicked to clear the popup.

  Here is the code.

      roles_page.roles.row(:name = Test Role).col1_element.click
  #click on checkbox

  roles_page.bottom_delete.click_no_wait
  # shows confirm dialog (only working if I use click)
      sleep 5
      startClicker
  (OK)
  # try to click OK button, doesn't work

  and startclicker is now

  def startClicker( button_label , waitTime= 9, user_input=nil )
    # get a handle if one exists
    hwnd = nil
    begin
      hwnd = SITE.browser.enabled_popup(waitTime)
    rescue TimeOutException = e #===This
  exception is always thrown right now
      #popup not found
    end

    if (hwnd)  # yes there is a popup
      puts 'popup found'
      w = WinClicker.new
      w.makeWindowActive(hwnd)

      if ( user_input )
        w.setTextValueForFileNameField( hwnd, #{user_input} )
      end

      # OK or whatever the name on the button is
      puts Trying to click on  + button_label
      w.clickWindowsButton_hwnd( hwnd, button_label )
      #
      # this is just cleanup
      w=nil
    else
      puts No popup found
    end
  end

  On a side note, why is enabled_popup defined as part of PageContainer
  if it is meant to be called from a browser object only?

  On Mar 4, 3:21 pm, Jim Matthews jim_m...@swbell.net wrote:

   OK, too bad you did not include this originally.  I think I know what
   the problem is.  At least I see something that is a problem.  You
   have:

   hwnd = page_container.enabled_popup(waitTime)

   hwnd belongs to the browser, not the page, so you have to reference
   the borwser object like:

   hwnd = $ie.enabled_popup(waitTime)

   or change $ie to browser, or whatever you have defined as your browser
   object.

   I am doing something similar with Cucumber and I am having trouble
   with this.  It successfully dismisses the first popup I hit but does
   not work on the second.  I hope it works for you.  Let me know,  I am
   still trying to figure out the difference.

   Jim

   On Mar 4, 3:55 pm, 

[wtr-general] Re: Watir users: What is your role at work?

2009-03-05 Thread Lisa Crispin
George, that's interesting that you want to migrate more into development.
The person who wrote most of our Watir scripts (and did a good job with the
design, I think) was a Perl scripter before he came to us, and while he is
still working as a tester / test automation guy, he wants to move back into
development. The tester we hired after he left, who also did a lot of work
on the Watir scripts, decided to learn Java and be a developer so that is
what he has done (still on our team). So I can't help wondering if someone
who succeeds with Watir is always going to be someone with a strong desire
to do programming. I personally love automating test scripts, but I wouldn't
want to write production code. I can't explain why that is (I used to be a
programmer, back in the pre-OO days).

I'm trying to do most of the Watir work now in fear that our latest new
tester might go through the same transition! Just joking, but she also has a
strong programming and automation background. I think that's really required
on a small team like ours.
-- Lisa

On Thu, Mar 5, 2009 at 9:46 AM, George george.sand...@gmail.com wrote:


 Charley, speaking on that spectrum, I'm just getting into real
 programming, and would like to slide more towards being a real
 developer while retaining and building on my testing skills. Out of
 our entire QA team, I'm becoming the scripting guy, which is kind of
 sad since we all need to be at the same level. Nevertheless, I'm
 thoroughly enjoying my education and it seems that I have some job
 security. I've been tasked to automate testing for all of our web
 applications.

 I hope to go from understanding 20% of the posts on this forum to at
 least 40% :)

 On Mar 4, 2:25 pm, Charley Baker charley.ba...@gmail.com wrote:
   I'm a test developer, with a background in testing as well as
 development.
  Test scripts and automation testing should be run as development projects
 -
  scm, code reviews, ideally paired programming, branch cuts, working with
 the
  production code developers, running, creating and sharing tests.
 
  There's a spectrum of where you place yourself on the scale between
 tester
  and developer. The question definitely deserves a  longer answer.
 Something
  we tried tackling at the td/dt conf a year or two back. As a side note, I
  don't hire people who have no automation experience, there has to be some
  scripting skills.
 
   It's an interesting question.
 
  Charley Baker
  blog:http://charleybakersblog.blogspot.com/
  Lead Developer, Watir,http://wtr.rubyforge.org
  QA Architect, Gap Inc Direct
 
  On Wed, Mar 4, 2009 at 1:00 PM, JArkelen johnvanarke...@gmail.com
 wrote:
 
   Hi,
   I'm a test automater en performance tester and use Watir for our
   functional regression tests.
 
   On Mar 4, 6:14 pm, Lisa Crispin lisa.cris...@gmail.com wrote:
Hi George,
I'm a tester, I have learned enough Ruby to maintain and write new
 Watir
scripts, and I know enough Java to sometimes be able to look at a
   traceback
and figure out what the problem might be!
 
It's a great question, I'm curious to know now too. Most Watir people
 I
   know
have solid programming skills, and I think that makes things much
 easier
   all
around for using Watir.
-- Lisa
 
On Wed, Mar 4, 2009 at 8:39 AM, george.sand...@gmail.com 
   - Show quoted text -
 
george.sand...@gmail.com wrote:
 
 I was just curious to know who is purely a QA tester (like myself)
 and
 who is both a tester and a developer...
 
--
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for
   Testers
and Agile Teams_ (Addison-Wesley 2009)http://lisacrispin.com
 



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://lisacrispin.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] How to write script to click date from calender

2009-03-05 Thread Dharmendra
Hi All,

Need your help.

I have a page in which following javascript is used to display calender.

SCRIPT type=text/javascript src=
dhtmlgoodies_calendar/dhtmlgoodies_calendar.js?random=20060118/script

a onClick=displayCalendar(document.forms[0].fromDate,'-mm-dd
',this,true) title=Calenderimg align=top src=
../images/b-cal-c-up.gif http://10.0.3.107:8080/images/b-cal-c-up.gif 
/a


Now i need to click on calender and select a date.
but now able to do so as no page element is defined for calender.
please suggest





Regards
Dhruv

--~--~-~--~~~---~--~~
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 installed to non-default gem path

2009-03-05 Thread Cliff

Additional info and fix:

The issue lied in browser.rb:activate_gem gem_name and the directory
structure:

watir-1.6.2/lib/watir/

After moving everything from lib/watir to lib things work great.


On Mar 5, 11:06 am, Cliff cliff.cyph...@gmail.com wrote:
 Hello Group

 Has anybody tried running watir installed to a non-default gem system
 path?  For example, assuming you've installed all required gems using
 something like:

 gem install gem --no-rdoc --no-ri --ignore-dependencies -i /temp/
 gems

 Then in irb:
 require 'rubygems'
 Gem.clear_paths
 ENV['GEM_HOME'] = \temp\gems
 ENV['GEM_PATH'] = \temp\gems

 require 'watir'
 Watir::options = {:browser = 'ie'}
 Watir::Browser.new  NameError: (eval):1:in `klass': uninitialized
 constant Watir::IE

 Note, with this setup if :browser = 'firefox' the Watir::Browser.new
 opens firefox as expected.
--~--~-~--~~~---~--~~
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: enabled_popup internal error

2009-03-05 Thread andrew . dahl

Just no luck. Still not seeing any popup.

   roles_page.bottom_delete.click_no_wait# = no popup
displayed

but if I use

  roles_page.bottom_delete.click #=== popup comes right
up

On Mar 5, 10:17 am, Jim Matthews jim_m...@swbell.net wrote:
 One thing I forgot to mention: someone else got click_no_wait to work
 by going into IE -Tools - Internet Options...-Advanced and under
 Security, check the box titled Allow active content to run in files
 on My Computer.

 Jim

 On Mar 5, 9:32 am, Jim Matthews jim_m...@swbell.net wrote:



  Glad to know that helped.  Now you are at the point I am at.  There
  are several of us working to see if we can resolve the problem.  It
  appears that the same Ruby / Watir combination works for some people
  and does not work for others as far as handling the javascript
  popups.  Because of this, we think there is some system setting that
  makes the difference rather than it being strictly a Ruby and Watir
  problem.  If you have any insights on this, please share them.

  I will try to answer some of your questions.  First the normal click
  that brings up the javascript popup is blocking.  The script cannot
  proceed until the popup is dismissed.  If the code to dismiss the
  popup is in the same thread, it stays that way forever (well you know
  what I mean).  The click_no_wait is non blocking, which allows your
  script to continue with the routine to dismiss the popup.

  So, the short answer is that just click won't work for something
  that brings up a popup (I'll add the qualification that it does work
  if you create a separate thread to click the popup.  I only mention
  this because there some examples floating around that do that.  I do
  not want to lead you too far astray if you find one.)  So the
  preferred method of clicking something that brings up a popup is
  click_no_wait.  Unfortunately, what I am seeing is that the button
  flashes but no popup ever comes up and the routine to click it times
  out.  I have had a little success with  click!.  click!  is also not
  blocking.  That works one time for me but not the second time in the
  same script.

  I think the confusion about the page and page container has to do with
  confusion over the term page.  The cucumber page is not the same
  exactly the same as the Watir page.  Beyond that,  I cannot offer
  much information.  Just be aware that although people use the same
  name for things in different programs, they might not mean the same
  thing.

  Try the  click!  on the button that brings up the popup and see if
  that works for you (since it sounds like the click_no_wait doesn't
  work for you) and let us know your results.  If you figure anything
  out about system settings that might affect this, let us know.  If I
  find out anything else for you, I'll post it here.

  Jim

  On Mar 5, 8:12 am, andrew.d...@lthree.com wrote:

   That got me further.

   Now I have a question about click_no_wait. When I use just 'click', I
   get a popup with an OK and Cancel button. When I use click_no_wait, I
   am now not getting any popup. If I use sleep right after
   click_no_wait, does the browser keep going so I would expect to see a
   popup?

   And no, the OK button is not getting clicked to clear the popup.

   Here is the code.

       roles_page.roles.row(:name = Test Role).col1_element.click
   #click on checkbox

   roles_page.bottom_delete.click_no_wait
   # shows confirm dialog (only working if I use click)
       sleep 5
       startClicker
   (OK)
   # try to click OK button, doesn't work

   and startclicker is now

   def startClicker( button_label , waitTime= 9, user_input=nil )
     # get a handle if one exists
     hwnd = nil
     begin
       hwnd = SITE.browser.enabled_popup(waitTime)
     rescue TimeOutException = e #===This
   exception is always thrown right now
       #popup not found
     end

     if (hwnd)  # yes there is a popup
       puts 'popup found'
       w = WinClicker.new
       w.makeWindowActive(hwnd)

       if ( user_input )
         w.setTextValueForFileNameField( hwnd, #{user_input} )
       end

       # OK or whatever the name on the button is
       puts Trying to click on  + button_label
       w.clickWindowsButton_hwnd( hwnd, button_label )
       #
       # this is just cleanup
       w=nil
     else
       puts No popup found
     end
   end

   On a side note, why is enabled_popup defined as part of PageContainer
   if it is meant to be called from a browser object only?

   On Mar 4, 3:21 pm, Jim Matthews jim_m...@swbell.net wrote:

OK, too bad you did not include this originally.  I think I know what
the problem is.  At least I see something that is a problem.  You
have:

hwnd = page_container.enabled_popup(waitTime)

hwnd belongs to the browser, not the page, so you have to reference
the borwser object like:

hwnd = $ie.enabled_popup(waitTime)

or change $ie to browser, or 

[wtr-general] FireWatir bug using exists? on a form element with xpath

2009-03-05 Thread Kevin White

Here is a piece of code that doesn't work in FireWatir 1.6.2:

require 'watir'

Watir::Browser.default = 'firefox'
browser = Watir::Browser.new

browser.goto(http://www.google.com;)

searchform = browser.form(:xpath, //fo...@name='f'])

puts Searchform is #{searchform.to_s}

You will get this output:

ruby firewatirbug.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing': stack level too deep
(SystemStackError)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
htmlelements.rb:75:in `locate'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
htmlelements.rb:75:in `locate'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing'
 ... 9453 levels...
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1097:in `to_s'
from firewatirbug.rb:10

Now, I found something on the net that says that this bug was fixed
way back in 2007:

http://code.google.com/p/firewatir/issues/detail?id=36

So is it fixed, did it recur, is my installation broken, ???

I've coded around it using element.attribute_value() but I really
wanted to use the xpath instead.

--Kevin White

--~--~-~--~~~---~--~~
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: FireWatir bug using exists? on a form element with xpath

2009-03-05 Thread Kevin White

Apologies, that code just demonstrates that xpath isn't working right.
I was trying to use .exists? in my code, but the example just is to
demonstrate that the xpath doesn't work at all. If you try to
do .exists? on a form element using xpath, it fails the same way.

--Kevin

On Mar 5, 3:48 pm, Kevin White ilium...@gmail.com wrote:
 Here is a piece of code that doesn't work in FireWatir 1.6.2:

 require 'watir'

 Watir::Browser.default = 'firefox'
 browser = Watir::Browser.new

 browser.goto(http://www.google.com;)

 searchform = browser.form(:xpath, //fo...@name='f'])

 puts Searchform is #{searchform.to_s}

 You will get this output:

 ruby firewatirbug.rb

 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1403:in `method_missing': stack level too deep
 (SystemStackError)
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 htmlelements.rb:75:in `locate'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1012:in `exists?'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:965:in `assert_exists'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1403:in `method_missing'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 htmlelements.rb:75:in `locate'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1012:in `exists?'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:965:in `assert_exists'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1403:in `method_missing'
          ... 9453 levels...
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1012:in `exists?'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:965:in `assert_exists'
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:1097:in `to_s'
         from firewatirbug.rb:10

 Now, I found something on the net that says that this bug was fixed
 way back in 2007:

 http://code.google.com/p/firewatir/issues/detail?id=36

 So is it fixed, did it recur, is my installation broken, ???

 I've coded around it using element.attribute_value() but I really
 wanted to use the xpath instead.

 --Kevin White
--~--~-~--~~~---~--~~
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 send a mail from outlook express using watir

2009-03-05 Thread Jason Trebilcock
The initial question that occurred to me is why you are trying to automate
the sending of an email with Outlook Express.  Why not leverage Ruby to send
the email without the additional complexity of trying to figure out how deal
with Outlook Express. Bringing Outlook Express into the equation just seems
painful to me.

 

Beyond that, to address your original question, it might help to break down
the problem into manageable parts.  First, create a script to send a simple
email.then, start worrying adding the complexity of sending content from a
log file.

 

Jason

 

From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of prasoona alluri
Sent: Thursday, March 05, 2009 5:35 AM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: How to send a mail from outlook express using
watir

 

Thank for the reply.

 

But i am facing the following error

`initialize': unknown OLE server: `Outlook.Application'
(WIN32OLERuntimeError)

for the following statement

require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')

 

Thanks


 

On Thu, Mar 5, 2009 at 5:12 AM, Walter Kruse ou_ryp...@hotmail.com wrote:

This is for Outlook, but maybe it can help:
http://rubyonwindows.blogspot.com/search/label/outlook



  _  

Date: Thu, 5 Mar 2009 04:40:02 -0600
Subject: [wtr-general] How to send a mail from outlook express using watir
From: pallu...@gmail.com
To: watir-general@googlegroups.com 

 

Hello,

 

 Please help me to delvelop a script for  sending  a mail from outlook
express using watir.

The message text should be read from a log file .

 

Thanks in advance.

-Prasoona





  _  

See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx br


--~--~-~--~~~---~--~~
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.test_field(name,man).value.to_s / Passing result to a parameter

2009-03-05 Thread Darryl (gem dandy) Brown

maximore,

Here is a simple example for to_s usage -

require 'watir/ie'
$ie = Watir::IE.new
$ie.goto(www.google.com)
example = $ie.link(:text, 'Preferences').text.to_s
puts example
sleep 2
$ie.close

You may want to change your statement to:
result=ie.test_field(name,dayOfBirth).name.to_s

Change value to name

Regards,
Darryl(gem dandy)Brown



On Mar 5, 6:09 pm, maximore hri...@gmail.com wrote:
  Hi

  Assume we have  result define ;

    is it possible to pass a value from ie.test_field
 (name,man).value.to_s to a variable  ? let say i have this
 expression.

  result=ie.test_field(name,dayOfBirth).value.to_s
   I get  dynamic error message . any idea how to go about
 passing?
   Thanks I take my ans off the board
--~--~-~--~~~---~--~~
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: installing watir behind a firewall on Windows

2009-03-05 Thread Zhimin

You can try install PRoR, pre-packaged Watir and required libraries

  
http://www.itest2.com/articles/2009/02/27/easy-setup-watir-with-pror-on-windows/

Zhimin

On Mar 6, 11:12 am, MatchBook jeffrey.fl...@gmail.com wrote:
 I am not able to install watir on Windows either by using the
 HTTP_PROXY environmental variable, nor by using the -p option for gem
 install.  My firewall is password protected, so I get a 407 error.

 I resorted to zipping up the cache directory from a machine that is
 not behind a firewall(C:\ruby\lib\ruby\gems\1.8\cache) and copying the
 zip file to the machine that is behind the firewall.

 Now, I need help with the right gem install command to get this local
 cache to be recognized.

 I appreciate it!

 Jeff
--~--~-~--~~~---~--~~
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: Help Object repository

2009-03-05 Thread Vikas Tulashyam

Hi,
You are right, Watir doesn't support object repository concept and
even you can't spy the object properties.


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: FireWatir bug using exists? on a form element with xpath

2009-03-05 Thread Angrez Singh
Nice catch, there was a spelling mistake while locating the form using
xpath. Fixed it. Will let you know when I check in the code

- Angrez

On Fri, Mar 6, 2009 at 3:14 AM, Kevin White ilium...@gmail.com wrote:


 Apologies, that code just demonstrates that xpath isn't working right.
 I was trying to use .exists? in my code, but the example just is to
 demonstrate that the xpath doesn't work at all. If you try to
 do .exists? on a form element using xpath, it fails the same way.

 --Kevin

 On Mar 5, 3:48 pm, Kevin White ilium...@gmail.com wrote:
  Here is a piece of code that doesn't work in FireWatir 1.6.2:
 
  require 'watir'
 
  Watir::Browser.default = 'firefox'
  browser = Watir::Browser.new
 
  browser.goto(http://www.google.com;)
 
  searchform = browser.form(:xpath, //fo...@name='f'])
 
  puts Searchform is #{searchform.to_s}
 
  You will get this output:
 
  ruby firewatirbug.rb
 
  C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1403:in `method_missing': stack level too deep
  (SystemStackError)
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  htmlelements.rb:75:in `locate'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1012:in `exists?'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:965:in `assert_exists'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1403:in `method_missing'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  htmlelements.rb:75:in `locate'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1012:in `exists?'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:965:in `assert_exists'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1403:in `method_missing'
   ... 9453 levels...
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1012:in `exists?'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:965:in `assert_exists'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
  MozillaBaseElement.rb:1097:in `to_s'
  from firewatirbug.rb:10
 
  Now, I found something on the net that says that this bug was fixed
  way back in 2007:
 
  http://code.google.com/p/firewatir/issues/detail?id=36
 
  So is it fixed, did it recur, is my installation broken, ???
 
  I've coded around it using element.attribute_value() but I really
  wanted to use the xpath instead.
 
  --Kevin White
 


--~--~-~--~~~---~--~~
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 set priority in outlook mail

2009-03-05 Thread prasoona alluri
Hi All,

How to set priority in Outlook mail , when it contain specified text in
message .
Please help me. This is a Curtail task for me.

Thanks in advance.

Regards
-Prasoona

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



[wtr-general] Error while running popup script on eclipse

2009-03-05 Thread kushnit

Hi,

I am trying to run a watir script which is used to handle alert popups
on eclipse. Its runnig smoothly on SciTE but wen i try to run it on
eclipse its throwing a TimeOutException.Does anybody have solution for
the same.
Following is my program and respective error

require 'watir'
require 'watir/ie'
require 'watir/contrib/enabled_popup'
def startClicker( button , waitTime, user_input=nil )
  # get a handle if one exists
  hwnd = $ie.enabled_popup(waitTime)
  if (hwnd)  # yes there is a popup
w = WinClicker.new
if ( user_input )
  w.setTextValueForFileNameField( hwnd, #{user_input} )
end
# I put this in to see the text being input it is not necessary to
work
sleep 3
# OK or whatever the name on the button is
w.clickWindowsButton_hwnd( hwnd, #{button} )
# this is just cleanup
w=nil
  end
end
$ie = Watir::IE.new
$ie.goto('d:/test_pop.html/')
$ie.bring_to_front  #to bring the window in front
$ie.maximize
$ie.button(:value, 'Alert').click_no_wait

The Exception thrown by the program is:

C:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
59:in `wait_until': Timed out after 9.499 seconds.
(Watir::Exception::TimeOutException)
from C:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
waiter.rb:80:in `wait_until'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
enabled_popup.rb:10:in `enabled_popup'
from popup_test.rb:6:in `startClicker'
from popup_test.rb:25


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: Help Object repository

2009-03-05 Thread Karthikeyan K

Does anyone have idea on whether Object Repository is being considered
in the development roadmap for Watir??

On Mar 5, 8:43 pm, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi,
 You are right, Watir doesn't support object repository concept and
 even you can't spy the object properties.

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