[wtr-general] Re: Unable to locate element

2009-05-19 Thread Jim Matthews

Kamesh,

The other major cause of this problem is that your test is not where
you think it is.

That is, there is an error in your previous step that causes a problem
so that the next thing you are looking for is not actually there.
(Like the previous step is supposed to do something to take you to
another page, but fails and you never get to the next page, or the
previous step does something that enables the element you are looking
for.)  This may not be your problem, but it happens often enough to
mention it.  The problem is harder to find if the browser is set to
close at the end.  Watch carefully what is happening as your test
runs.  You might discover that something earlier in your test is not
happening the way you think it is.

Jim


On May 19, 10:34 am, Michael Hwee michael_h...@yahoo.com wrote:
 check to see the object is in a frame.

 
 From: Kamesh G kameshg...@gmail.com
 To: watir-general@googlegroups.com
 Sent: Tuesday, May 19, 2009 7:45:17 AM
 Subject: [wtr-general] Re: Unable to locate element

 Hi ,

 I have tried with all the three options.

 Still i am getting same error message

 Thanks,
 Kamesh

 On Tue, May 19, 2009 at 7:37 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:
 On Tue, May 19, 2009 at 3:44 PM, Kamesh kameshg...@gmail.com wrote:
  ie.link(:href, /faces/faces/client/inbox/userInbox.jspx).click

 I think that Internet Explorer always sees absolute links (site.com/page), 
 not relative links (/page). Any of these should work:

 ie.link(:href, /userInbox.jspx/).click

 ie.link(:href, /\/faces\/faces\/client\/inbox\/userInbox.jspx/).click
 ie.link(:href, 
 MyTestSite.com/faces/faces/client/inbox/userInbox.jspx).click

 Replace `MyTestSite.com` with your site in the third example.

 If you want to know more about the code I have sent, let me know.

 Ž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: Help needed in automation using Watir

2009-05-14 Thread Jim Matthews

Lokesh,

Your problem is not so much identifying objects as much as having your
developers not change their ids.

Your developers should be assigning unique ids to controls that you
use including input fields and buttons.  They should not be making
arbitrary  changes to ids, just like they should not be making
arbitrary changes to code.  The developers I work with use tools that
autogenerate some of the ids.  Normally these do not change because
the structure of the page remains the same (header, footer, menus).  I
work with a group of developers who understand the importance of
automated testing and will quickly add unique ids to elements in the
page.  There really are developers out there like that.

If your developers are serious about having automated tests, try
talking to them and explain your situation and ask them to work with
you to find a good solution.  If they don't respond, then you should
talk to your manager who is interested in having automated tests,
explain the situation (emphasize the time you could save if you did
not have to go back and change your tests all the time) and get him to
influence the developers.

Jim


On May 14, 8:11 am, Jason Shelton jas.shel...@hotmail.com wrote:
 I use a tool called PageSpy.  

 http://www.sembel.net/

 - Shelton



  Date: Thu, 14 May 2009 14:37:00 +0530
  Subject: [wtr-general] Re: Help needed in automation using Watir
  From: karim@gmail.com
  To: watir-general@googlegroups.com

  you can use the IE developer tool bar on IE and firebug on firefox for
  object identification, there is no special object spy which i know off
  for watir, i largely believe these are the tools which are widely used
  for object identification for watir.

  If there is any thing for object spying like for QTP and SILKTEST then
  guys please share.

  On Thu, May 14, 2009 at 12:32 PM, Lokesh Agrawal
  lokesh.agra...@gmail.com wrote:

   Thanks Alkarim,

   Is there any other option in Watir for Object Identification??

   On May 14, 11:27 am, karim rayani karim@gmail.com wrote:
   when doing automation, any testing tool has the concept of object
   identification be it QTP, SILKTEST etc, you can try to use indexing if
   possible for object identification, the developer can change the name,
   id etc indexing can help, but mind you that can also change if the
   devs donot understand the pain of testing an application using an
   automation tool

   On Thu, May 14, 2009 at 11:48 AM, lokesh.agra...@gmail.com

   lokesh.agra...@gmail.com wrote:

Hi All,

I am doing web application automation using Watir.

The problem I am facing is, whenever we get a new build from
developers there are changes in id, name of some objects. Due to which
our scripts fails and manually we need to find what are the changes by
viewing source code.

This is really hectic and time consuming task. Everytime before
running our Test suite to new build we need to modify scripts.

Does anyone has solution of this problem?

FYI: I am using Test Unit framework to run test cases.

Thanks in Advance,

Regards,
Lokesh Agrawal

   --
   Regards,

   Alkarim Rayani

  --
  Regards,

  Alkarim Rayani

 _
 Hotmail® goes with 
 you.http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_T...
--~--~-~--~~~---~--~~
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: Unexpected error when Run the code in Netbeans.

2009-04-21 Thread Jim Matthews

Wesley,

Have you set the run environment to use your externally installed
Ruby instead of JRuby?

Watir will not run under JRuby.

Go to Tools - Ruby Platforms - and add your externally installed
Ruby platform.  Then on each of your projects, you have to make sure
that your project references this run environment.

Jim


On Apr 21, 10:11 am, Wesley Chen cjq@gmail.com wrote:
 I have not reported yet.
 When I run the code out of netbeans, it is OK.

 Thanks.
 Wesley Chen.

 On Tue, Apr 21, 2009 at 11:03 PM, Željko Filipin

 zeljko.fili...@wa-research.ch wrote:
  On Tue, Apr 21, 2009 at 16:43, Wesley Chen cjq@gmail.com wrote:
   I met this kind of problem and search for a long time, I can't get why I
  get this kind of error.

  Did you report it to netbeans?

  Željko
  --
 http://watirpodcast.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: Error in handling popup

2009-04-09 Thread Jim Matthews

spike,

There is a problem with the new version of Ruby that may be
contributing to your problem.  I don't use autoit, I use method that
Lisa described.  For more information on the problem, see:

http://groups.google.com/group/watir-general/browse_thread/thread/c8e233ec27bebb85/02a19203ed99e262?lnk=gstq=%3Cpopup#02a19203ed99e262

Jim


On Apr 9, 5:09 am, spike vinaykumarl...@gmail.com wrote:
 sorry to tel u it isnt working,

 ie.button(:id, ctl00_ContentPlaceHolder1_btnNext).click
 ie.file_field(:id, ctl00_ContentPlaceHolder1_Uploadfile).set(D:\
 \BCSBI.zip)
 ie.file_field(:id, ctl00_ContentPlaceHolder1_btnUpload).click #this
 is the button when clicked popup appears.
 # For handling popups

     def visible?
     object = document
     while object
       begin
         if object.currentstyle.invoke('visibility') =~ /^hidden$/i
           return false
         end
         if object.currentstyle.invoke('display') =~ /^none$/i
           return false
         end
         if object.invoke('isDisabled')
           return false
         end
       rescue WIN32OLERuntimeError
       end
       object = object.parentElement
     end
     true
   end

           def top_edge
                 assert_exists
                 assert_enabled
                 ole_object.getBoundingClientRect.top.to_i
           end

           def top_edge_absolute
                 top_edge + page_container.document.parentWindow.screenTop.to_i
           end

           def left_edge
                 assert_exists
                 assert_enabled
                 ole_object.getBoundingClientRect.left.to_i
           end

           def left_edge_absolute
                 left_edge + 
 page_container.document.parentWindow.screenLeft.to_i
           end

           def mouse_hover(offsetX = 0, offsetY = 0)
                 x = left_edge_absolute + offsetX
                 y = top_edge_absolute + offsetY
                 WindowsInput.move_mouse(x, y)
           end

           def mouse_click(offsetX = 0, offsetY = 0)
                 x = left_edge_absolute
                 y = top_edge_absolute
                 WindowsInput.move_mouse(x, y)
                 Watir.autoit.MouseClick(left, x+offsetX, y+offsetY, 1)
                 sleep(2)
           end

           def right_click(offsetX = 0, offsetY = 0)
                 x = left_edge_absolute
                 y = top_edge_absolute
                 WindowsInput.move_mouse(x+offsetX, y+offsetY)
                 WindowsInput.right_click
           end

 require 'win32ole'
 def test_check_for_popups
 autoit = WIN32OLE.new('AutoItx3.control')
 loop do
   ret = autoit.WinWait('Windows Internet Explorer', '' ,1)
   if (ret==1) then autoit.sent('{enter}') end
   sleep(3)
 end
 end

 #Below is the code for operations after the popup disappears
 if ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).isSet?
     puts IS FEEDBACK option Yes is selected
     else
       ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).click
     end
     ie.select_list(:id, ctl00_ContentPlaceHolder1_DdlAccesstype).set
 (Public)
     ie.select_list(:id,
 ctl00_ContentPlaceHolder1_DdlApprovaltype).set(Admin)

 end
 end

 On Apr 9, 12:01 pm, kiran yajamanyam kiranyajaman...@gmail.com
 wrote:

  hi Spike,

  Here is the perfect solution for you problem
  Copy paste the code present in the attached text file. And insted of using
  click() method use yourObject.mouse_click(36,6)  and remaing code will be
  same to handle that windows popup using autoit( Which I have posted in last
  mail).

  This is the only way u can handle this issue. It will definetly work.

  If you still have any issue send me the code you have pasted, i will correct
  it and send you back.

  Regards,
  Krian Y

  On Thu, Apr 9, 2009 at 12:10 PM, spike vinaykumarl...@gmail.com wrote:

   Yes i've used the click() method.

   On Apr 9, 11:09 am, kiran yajamanyam kiranyajaman...@gmail.com
   wrote:
Now I got the problem you are facing. I think in your code u would have
   used
click() method just before the code to handle popup. If this is the case
   ,
script would not be coming out of click() method and go to next step.
   This
happens in a case when when used click method and if a popup appears
   after
click.

please let me know if you have this issue. I have a work arround where 
in
   u
need to extend your element class.

You can ping me at kiranyajaman...@gmail.com if you have any issues with
this. Try the following code once:

Copy paste this code and use it. Check if its due to timing issue.

require 'win32ole'

autoit = WIN32OLE.new('AutoItX3.Control')

autoit.WinWait('Windows Internet Explorer', '', 2)

autoit.WinActivate('Windows Internet Explorer')
autoit.Send('{space}')

Regards,
Kiran Y

On Thu, Apr 9, 2009 at 11:29 AM, spike vinaykumarl...@gmail.com wrote:

 Sorry sir even it is not working i've to click it manually to go
 

[wtr-general] Re: undefined method `close' for nil:NilClass (NoMethodError)

2009-04-01 Thread Jim Matthews

Shweta,

   $ie.text_field(:name, PolicyNumber).set($record
['PolicyNumber'])   #error occured here

If you are trying to put a value in a text_field, you need to use
value, so your line would look something like this:

   $ie.text_field(:name, PolicyNumber).value = ($record
['PolicyNumber'])

Jim

On Apr 1, 7:06 am, Shweta nagman...@gmail.com wrote:
 Hi

 Am getting error in the line where i put the comment has #error
 occured here

 require 'win32ole'
 require 'watir'
 require 'Xls'

 xlFile = XLS.new('C:\irma1.xls') #grab the data file in the same
 dirrectory
 myData = xlFile.getRowRecords('Inspection Search Data','Search')
 #pull data records  from excel
 xlFile.close
 myData.each do |record|
 def searchinspections()
        $ie.link(:href, http://searchrecord/
 inspectionSearchInit.do).click
        $ie.button(:name, clearCriteriaBtn).click
        $ie.radio(:index, 2).set
        $ie.text_field(:name, PolicyNumber).set($record
 ['PolicyNumber'])   #error occured here
        $ie.button(:name, submitBtn).click
        if $ie.contains_text(record['ContainsText'])
         puts Results of search: '#{record['PolicyNumber']}' contains
 '#{record['ContainsText']}'
        else
        puts Error: could not find text: '#{record['ContainsText']}'
 in results of search: '#{record['PolicyNumber']}'
        end
        sleep 3
        return $ie
        $ie.close
        end
 end

 and am calling in other test as

 require 'win32ole'
 require 'watir'
 require 'Login_irma'
 require 'test/unit/assertions'
 require 'watir/assertions'
 require 'SearchInspection'

 $ie = login(mtedfhhh,password)
 $ie = searchinspections()

 Can anyone suggest whats wrong here

 On Apr 1, 2:41 pm, Shweta nagman...@gmail.com wrote:

  Hi

  Am trying to parameterizing my test cases am getting some error,am not
  understanding where am wrong i have gone thru the posts regarding this
  i dint get any idea,Can anyone pls let me know whats wrong here

  My code:

  require 'watir'
  require 'watir/testcase'
  require 'watir/assertions'
  require 'test/unit'
   require 'LogIn'
  begin
      xlFile = XLS.new('C:\\MA.xls')

      $Policynumber = xlFile.getColumnRecords('B4:C6', 'Ponumber')
      setupInfo = xlFile.getHash('A1:B4', 'Setup')
      $runTests = xlFile.getHash('A13:B27', 'Setup')
  ensure
      xlFile.close
  end

  $test_site = setupInfo['URL']
  $UserName = setupInfo['Username']
  $UserPass = setupInfo['Password']

  #get today's date for use in scripts
  $today = #{Time.now.month.to_s}/#{Time.now.day.to_s}/#
  {Time.now.year.to_s}

  # open the IE browser
  $ie = Watir::IE.new
  $ie.speed = :fast
  #  go to the selected MA site
  $ie.goto($test_site)

  class TestSuite  Test::Unit::TestCase
      include Watir::Assertions

      #login with the supplied producer username and password
      def test_00Login
          if $runTests['login'] == 'Yes'
              if $ie.text.include?('Inspection Search Results')
                  login($Username, $Password)
              else
                  puts 'The user was already logged in when the
  application was opened.'
              end
          else
              puts ' '
              puts 'You chose not to run the user login test.'
          end
      end
      #Search records
      def Searchrecord_ponumber
      myData.each do |record|
     $ie.link(:href, http://www.searchrecord/SearchInit.do;).click
     $ie.button(:name, clearCriteriaBtn).click
     $ie.radio(:index, 2).set
     $ie.text_field(:name, policyNumber).set(record['PoNumber'])
     $ie.button(:name, submitBtn).click

     if $ie.contains_text(record['ContainsText'])
      puts Results of search: '#{record['PoNumber']}' contains '#{record
  ['ContainsText']}'
     else
      puts Error: could not find text: '#{record['ContainsText']}' in
  results of search: '#{record['PoNumber']}'
     end
     sleep 3
     #~ ie.close
     end
      end
  end

  Error message:

  Testrun.rb:37:
  ./Xls.rb:226:in `getWorksheet': getWorksheet(sheet=Setup) -- Sheet
  'Setup' COULD NOT BE FOUND (RuntimeError)
          from ./Xls.rb:193:in `getRange'
          from ./Xls.rb:104:in `get2DArray'
          from ./Xls.rb:145:in `getHash'
  undefined method `close' for nil:NilClass (NoMethodError)
--~--~-~--~~~---~--~~
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: Getting no such file to load error when working with excel

2009-03-30 Thread Jim Matthews

Shweta,

This sounds like the problem where you do not have RUBYOPT defined as -
rubygems.

Search the site for help on this and if you still have trouble, update
with additional information.

Jim

On Mar 30, 6:40 am, Shweta nagman...@gmail.com wrote:
 Hi

 When i was trying to parameterize with excel for login page am getting
 this error.Can anyone pls let me know what might be wrong in this.

 Error message:
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `gem_original_require': no such file to load -- xls (LoadError)
         from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'

 If any help regarding this could be appreciated.

 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: click_no_wait and click! not working javascript popup

2009-03-23 Thread Jim Matthews


I have figured a few things out with the click_no_wait problem.  This
potentially affects any program that uses the Ruby system call,
which click_no_wait does. There is also appears to be a problem with
Watir#wait_until, that is used by enabled_popup, which is used to
check for the presence of a popup.  The details follow:

First, I think the problem with click_no_wait not actually not
clicking the button/link is a Ruby 1.8.6-27 problem.  It is because
the quoted string is not passed into Ruby correctly.

On a Ruby 1.8.6-26 system, the following happens:

C:\ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\ruby -e puts \Does this work?\
Does this work?

C:\

However, on a 1.8.6-27 system, the following happens:

C:\ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:\ruby -e puts \Does this work?\
-e:1: unterminated string meets end of file

C:\

There is a second problem.  When you set the timeout for clicking the
popup button, Watir times out first:
.
.
.
if (ie.enabled_popup)
  wc = WinClicker.new
  wc.clickWindowsButton(/Internet Explorer/, OK, 30)
end

ruby javatest.rb
c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
59:in `wait_until': Timed out after 4.006 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 javatest.rb:13
Exit code: 1

So even though I have the click set to not timeout until after 30
seconds, Watir seems to timeout after about 4 seconds.

There is a temporary workaround for this that works for me.  Because I
was getting the Watir timeout before the popup came up, I added a
sleep to my popupchecker method before the Timeout::timeout.  So the
first part of the popupchecker method looks like this:

def popupchecker(text)
  sleep 10
  Timeout::timeout(2) do

Note that I give this as a temporary solution until the wait_until is
fixed.

Jim

On Mar 3, 10:52 am, Jim Matthews jim_m...@swbell.net wrote:
 Here are the steps to reproduct the problem.  First bring up unittests
 \html\popups1.html in IE.

 \Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html

 Next run this script.  I have extra puts in it to try to figure out
 what is going on. They can be remvoed or commented out.

 Jim

 require 'watir'
 require 'watir/ie'
 require 'watir/testcase'
 require 'watir/contrib/enabled_popup'

 class StepTests  Watir::TestCase
   def test_01_step_test
     browser = Watir::IE.attach(:title, /Test page for/)
     browser.row(:index, 3).button(:type, 'button').click!
     popupchecker(browser, 'OK')
   end
   def popupchecker(browser, text)
     Timeout::timeout(2) do
       begin
         puts Inside begin of popupcuecker.
         puts browser.enabled_popup == #{browser.enabled_popup}
         if browser.enabled_popup
           puts In if in popupchecker.
           hwnd = browser.enabled_popup(5)
           puts hwnd.to_s
           w = WinClicker.new
           w.makeWindowActive(hwnd)
           w.clickWindowsButton_hwnd(hwnd, text)
         end
         rescue Timeout::Error
           puts 'No popup existed.'
       end
     end
   end
 end

 On Mar 2, 10:12 am, Jim Matthews jim_m...@swbell.net wrote:

  I am trying to deal with javascript popups.  I have created the
  popupchecker method described on the wiki.

  When I usedclick_no_wait,  the popup came up but was not dismissed.
  Someone suggested that I try click! instead ofclick_no_waitbecause
  of some problems mentioned in recent posts.  I did that and click!
  worked for the first popup.  It dismissed it and the script continued.

  When the script got to the second popup, neitherclick_no_waitnor
  click! worked to dismiss the popup.  I put some puts statements is
  the popupchecker method and it appears from that, that popupchecker is
  not getting called the second time until after I manually dismiss the
  second popup.

  I know the popupchecker code works because it successfully dismisses
  the first popup and because I have used fxri with popupchecker to
  dismiss both the popups.

  Does anyone have an idea what is going on or something different to
  try?

  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: select_no_wait function does not work for download pop up handling.

2009-03-17 Thread Jim Matthews

I have been trying to figure out what the problem is with
click_no_wait method for a couple of weeks.  I expect your problem is
related to mine.

I believe I have narrowed it down to the following, but I do not have
an answer yet.

click_no_wait builds a string to execute in a separate shell.  It then
does:
system(exec_string)

It appears that the Ruby commands are not getting executed, but I have
not seen any errors.

What I am trying to do now is create a very short Ruby script that
defines a simple set of Ruby commands in a string called exec_string
and have that script do a

system(exec_string)

to see if I can get that to work.  So far I am not having any luck
getting the execution string to work.  I am still not seeing any
errors when I run the script.  I figure if I can get this to work, it
will give me a clue as to why click_no_wait is not working.

Jim

On Mar 17, 11:42 am, JackieH jkulb...@juno.com wrote:
 Just wanted to put this back out there to see if anyone had any
 thoughts...

 On Mar 12, 2:32 pm, JackieH jkulb...@juno.com wrote:

  I haven encountered the same issue...When using theselectmethod a
  pop-up box occurs, but when I added theno_waitroutine the code just
  ends up in the wait for pop-up routine and no pop-up appearsFrom
  what I can, the code gets into theno_waitmethod fine, but it never
  reaches theselectmethod of theselectlist...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 theselectlistand handles the
  pop-up correctly...

  Any advice would be greatly appreciated!

  -Jackie

  On Feb 16, 3:25 am, Bill Xu xulei8823...@gmail.com wrote:

   Hi:
      I want to use select_no_wait function (I am testing on a dropdown 
   control
   and while youselectthe 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(iteam6)
   but it seems does not work. It can not trigger theselectoperation. 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 forselectlists - needed for popups resulting from
  selectlists
   module Watir
       class Element
           #select_no_wait - selects a drop-down element spawning a new
   process.
           #this is needed to close potential pop-ups thatselectdrop-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: Error while running popup script on eclipse

2009-03-06 Thread Jim Matthews

I believe what you are seeing is a problem that several of us are
seeing with click_no_wait.  The main symptom is that you see the
button or link flash but no popup comes up.  Since it works for some
of us with the same Ruby / Watir combination, I think it must be some
sort of system setting that is the difference.  You can find several
recent posts on watir -general about the problem.

If you can shed any light on this problem, a number of us would be
very grateful.

Jim


On Mar 5, 10:09 pm, kushnit kush...@gmail.com wrote:
 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: 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, andrew.d

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread Jim Matthews

From your first post, I am not sure how you are trying to use
ie.enabled_popup.

I assume you are trying to something like what is described on the
wiki:

http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups

I do not know which example you are following.  If you take this one
for example,

require 'watir/contrib/enabled_popup'

def popupChecker(text)
Timeout::timeout(2)do
begin
if ie.enabled_popup
hwnd = ie.enabled_popup(5)
w = WinClicker.new
w.makeWindowActive(hwnd)
w.clickWindowsButton_hWnd(hwnd,text)
end
rescue Timeout::Error
puts 'No popup existed'
end
end
end

The strange thing to me is that the error you show references a Watir
frame.  A frame would not have an hwnd associated with it directly, so
I am not sure how you even got the error.

I am trying to use the routine above and am finding that there must be
some things on my system that keep it from working all the time.
Sometimes it dismisses the popup and sometimes it doesn't.

Jim

On Mar 4, 5:26 am, andrew.d...@lthree.com wrote:
 Its not my code that is throwing the error. Here is the code for
 enabled popup from my watir install. The line generating the error is
 hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) - hwnd is
 undefined.

 module Watir
   module PageContainer
     include Win32
     def enabled_popup(timeout=4)
       # Use handle of our parent window to see if we have any
 currently
       # enabled popup.
       hwnd_modal = 0
       Waiter.wait_until(timeout) do
         hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP)
         hwnd_modal  0
       end
       # use hwnd() method to find the IE or Container hwnd (overriden
 by IE)
       if hwnd_modal == hwnd() || 0 == hwnd_modal
         hwnd_modal = nil
       end
       hwnd_modal
     end
   end
 end

 On Mar 3, 1:49 pm, Jim Matthews jim_m...@swbell.net wrote:

  I thought you were having the same problem I am with popups, but I
  think yours is different at this point.

  The window handle is going to be on the browser and not a part of the
  DOM.

  You have to get the hwnd off the browser and go from there.

  Jim

  On Mar 3, 1:16 pm, andrew.d...@lthree.com wrote:

   Trying to execute enabled_popup and it is throwing an exception

    undefined local variable or method `hwnd' for #Watir::Frame:
   0x3d7b4d4

   I checked the source for enabled_popup and it does seem to have an
   undeclared variable. Is this working for other people. Working on
   latest version of watir.- 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: click_no_wait and click! not working javascript popup

2009-03-03 Thread Jim Matthews

Here are the steps to reproduct the problem.  First bring up unittests
\html\popups1.html in IE.

\Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html

Next run this script.  I have extra puts in it to try to figure out
what is going on. They can be remvoed or commented out.

Jim

require 'watir'
require 'watir/ie'
require 'watir/testcase'
require 'watir/contrib/enabled_popup'

class StepTests  Watir::TestCase
  def test_01_step_test
browser = Watir::IE.attach(:title, /Test page for/)
browser.row(:index, 3).button(:type, 'button').click!
popupchecker(browser, 'OK')
  end
  def popupchecker(browser, text)
Timeout::timeout(2) do
  begin
puts Inside begin of popupcuecker.
puts browser.enabled_popup == #{browser.enabled_popup}
if browser.enabled_popup
  puts In if in popupchecker.
  hwnd = browser.enabled_popup(5)
  puts hwnd.to_s
  w = WinClicker.new
  w.makeWindowActive(hwnd)
  w.clickWindowsButton_hwnd(hwnd, text)
end
rescue Timeout::Error
  puts 'No popup existed.'
  end
end
  end
end



On Mar 2, 10:12 am, Jim Matthews jim_m...@swbell.net wrote:
 I am trying to deal with javascript popups.  I have created the
 popupchecker method described on the wiki.

 When I used click_no_wait,  the popup came up but was not dismissed.
 Someone suggested that I try click! instead of click_no_wait because
 of some problems mentioned in recent posts.  I did that and click!
 worked for the first popup.  It dismissed it and the script continued.

 When the script got to the second popup, neither click_no_wait nor
 click! worked to dismiss the popup.  I put some puts statements is
 the popupchecker method and it appears from that, that popupchecker is
 not getting called the second time until after I manually dismiss the
 second popup.

 I know the popupchecker code works because it successfully dismisses
 the first popup and because I have used fxri with popupchecker to
 dismiss both the popups.

 Does anyone have an idea what is going on or something different to
 try?

 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: LoadError: 14001: This application has failed to start because....

2009-02-24 Thread Jim Matthews

That error has been around a long time and only concerns the
documentation for builder.  I has no effect on the way it runs.

Jim

On Feb 24, 10:20 am, AR reed.a...@gmail.com wrote:
 While viewing the watir installation again, I do get one error, but it
 seems to be fairly innocuous:

 ERROR:  While generating documentation for builder-2.1.2
 ... MESSAGE:   Unhandled special: Special: type=17, text=!-- HI --
 ... RDOC args: --ri --op C:/Ruby/lib/ruby/gems/1.8/doc/builder-2.1.2/
 ri --title
 Builder -- Easy XML Building --main README --line-numbers --quiet lib
 CHANGES Ra
 kefile README doc/releases/builder-1.2.4.rdoc doc/releases/
 builder-2.0.0.rdoc do
 c/releases/builder-2.1.1.rdoc
 (continuing with the rest of the installation)

 On Feb 24, 9:24 am, AR reed.a...@gmail.com wrote:

  I'm getting this strange error after our Ops team built us some new
  testing VMs.  I installed Ruby and Watir, and am getting the same
  error for anything that includes Watir.  I can go into IRB and do Ruby
  all day, but as soon as I enter ie = Watir::IE.new, I get the
  following error.  Has anyone else seen this?

  I have reinstalled Ruby and Watir.  IE7 is installed.  All windows
  updates have been installed.

  OS: Windows 2k3 Server RC2
  RUBY: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
  WATIR: (installed from gem, crashes when I try to run any watir-
  related command including VERSION)

  irb(main):006:0 ie = Watir::IE.new
  LoadError: 14001: This application has failed to start because the
  application c
  onfiguration is incorrect. Reinstalling the application may fix this
  problem.
  - C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.0-x86-mswin32-80/lib/
  win32/api.so

          from C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.0-x86-
  mswin32-80/lib/w
  in32/api.so
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `re
  quire'
          from C:/Ruby/lib/ruby/gems/1.8/gems/windows-api-0.3.0/lib/
  windows/api.rb
  :1
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `ge
  m_original_require'
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `re
  quire'
          from C:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/
  windows/error.r
  b:12
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `ge
  m_original_require'
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `re
  quire'
          from C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/
  win32/proces
  s.rb:1
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `ge
  m_original_require'
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `re
  quire'
          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
  process.rb:
  1
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `ge
  m_original_require'
          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  31:in `re
  quire'
          from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  ie.rb:45
          from (irb):6
  irb(main):007:0
--~--~-~--~~~---~--~~
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

2009-02-23 Thread Jim Matthews

If you do the one click Ruby install and do not do silent mode,
there is a Choose Components screen that allows you to select
SciTE and select Enable RubyGems.

Jim

On Feb 23, 11:17 am, Darin Duphorn dduph...@redbrickhealth.com
wrote:
 I didn't see that option, but I have to install on everyones machine, so I 
 will look for it.

 Thanks,

 Darin

 -Original Message-
 From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
 On Behalf Of Jim Matthews
 Sent: Monday, February 23, 2009 11:09 AM
 To: Watir General
 Subject: [wtr-general] Re: Installing Watir

 I believe that the:

 RUBYOPT - Value = -rubygems

 is controlled by the enable Ruby gems setting in the install
 process.
 Make sure you select the enable Ruby gems and it creates the variable
 if it does not exist.

 Jim

 On Feb 23, 10:55 am, Moochie dduph...@redbrickhealth.com wrote:
  Why doesn't it automatically update your system setting when
  installing ruby?

  I have to always repeat the following everytime I upgrade to a newer
  version before I can run gem Install watir.

  Goto Setting -Control Panel- System
  Click Advanced Tab
  Click Environment Variables
  Under Path Variable verify C:\Ruby\bin Exists.  If not add it.
  Under PATHEXT Variable verify .RB exists.  If not add it
  If variable RUBYOPT Doesn't Exist add it
  RUBYOPT - Value = -rubygems

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

2009-02-23 Thread Jim Matthews

That is strange.  Test::Unit should be automatically installed with
the Ruby installation.

When I have seen the LoadError problem, it has been because of
RUBYOPT not being defined.

One thing I noticed, your rubygems did not have the hyphen in front of
it and that is got split on the line I wrote before.  Make sure it
looks like this:

RUBYOPT = -rubygems

I don't know what else to suggest right now.

Jim

On Feb 23, 11:59 am, Smita Godbole smita.godb...@gmail.com wrote:
 Actually it is there.  I have total 3 environment variable
 Path =C:\ruby\bin ;
 PATHEXT = RB ;RBW
 and RUBYOPT = rubygems

 Thanks
 Smita

 On Mon, Feb 23, 2009 at 12:45 PM, Jim Matthews jim_m...@swbell.net wrote:

  Usually when you get a load error on a gem that really is installed,
  it is because the environmental variable RUBYOPT is not set.

  Check your environmental variables and if RUBYOPT is not set to -
  rubygems, then add it.

  You can find environmental variables in the Advanced tab of My
  Computer Properties.

  Jim

  On Feb 23, 11:33 am, Smita Godbole smita.godb...@gmail.com wrote:
   Hi Tiffany,
   Thank you very much.  One more question I have, is there any test that
  can
   verify the Test::Unit installation?
   I tried running core_test.rb file and got following error i.e.

   C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
   `gem_original_require': no such file to load -- unittests/setup/lib
   (LoadError)
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
   `require'
    from ./../unittests/setup.rb:21
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
   `gem_original_require'
    from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
   `require'
    from core_tests.rb:
   I really don't know what to do here.  some one on internet suggested
  doing
   'sudo' and it gave me error too.  So kind of confused.
   Thanks
   Smita

    On Fri, Feb 20, 2009 at 3:40 PM, Tiffany Fodor tcfo...@comcast.net
  wrote:

Hi Smita - welcome to Watir!

Watir is a Ruby library that allows you to manipulate objects on web
pages, not a framework for tests.  I think you're asking about how to
set up a framework of Watir tests and that depends on your situation.
You might want to check out Test::Unit, RSpec, Rasta and Watirloo as
potential frameworks.

If you haven't already, take a look at the wiki for a tutorial.  The
'Learning More' section has examples of various frameworks.

   http://wiki.openqa.org/display/WTR/Project+Home

I hope this helps!

-Tiffany

On Feb 20, 10:12 am, Smita Godbole smita.godb...@gmail.com wrote:
 Hi,

 I am very new to Watir.  Still reading and evaluating it.  I want to
  know
 where can I save methods written in Watir?  Is there any specific
  folder
for
 it?  How can I execute these written methods?

 Thanks
 Smita
--~--~-~--~~~---~--~~
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: Problem displaying XML file with XSL in Firefox and Safari

2009-01-30 Thread Jim Matthews

Good that you could read my mind and know that I was talking about XSL
instead of xls.

Anyway, I tried your new stylesheet and it still works for me in IE
but it still does not work in Firefox for me.  I did not try Safari
yet since it did not work in Firefox.  Any other thoughts?

Jim

On Jan 29, 6:19 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 I've updated my example harness in the wiki to include a stylesheet
 with this fix.  I've verified that it works with IE, Firefox, and
 Opera, but I don't have Safari installed anywhere.

 If anyone is interested in using ci_reporter to report test results,
 you can find an example of how to use it here:

 http://wiki.openqa.org/display/WTR/Excel+Data+Driven+Harness+with+Dat...

 -Tiffany

 On Jan 29, 4:42 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Hey Jim!

  I found a conditional you can add to the stylesheet so you can view
  the results in Firefox.  If you add this line of code to the
  stylesheet after line 2, it works for me.

  xsl:if test=system-property('xsl:vendor')='Transformiix'/xsl:if

  I can post a new stylesheet to the wiki.

  Hope this helps!

  -Tiffany

  On Jan 29, 4:02 pm, Jim Matthews jim_m...@swbell.net wrote:

   I am using ci_reporter to produce XML output from test runs from Watir
   tests.

   Tiffany supplied an XLS file to reference in the XML file, which works
   fine in IE.  The problem is that when you try to view the XML file in
   Firefox or Safari, the file looks like raw XML.

   I was wondering if anyone had a similar experience with XLS and knew
   if you had to do something different to get it to work with Firefox or
   Safari.  If you would like to see what is happening, you can goto:

  http://www.watirbuild.com/builds/watir/1681.3

   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: Problem displaying XML file with XSL in Firefox and Safari

2009-01-30 Thread Jim Matthews

Does Firefox require a plugin to make this work?


On Jan 30, 9:44 am, Jim Matthews jim_m...@swbell.net wrote:
 Good that you could read my mind and know that I was talking about XSL
 instead of xls.

 Anyway, I tried your new stylesheet and it still works for me in IE
 but it still does not work in Firefox for me.  I did not try Safari
 yet since it did not work in Firefox.  Any other thoughts?

 Jim

 On Jan 29, 6:19 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  I've updated my example harness in the wiki to include a stylesheet
  with this fix.  I've verified that it works with IE, Firefox, and
  Opera, but I don't have Safari installed anywhere.

  If anyone is interested in using ci_reporter to report test results,
  you can find an example of how to use it here:

 http://wiki.openqa.org/display/WTR/Excel+Data+Driven+Harness+with+Dat...

  -Tiffany

  On Jan 29, 4:42 pm, Tiffany Fodor tcfo...@comcast.net wrote:

   Hey Jim!

   I found a conditional you can add to the stylesheet so you can view
   the results in Firefox.  If you add this line of code to the
   stylesheet after line 2, it works for me.

   xsl:if test=system-property('xsl:vendor')='Transformiix'/xsl:if

   I can post a new stylesheet to the wiki.

   Hope this helps!

   -Tiffany

   On Jan 29, 4:02 pm, Jim Matthews jim_m...@swbell.net wrote:

I am using ci_reporter to produce XML output from test runs from Watir
tests.

Tiffany supplied an XLS file to reference in the XML file, which works
fine in IE.  The problem is that when you try to view the XML file in
Firefox or Safari, the file looks like raw XML.

I was wondering if anyone had a similar experience with XLS and knew
if you had to do something different to get it to work with Firefox or
Safari.  If you would like to see what is happening, you can goto:

   http://www.watirbuild.com/builds/watir/1681.3

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] Problem displaying XML file with XLS in Firefox and Safari

2009-01-29 Thread Jim Matthews

I am using ci_reporter to produce XML output from test runs from Watir
tests.

Tiffany supplied an XLS file to reference in the XML file, which works
fine in IE.  The problem is that when you try to view the XML file in
Firefox or Safari, the file looks like raw XML.

I was wondering if anyone had a similar experience with XLS and knew
if you had to do something different to get it to work with Firefox or
Safari.  If you would like to see what is happening, you can goto:

http://www.watirbuild.com/builds/watir/1681.3

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] Anyone have a way of converting ci_reporter XML to pretty html?

2008-12-05 Thread Jim Matthews

I have gotten cruisecontrol.rb running with ci_reporter and the
ci_reporter XML files into the build artifacts directory.  The problem
is, it is the ugly ci_reporter xml output.

I would like to have something that converts all the ci_reporter xml
files into one, pretty report.  Has anyone done this before or know of
a tool that would do it?

I have Googled and cannot find anything useful.

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



[wtr-general] Re: Anyone have a way of converting ci_reporter XML to pretty html?

2008-12-05 Thread Jim Matthews

Thanks Tiffany,

I'll give it a try.

Jim

On Dec 5, 11:43 am, Tiffany Fodor [EMAIL PROTECTED] wrote:
 Hi Jim!

 I'm also using ci_reporter and I created an xsl stylesheet to
 transform the ci_reporter xml reports to something more readable.
 I've posted an example with my test harness here:

 http://wiki.seleniumhq.org/display/WTR/Excel+Data+Driven+Harness+with...

 The files on interest to you will probably be the ReportResults.rb,
 transform-results.xsl and I had to create a batch file to run my
 harness so that ci_reporter could complete it's tasks before I tried
 to do anything with the results file.

 Let me know if you have and questions or problems.

 -Tiffany

 On Dec 5, 9:32 am, Jim Matthews [EMAIL PROTECTED] wrote:

  I have gotten cruisecontrol.rb running with ci_reporter and the
  ci_reporter XML files into the build artifacts directory.  The problem
  is, it is the ugly ci_reporter xml output.

  I would like to have something that converts all the ci_reporter xml
  files into one, pretty report.  Has anyone done this before or know of
  a tool that would do it?

  I have Googled and cannot find anything useful.

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



[wtr-general] How close are we to be able to run common tests with Watir and FireWatir

2008-11-04 Thread Jim Matthews

How close are we to be able to run common tests with Watir and
FireWatir?

That is the question I asked Bret earlier today.  The short answer is
that many things work both in Watir and Firewatir under 1.6.1.  The
main functionality that will still be broken in 1.6.2 is the
attach.  That is slated to be fixed after 1.6.2. The problem with
visible may or may not make it in 1.6.2.  There is a fix for the
problem around white space that is fixed and will be in 1.6.2.

We need your help.  Spend some time running your existing tests with
1.6.2 on IE and on Firefox.  Let us know what issues you have.  I have
started to run existing Watir tests I have with 1.6.1 on IE and
Firefox.  Although I have not finished testing, a number of them run
with little or no modification.

So, Who am I?  Jim Matthews.  I have worked with Bret at a previous
company and am working with him now to help get the common version of
Watir/FireWatir out.  I am a long time test automation implementer and
have been using Watir for about three years.  I monitor the Watir
General group and jump in when I think I can be useful.  The community
effort to have a common IE and FireFox test tool is paying off.



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



[wtr-general] Re: Watir 1.6.1 is available for testing

2008-11-03 Thread Jim Matthews

I am trying to install Watir 1.6.1 on Ruby 1.8.6-27 and am having a
problem.  It looks like the problem you have when you are behind a
proxy, but I am not behind a proxy.  I downloaded all three watir gem
files into the same directory.  When I try to do the gem install, here
is what happens:

C:\Installed_Files\ruby_w_watir_1_6_1\watir_1_6_1gem install watir
ERROR:  While executing gem ... (URI::InvalidURIError)
bad URI(is not URI?): C:/Installed_Files/ruby_w_watir_1_6_1/
watir_1_6_1/commonwatir-1[1].6.1.gem

On Nov 3, 10:20 am, JArkelen [EMAIL PROTECTED] wrote:
 These are my installation steps:
 - I have a clean windows xp machine (vmware image)
 - I install ruby 186-26
 - I download watir, firewatir and commonwatir from 
 here:http://wiki.openqa.org/display/WTR/Development+Builds
 - I remove the version numbers from the gem files (for easier typing
 in dos command window)
 - I install watir with 'gem install watir'
 - Then I receive that message

 Cheers,
 John

 On Nov 3, 4:31 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

  I've been testing with Ruby 186-26.

  Watir 1.5 also required win32-process (0.5.5). Can you give more
  information about how you are installing it? The gem installer should be
  automatically installing this gem.

  Bret

  JArkelen wrote:
   Hi,

   Which version of Ruby should I install to make Watir 1.6.1 work?
   I tried both 185-24 and 186-26, but when trying to install watir, I
   get the message Error installing watir: watir requires win32-process

   = 0.5.5

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



[wtr-general] Re: Watir 1.6.1 is available for testing

2008-11-03 Thread Jim Matthews

I downloaded all three files like the instructions at
http://wiki.openqa.org/display/WTR/Development+Builds
indicated.  I start the download and save them to the directory.  I
have re-downloded the files and these are the file names I get:

commonwatir-1[1].6.1.gem
firewatir-1[1].6.1.gem
watir-1[1].6.1.gem

Jim

On Nov 3, 11:07 am, Bret Pettichord [EMAIL PROTECTED] wrote:
 Somehow the filename of the gem changed when you downloaded it. I think
 that is the source of your problem.

 Bret

 Jim Matthews wrote:
  I am trying to install Watir 1.6.1 on Ruby 1.8.6-27 and am having a
  problem.  It looks like the problem you have when you are behind a
  proxy, but I am not behind a proxy.  I downloaded all three watir gem
  files into the same directory.  When I try to do the gem install, here
  is what happens:

  C:\Installed_Files\ruby_w_watir_1_6_1\watir_1_6_1gem install watir
  ERROR:  While executing gem ... (URI::InvalidURIError)
      bad URI(is not URI?): C:/Installed_Files/ruby_w_watir_1_6_1/
  watir_1_6_1/commonwatir-1[1].6.1.gem

  On Nov 3, 10:20 am, JArkelen [EMAIL PROTECTED] wrote:

  These are my installation steps:
  - I have a clean windows xp machine (vmware image)
  - I install ruby 186-26
  - I download watir, firewatir and commonwatir from 
  here:http://wiki.openqa.org/display/WTR/Development+Builds
  - I remove the version numbers from the gem files (for easier typing
  in dos command window)
  - I install watir with 'gem install watir'
  - Then I receive that message

  Cheers,
  John

  On Nov 3, 4:31 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

  I've been testing with Ruby 186-26.

  Watir 1.5 also required win32-process (0.5.5). Can you give more
  information about how you are installing it? The gem installer should be
  automatically installing this gem.

  Bret

  JArkelen wrote:

  Hi,

  Which version of Ruby should I install to make Watir 1.6.1 work?
  I tried both 185-24 and 186-26, but when trying to install watir, I
  get the message Error installing watir: watir requires win32-process

  = 0.5.5

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