[wtr-general] Re: How to Include a ruby Program inside another Ruby Program

2009-02-13 Thread malar

Hi,
I Tried Ur command..
but still i am getting the same error.

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/
core_ext/module/introspection.rb:70:in `const_get': no such file to
load -- safariwatir (MissingSourceFile)..


Thanks,
Malar



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

2009-02-13 Thread Khaja

Hi ,

I am looking for a UI testing tool for testing a webapplication, I
could find that two of the tools look  very promising Watir  and
Selenium

Can any point me where does Watir score well over Selenium in
otherwords which tool do you prefer..?


Thanks
-Khaja

--~--~-~--~~~---~--~~
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: Controlling JavaScript Pop Ups without .click_no_wait

2009-02-13 Thread Bill Xu
yeap, click! also works for me. but the reason why I want to figure out why
click_no_wait does not work is that I want to use select_no_wait function (I
am testing on a dropdown control and while you select the dropdown control,
it will pop up download file page),
select_no_wait is the function i got from
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups (iteam 6)
but it seems does not work. It can not trigger the select operation, just
like click_no_wait does not trigger click operation. I think they have the
similar root cause. do you have some ideas?

#sample code#
#select_no_wait method for select lists - needed for popups resulting from
select lists
module Watir
class Element
#select_no_wait - selects a drop-down element spawning a new
process.
#this is needed to close potential pop-ups that select drop-down can
trigger.
def select_no_wait(item)
assert_enabled
puts calls select_no_wait function
highlight(:set)
object = #{self.class}.new(self,
:unique_number,#{self.unique_number})
@page_container.eval_in_spawned_process(object +
.set('#{item}'))
highlight(:clear)
end
end
end

def save_file(filepath)
ai = WIN32OLE.new(AutoItX3.Control)
ai.WinWait(File Download, , 5)
ai.ControlFocus(File Download, , Save)
sleep 1
ai.ControlClick(File Download, , Save, left)
ai.WinWait(Save As, , 5)
sleep 1
ai.ControlSend(Save As, , Edit1,filepath)
ai.ControlClick(Save As, , Save, left)
ai.WinWait(Download complete, , 5)
ai.ControlClick(Download complete, , Close)
  end

#main code#
$ie.select_list(:id,_id0:actions).select(Generate Default Template)
save_file(C:\\file1.txt)


2009/2/13 jensen2525 jensen2...@gmail.com



 I ran into a similar issue and was able to work around it by calling
 click! instead of click or click_no_wait.  We're not using SproutCore
 so this may not be relevant to your issue.

 ## snip
  # Click on the Export button then Save the file as an
 artifact
  export = browser.button(:id, exportButtonId)
  export.click!
  popup_save_file artifact_filename
 ## end snip

 ## snip
def popup_save_file(filename, wait_time = 10)
  begin
autoit = WIN32OLE.new(AutoItX3.Control)

# Wait for the File Download dialog
autoit.WinWaitActive(File Download, , wait_time)

# Click on the Save button
autoit.ControlFocus(File Download, , Save)
sleep 1
autoit.Send(S)
autoit.ControlClick(File Download, , Save)

# Wait for the Save As dialog, enter the filename and click
 Save
autoit.WinWaitActive(Save As, , wait_time)
autoit.Send(filename)
autoit.ControlClick(Save As, , Save)

# Wait for the Download complete dialog and Close it
autoit.WinWaitActive(Download complete)
autoit.WinClose(Download complete)
  rescue
@@logger.warn Error occurred while saving file: #{$!}
  end
 ##end snip


 Good luck.



 On Feb 11, 8:11 pm, Bill Xu xulei8823...@gmail.com wrote:
  Hi
 The Thread.new function seems still could not solve the problem.
  (click_no_wait still could not work for me, the)
  see following simple code:
  code#
  downloadlink  = $ie.link(:text,SAMPLE.CSV)
  thr = Thread.new {
downloadlink.fire_event(onMouseDown)
downloadlink.fire_event(onMouseUp)}
 
  downloadlink.click_no_wait
  save_file(C:\\file.txt)
  code end#
  Note that the link is chosen but not clicked.
 
  2009/2/11 LFIdnl sraniim...@gmail.com
  
 
 
   Run you part of code in new thread:
 
   thr = Thread.new {
 your_object.fire_event(onMouseDown)
 your_object.fire_event(onMouseUp)
   }
   sleep(5) #Waiting for end of execution of thread
   #continue your test
 
   On 26 янв, 23:25, Bill Mosteller w...@greatdecals.com wrote:
The application situation is that the user is about to discard
 unsaved
work.  A dialog box appears titled Windows Internet Explorer saying
Are you sure you want to delete the selected Email? with buttons
OK and Cancel.
 
I thought my prayers were answered for this when I found:
  http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
 
While it proposes five solutions to the problem, solutions 3 thorugh
 5
require the use of .click_no_wait.  I'm testing a SproutCore
application, and .click doesn't work, so .click_no_wait doesn't,
 either.  (I'm using .fire_event(onMouseDown) followed by
 .fire_event
(onMouseUp) to click on things.
 
So I tried solutions 1 and 2 in the article, and while I got both to
execute without errors in my application, neither approach dismisses
my modal dialog box.
 
Thankis.
Bill Mosteller
Eloqua

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to 

[wtr-general] Re: Watir Vs Selenium

2009-02-13 Thread Željko Filipin
On Fri, Feb 13, 2009 at 10:04, Khaja khwaja.ag...@gmail.com wrote:
 which tool do you prefer..?

I guess most people here prefer Watir. At least I do. :)

Željko

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



[wtr-general] Re: Watir Vs Selenium

2009-02-13 Thread Alister Scott

Hi Khaja,

Bret wrote a great article about the differences, and why he's
contributed to both: http://www.io.com/~wazmo/blog/archives/2005_02.html#000229
I personally prefer Watir as it requires no server side components.
This is a big deal for me as I have had to run automated tests in many
environments including production where it is not sensible to include
server side components for testing.

Cheers,

Alister Scott
http://watirmelon.wordpress.com/

On Feb 13, 7:04 pm, Khaja khwaja.ag...@gmail.com wrote:
 Hi ,

 I am looking for a UI testing tool for testing a webapplication, I
 could find that two of the tools look  very promising Watir  and
 Selenium

 Can any point me where does Watir score well over Selenium in
 otherwords which tool do you prefer..?

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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread aidy lewis
Natasha,

I am based in London: if we could get 5 or 6 people we could form a
user-group.

But there is also LRUG:  http://lrug.org/

Aidy

On 13/02/2009, Natasha Ranney itsn...@yahoo.co.uk wrote:

 Is it possible to have some in London?

 Not sure if there are any Watir users in London.

 Thanks,
 Natasha

 --- On *Fri, 13/2/09, niartseoj niarts...@gmail.com* wrote:

 From: niartseoj niarts...@gmail.com
 Subject: [wtr-general] Re: Where to hold public training?
 To: Watir General watir-general@googlegroups.com
 Date: Friday, 13 February, 2009, 4:53 AM

 how about Washington DC? or someplace off GREEN BELT turnpike in
 Reston Virginia
 bring the show to the east  PLEASE

 On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com wrote:
  The first public training class on Watir (including the new WatirCraft
  framework) is March 25-26 in Austin TX.  We're
  discussing where to
  hold additional public classes after that.  Portland OR has been
  mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
  based on need.
 
  Pete





 


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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread JArkelen

Eindhoven, The Netherlands ;-)
But London would be great too.

On Feb 13, 10:39 am, Natasha Ranney itsn...@yahoo.co.uk wrote:
 Is it possible to have some in London?

 Not sure if there are any Watir users in London.

 Thanks,
 Natasha

 --- On Fri, 13/2/09, niartseoj niarts...@gmail.com wrote:
 From: niartseoj niarts...@gmail.com
 Subject: [wtr-general] Re: Where to hold public training?
 To: Watir General watir-general@googlegroups.com
 Date: Friday, 13 February, 2009, 4:53 AM

 how about Washington DC? or someplace off GREEN BELT turnpike in
 Reston Virginia
 bring the show to the east  PLEASE

 On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com wrote:

  The first public training class on Watir (including the new WatirCraft
  framework) is March 25-26 in Austin TX.  We're discussing where to
  hold additional public classes after that.  Portland OR has been
  mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
  based on need.

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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread Alister Scott

There is only one entry for London on the Watir users list:
http://wiki.openqa.org/display/WTR/Watir+Users
There are 15 people from London in Watir users LinkedIn Group.

Cheers,
Alister

On Feb 13, 7:39 pm, Natasha Ranney itsn...@yahoo.co.uk wrote:
 Is it possible to have some in London?

 Not sure if there are any Watir users in London.

 Thanks,
 Natasha

 --- On Fri, 13/2/09, niartseoj niarts...@gmail.com wrote:
 From: niartseoj niarts...@gmail.com
 Subject: [wtr-general] Re: Where to hold public training?
 To: Watir General watir-general@googlegroups.com
 Date: Friday, 13 February, 2009, 4:53 AM

 how about Washington DC? or someplace off GREEN BELT turnpike in
 Reston Virginia
 bring the show to the east  PLEASE

 On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com wrote:

  The first public training class on Watir (including the new WatirCraft
  framework) is March 25-26 in Austin TX.  We're discussing where to
  hold additional public classes after that.  Portland OR has been
  mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
  based on need.

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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread Natasha Ranney
Thats Great :)

I am aware of LRUG. Just have attended one of its session. But have found that 
they have ruby-related discussions more, as compared to Watir and testing. So 
its good to be part of a group that focusses on these aspects. Though knowing 
more about Ruby does help :)

Cheers,
Natasha

--- On Fri, 13/2/09, aidy lewis aidy.le...@googlemail.com wrote:
From: aidy lewis aidy.le...@googlemail.com
Subject: [wtr-general] Re: Where to hold public training?
To: watir-general@googlegroups.com
Date: Friday, 13 February, 2009, 3:43 PM

Natasha,I am based in London: if we could get 5 or 6 people we could form a 
user-group.
But there is also LRUG:  http://lrug.org/Aidy
On 13/02/2009, Natasha Ranney itsn...@yahoo.co.uk wrote:
Is it possible to have some in London?

Not sure if there are any Watir users in London.

Thanks,
Natasha


--- On Fri, 13/2/09, niartseoj niarts...@gmail.com wrote:

From: niartseoj niarts...@gmail.com
Subject: [wtr-general] Re: Where to hold public training?
To: Watir General watir-general@googlegroups.com

Date: Friday, 13 February, 2009, 4:53 AM

how about Washington DC? or someplace off GREEN BELT turnpike in
Reston Virginia
bring the show to the east  PLEASE


On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com wrote:
 The first public training class on Watir (including the new WatirCraft

 framework) is March 25-26 in Austin TX.  We're
 discussing where to
 hold additional public classes after that.  Portland OR has been
 mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
 based on need.

 Pete




 













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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread Natasha Ranney
I have just joined the linked in group. Thanks for sharing. Wasn't aware of it 
till date.

--- On Fri, 13/2/09, aidy lewis aidy.le...@googlemail.com wrote:
From: aidy lewis aidy.le...@googlemail.com
Subject: [wtr-general] Re: Where to hold public training?
To: watir-general@googlegroups.com
Date: Friday, 13 February, 2009, 3:57 PM

Good: If anyone is in LinkeIn, could you ask the other 15 as well.

If we get enough interest, I could create a site.

Aidy


On 13/02/2009, JArkelen johnvanarke...@gmail.com wrote:

  Hi Aidy,

  I would be interested in creating a user group.
  Although I am based in The Netherlands, as a Charlton Athletic
  supporter I am in London quite frequently :-)

  On Feb 13, 11:13 am, aidy lewis aidy.le...@googlemail.com wrote:
   Natasha,
  
   I am based in London: if we could get 5 or 6 people we could form a
   user-group.
  
   But there is also LRUG:  http://lrug.org/
  
   Aidy

 
   On 13/02/2009, Natasha Ranney itsn...@yahoo.co.uk wrote:
  
  
  
Is it possible to have some in London?
  
Not sure if there are any Watir users in London.
  
Thanks,
Natasha
  
--- On *Fri, 13/2/09, niartseoj niarts...@gmail.com*
wrote:
  
From: niartseoj niarts...@gmail.com
Subject: [wtr-general] Re: Where to hold public training?
To: Watir General
watir-general@googlegroups.com
Date: Friday, 13 February, 2009, 4:53 AM
  
how about Washington DC? or someplace off GREEN BELT turnpike
in
Reston Virginia
bring the show to the east  PLEASE
  
On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com
wrote:
 The first public training class on Watir (including the
new WatirCraft
 framework) is March 25-26 in Austin TX.  We're
 discussing where to
 hold additional public classes after that.  Portland OR
has been
 mentioned.  Bay Area?  Chicagoland?  We're looking for
suggestions
 based on need.
  
 Pete
  






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



[wtr-general] Re: Where to hold public training?

2009-02-13 Thread JArkelen

Hi Aidy,

I would be interested in creating a user group.
Although I am based in The Netherlands, as a Charlton Athletic
supporter I am in London quite frequently :-)

On Feb 13, 11:13 am, aidy lewis aidy.le...@googlemail.com wrote:
 Natasha,

 I am based in London: if we could get 5 or 6 people we could form a
 user-group.

 But there is also LRUG:  http://lrug.org/

 Aidy

 On 13/02/2009, Natasha Ranney itsn...@yahoo.co.uk wrote:



  Is it possible to have some in London?

  Not sure if there are any Watir users in London.

  Thanks,
  Natasha

  --- On *Fri, 13/2/09, niartseoj niarts...@gmail.com* wrote:

  From: niartseoj niarts...@gmail.com
  Subject: [wtr-general] Re: Where to hold public training?
  To: Watir General watir-general@googlegroups.com
  Date: Friday, 13 February, 2009, 4:53 AM

  how about Washington DC? or someplace off GREEN BELT turnpike in
  Reston Virginia
  bring the show to the east  PLEASE

  On Feb 12, 5:57 pm, Pete Dignan p...@watircraft.com wrote:
   The first public training class on Watir (including the new WatirCraft
   framework) is March 25-26 in Austin TX.  We're
   discussing where to
   hold additional public classes after that.  Portland OR has been
   mentioned.  Bay Area?  Chicagoland?  We're looking for suggestions
   based on need.

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



[wtr-general] problem in clicking span

2009-02-13 Thread jam

Hi,

Iam having a menu which is getting identified as a link. when I click
it iam getting a sub menu. where the submenu items are getting
identified as a span. The problem is when i click( iam using ie.span
(:text,span name).click ) nothing happens. Kindly help me in this.

Thanks,
jam
--~--~-~--~~~---~--~~
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 in clicking span

2009-02-13 Thread wesley chen
Would you please provide more detail html information?

Thanks.
Wesley Chen.


On Fri, Feb 13, 2009 at 7:32 PM, jam ruby.wa...@gmail.com wrote:


 Hi,

 Iam having a menu which is getting identified as a link. when I click
 it iam getting a sub menu. where the submenu items are getting
 identified as a span. The problem is when i click( iam using ie.span
 (:text,span name).click ) nothing happens. Kindly help me in this.

 Thanks,
 jam
 


--~--~-~--~~~---~--~~
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: Unable to open IE window

2009-02-13 Thread Jaz

Hi!

Ben, did you get any help from Daniel Berger?

The first thing I thought was just that there was some kind of
conflict with Visual Studio. I have installed Visual Web developer
2008 and visual studio.
It's really strange because my colleague have the same programs
installed but she doesn't have any problem with watir, ruby.

(Though, I think she installed watir BEfore she installed the other
microsoft products...)

/Jasmin

On 12 Feb, 17:11, Bret Pettichord b...@pettichord.com wrote:
 Maybe.

 You should talk to Daniel Berger, who maintains the windows gems. I
 don't think he reads this list.
 djber...@gmail.com

 Bret



 Ben wrote:
  Ok... I tried a brand new installation of Ruby and Watir on a fresh
  win xp install using a VMWare virtual machine and everything works
  perfectly... I have both MS Visual Studio 2005 and Visual Studio 6.0
  installed on my computer... I'm starting to beleive it might be a dll
  version conflict caused by Visual Studio... What do you think of this?
  Is it possible?

  Ben

  On Feb 12, 9:19 am, Ben benoit.lem...@gmail.com wrote:

  I tried to completely uninstall (using gem uninstall packagename)
  and re-install win32-* gems, windows-* gems and Watir.. I still have
  the same problem. Here's my gem list :

  *** LOCAL GEMS ***

  activesupport (2.2.2)
  builder (2.1.2)
  commonwatir (1.6.2)
  firewatir (1.6.2)
  fxri (0.3.6)
  fxruby (1.6.16)
  hoe (1.8.3)
  hpricot (0.6.164)
  log4r (1.0.5)
  ptools (1.1.6)
  rake (0.8.3)
  ruby-opengl (0.60.0)
  rubyforge (1.0.2)
  s4t-utils (1.0.4)
  test-unit (2.0.2, 2.0.1)
  user-choices (1.1.6)
  watir (1.6.2)
  win32-api (1.3.0)
  win32-process (0.6.0)
  windows-api (0.3.0)
  windows-pr (1.0.1)
  xml-simple (1.0.11)

  and here's my ENV :

  RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.1
    - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
    - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
    - EXECUTABLE DIRECTORY: C:/Ruby/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86-mswin32-60
    - GEM PATHS:
       - C:/Ruby/lib/ruby/gems/1.8
       - C:/Documents and Settings/benoit.MSHEADOFFICE/.gem/ruby/1.8
    - GEM CONFIGURATION:
       - :update_sources = true
       - :verbose = true
       - :benchmark = false
       - :backtrace = false
       - :bulk_threshold = 1000
    - REMOTE SOURCES:
       -http://gems.rubyforge.org/

  Thanks for your help!

  Ben Lemire

  On Feb 12, 1:58 am, Bret Pettichord b...@pettichord.com wrote:

  I think you need to do more than that. The problem seems to be that
  there bad versions of these gems out there, and that they were fixed
  without changing the version number. So the gem installer won't update
  your gem.

  The solution, therefore, would be uninstall these gems and then
  reinstall them.

  Bret

  Charley Baker wrote:

  It seems there are some compatibility issues here with some of the
  win32utils. Try updating your win32-api gem, win32-process and the
  windows-pr gem as well.  Same instructions that Aidy mentioned before
  with those gems.

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

  On Thu, Feb 5, 2009 at 6:51 AM, aidy lewis aidy.le...@googlemail.com
  mailto:aidy.le...@googlemail.com wrote:

      This will work

       require 'watir'
       Watir::Browser.default = ie
      �...@browser ||= Watir::Browser.new

      Aidy

      2009/2/5 Jaz jasmin.chazarr...@gmail.com
      mailto:jasmin.chazarr...@gmail.com:

       Hi!

       Thanks for answering so fast Aidy
       Unfortuneatly it still doesn't work =(

       (Going crazy soon...)

       /jasmin

       On Feb 5, 1:59 pm, aidy lewis aidy.le...@googlemail.com
      mailto:aidy.le...@googlemail.com wrote:
       gem list -r win*

       gem update windows-api -y

       Aidy

       2009/2/5 Jaz jasmin.chazarr...@gmail.com
      mailto:jasmin.chazarr...@gmail.com:

        How do I do that?

        On Feb 5, 12:36 pm, aidy lewis aidy.le...@googlemail.com
      mailto:aidy.le...@googlemail.com wrote:
        At a guess try updating your windows api gem

        Aidy

        2009/2/5 Jaz jasmin.chazarr...@gmail.com
      mailto:jasmin.chazarr...@gmail.com:

     Hi!

     Recently installed ruby to use watir, and I get a strange
      error when I
     execute the steps in Watir in 5 minutes
        http://wiki.openqa.org/display/WTR/Watir+in+5+Minutes

     These are the steps I follow:

     1. require watir

     2. ie = Watir::IE.new

     When I perform step 2 I get the following error:

     Win32::API::Error: Attempt to format message failed
     from
      C:/Ruby/lib/ruby/gems/1.8/gems/windows-api-0.3.0/lib/windows/
     api.rb:333 in 'initialize'
     from
      C:/Ruby/lib/ruby/gems/1.8/gems/windows-api-0.3.0/lib/windows/
     api.rb:333 in 'new'
     .
     .
     .
    

[wtr-general] Re: Controlling JavaScript Pop Ups without .click_no_wait

2009-02-13 Thread Bill Mosteller

Thanks for the suggestion; just tried click! and it works as well as
click and click_no_wait, whichi is to say not at all.  Sorry.

On Feb 12, 6:15 pm, jensen2525 jensen2...@gmail.com wrote:
 I ran into a similar issue and was able to work around it by calling
 click! instead of click or click_no_wait.  We're not using SproutCore
 so this may not be relevant to your issue.

 ## snip
           # Click on the Export button then Save the file as an
 artifact
           export = browser.button(:id, exportButtonId)
           export.click!
           popup_save_file artifact_filename
 ## end snip

 ## snip
     def popup_save_file(filename, wait_time = 10)
       begin
         autoit = WIN32OLE.new(AutoItX3.Control)

         # Wait for the File Download dialog
         autoit.WinWaitActive(File Download, , wait_time)

         # Click on the Save button
         autoit.ControlFocus(File Download, , Save)
         sleep 1
         autoit.Send(S)
         autoit.ControlClick(File Download, , Save)

         # Wait for the Save As dialog, enter the filename and click
 Save
         autoit.WinWaitActive(Save As, , wait_time)
         autoit.Send(filename)
         autoit.ControlClick(Save As, , Save)

         # Wait for the Download complete dialog and Close it
         autoit.WinWaitActive(Download complete)
         autoit.WinClose(Download complete)
       rescue
         @@logger.warn Error occurred while saving file: #{$!}
       end
 ##end snip

 Good luck.

 On Feb 11, 8:11 pm, Bill Xu xulei8823...@gmail.com wrote:



  Hi
     The Thread.new function seems still could not solve the problem.
  (click_no_wait still could not work for me, the)
  see following simple code:
  code#
  downloadlink  = $ie.link(:text,SAMPLE.CSV)
  thr = Thread.new {
    downloadlink.fire_event(onMouseDown)
    downloadlink.fire_event(onMouseUp)}

  downloadlink.click_no_wait
  save_file(C:\\file.txt)
  code end#
  Note that the link is chosen but not clicked.

  2009/2/11 LFIdnl sraniim...@gmail.com

   Run you part of code in new thread:

   thr = Thread.new {
     your_object.fire_event(onMouseDown)
     your_object.fire_event(onMouseUp)
   }
   sleep(5) #Waiting for end of execution of thread
   #continue your test

   On 26 янв, 23:25, Bill Mosteller w...@greatdecals.com wrote:
The application situation is that the user is about to discard unsaved
work.  A dialog box appears titled Windows Internet Explorer saying
Are you sure you want to delete the selected Email? with buttons
OK and Cancel.

I thought my prayers were answered for this when I found:
  http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups

While it proposes five solutions to the problem, solutions 3 thorugh 5
require the use of .click_no_wait.  I'm testing a SproutCore
application, and .click doesn't work, so .click_no_wait doesn't,
     either.  (I'm using .fire_event(onMouseDown) followed by .fire_event
(onMouseUp) to click on things.

So I tried solutions 1 and 2 in the article, and while I got both to
execute without errors in my application, neither approach dismisses
my modal dialog box.

Thankis.
Bill Mosteller
Eloqua- 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: Controlling JavaScript Pop Ups without .click_no_wait

2009-02-13 Thread Bill Mosteller

Thanks.  Just tried onClick, and it doesn't work either.

From the Ruby PickAxe book:

And if some thread happens to make a call to the operating system
that takes a long time to complete, all threads will hang until the
interpreter gets control back.

I think this is what I'm confronting.  Gonna have to suck it up and
try harder.

Ivan Kabluchkov wrote:
This is very stange that new thread freeze main thread. It can't be
( i hope :) ) .
I think, may be try to use onClick instead of onMouseDown +
onMouseUp.


--~--~-~--~~~---~--~~
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 Podcast 18: AWTA 2009 Rick Hower

2009-02-13 Thread Željko Filipin
Recently I started forgetting to announce each podcast I publish, but this
is the last one from awta 2009, so I had to announce it. :)

http://watirpodcast.com/awta-2009-rick-hower/

Željko

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



[wtr-general] Re: How to Include a ruby Program inside another Ruby Program

2009-02-13 Thread Bret Pettichord

The problem is that you have include Watir at toplevel in one of your 
programs.

Bret

malar wrote:
 Hi,
 I have to include a ruby program inside another ruby program.
 i used the following command,

   require ' logintest.rb'

 But i am getting an error,

 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
 core_ext/module/introspection.rb:70:in `const_get': no such file to
 load -- safariwatir (MissingSourceFile)..

 Thanks,
 Malar





 
   


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



[wtr-general] Re: How to Drag and Drop with Watir?

2009-02-13 Thread JackieH

I have to agree.  I have really enjoyed learning Watir and find it
very easy and intuitive to use, but in tasked with scripting a page
that contains Drag and Drop it has been a challenge to say the
least.   I have tried many examples from the group and the code
provided on the Wiki but it is like Bill said, almost a different
language.  I understand that scripting purely mouse driven events is
going to be difficult, but it just seems that there are so many smart
people in this group that the solutions would be better defined...

On Feb 12, 10:04 am, Bill Mosteller w...@greatdecals.com wrote:
 30 June 2006, dannyy wrote:
 We are able to write very robust and concise test cases, such as
 automating drag-and-drop without knowing how such behavior is
 implemented.

 I'm wondering what he's talking about?

 I've successfully written drag and drop scripts in SilkTest and
 Selenium, but doing so in Watir appears to be very difficult.  The few
 examples I've seen are so different from the isn't-this-easy tutorials
 on Watir as to be almost a different language.  The drag_contents_to
 method appears so specialized as to be useless for any sort of actual
 drag and drop automation I'd actually be able to use.  When forum
 members comment on drag and drop difficulties, others tell them when
 they're older they'll understand.  Such guidance is not so helpful
 when I'm trying to field a test suite that must include drag and drop.

 Bill Mosteller
 Eloqua
--~--~-~--~~~---~--~~
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] Podcast with Bret on moving Watir to Github

2009-02-13 Thread Željko Filipin
I will record a podcast with Bret on moving Watir to Github in a few hours.
My apologies for such short notice, but it was just arranged. If you have
any related questions for Bret, please send them. We will probably be both
at #watir irc channel while recording, so you can ask last minute questions
there.

Thanks,

Ž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: Gem Recall Notice: win32-api

2009-02-13 Thread Bret Pettichord

For some background on this problem, please see Daniels recent statement.
http://djberg96.livejournal.com/162898.html


Bret Pettichord wrote:
 Here is a stack trace that indicates that you have the error discussed 
 below:

 C:/ruby/lib/ruby/gems/1.8/gems/win32-api-1.3.0-x86-mswin32-80/lib/win32/api.so:
  
 126: The specified module could not be found.   - 
 C:/ruby/lib/ruby/gems/1.8/gems/win32-api-1.3.0-x86-mswin32-80/lib/win32/api.so
  
 (LoadError)

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

 from 
 C:/ruby/lib/ruby/gems/1.8/gems/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 
 `gem_original_require'

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

 from 
 C:/ruby/lib/ruby/gems/1.8/gems/windows-pr-1.0.1/lib/windows/error.rb:12

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require'

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

 from 
 C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.6.0/lib/win32/process.rb:1

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require'

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

 from 
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-process.rb:1

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require'

 from 
 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

 from 
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:45


 Bret Pettichord wrote:
   
 This notice applies to people who installed Watir last week and are 
 seeing problems.

 There was a bad gem, win32-api version 1.3.0 distributed last week. The 
 problem was fixed with a new gem that was given the same version number. 
 As a result, the gem installer can't tell whether you have the correct gem.

 To fix this problem, you must first uninstall the gem

   gem uninstall win32-api -v 1.3.0

 Then reinstall the gem

   gem install win32-api

 We still aren't sure whether other bad windows-gems were released last 
 week. If the above procedure does not cure your installation, you should 
 uninstall Ruby and then reinstall all your gems.

 Bret





 
   
 


 
   


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



[wtr-general] Re: element_by_xpath return value

2009-02-13 Thread rob

I am also curious about this.

Thanks.

On Jan 12, 8:42 pm, Bret Pettichord b...@pettichord.com wrote:
 I'm sure there's a way for Watir to do this just like FireWatir. It just
 hasn't been done yet, as far as i am aware.

 Angrez is the author of both Watir's xpath support as well as FireWatir,
 so that is probably why xpath works better with FireWatir than WatirIE.

 Angrez, do you have anything to add here?

 Bret

 Richard Lawrence wrote:
  But there's no way for Watir to infer the object type the way FireWatir 
  does?

  Thanks,

  Richard

  On Mon, Jan 12, 2009 at 9:15 AM, Bret Pettichord b...@pettichord.com 
  wrote:

  Richard Lawrence wrote:

  Using FireWatir'selement_by_xpathon my Mac, I get the expected type
  for the element. For example, on the Google home page:

  irb(main):008:0 b.element_by_xpath(//*...@name='btnG']).class
  submit
  = FireWatir::Button

  But with Watir (on Windows, of course), I always get an instance of
  WIN32OLE back. For the same example:

  irb(main):018:0 b.element_by_xpath(//*...@name='btnG']).class
  = WIN32OLE

  Is there a way I can get the Button object I expect from
 element_by_xpathwith Watir?

  b.button(:xpath, //*...@name='btnG'])

  This actually wraps the call toelement_by_xpath.

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



[wtr-general] Re: Variable expansion inside XPath syntax

2009-02-13 Thread Jason

That's it!

This isn't the first time I've struggled with expanding my variables
like that.  Evidently I'd tried something similar with the #{} but
missed the surrounding single quotes.  This gets me every time, I've
bookmarked this page for future reference!

Thanks Wesley, your help is appreciated.

- Jason


On Feb 13, 6:26 pm, wesley chen cjq@gmail.com wrote:
 You may try this:

 levelone_dropdown = 'Accounts'
 $browser.element_by_xpath(//dl/dt[contains(text
 (),'#{levelone_dropdown}')]).click

 Thanks.
 Wesley Chen.

 On Fri, Feb 13, 2009 at 12:52 PM, Jason freezingki...@gmail.com wrote:

  I seem to get myself stuck every Friday evening with seemingly trivial
  Watir / Ruby problems.  Here's this week's problem.

  I'm struggling to match by XPath with a variable inside the xpath
  syntax.

  The following works perfectly:

  $browser.element_by_xpath(//dl/dt[contains(text
  (),'Accounts')]).click

  But the following doesn't:

  levelone_dropdown = 'Accounts'
  $browser.element_by_xpath(//dl/dt[contains(text
  (),levelone_dropdown)]).click

  (Notice the difference - rather than specifying 'Accounts', I'm trying
  to pass this as a variable into the syntax.)

  What am I doing wrong here?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---