Re: [wtr-general] WIN32OLE.Open - runtime error

2010-07-08 Thread SMF SMF
Change 2nd line to as below-

excel = WIN32OLE::new('excel.application')

On Thu, Jul 8, 2010 at 5:00 PM, Shiv tms...@gmail.com wrote:

 Hello,

 I am trying to open a excel file and write data, but i m getting runtime
 error
  I checked the path is correct
 new method works fine but open method throws error...can u pls help me
 figure out this problem

 *Code:*
 require 'win32ole'
 excel = WIN32OLE.new('excel.application')
 excel.visible = true
 excel.Workbooks.Open('D:\shiv.xls')
 excel.range('A1').value = 'Hello, world.'
 excel.Close
 excel.Quit


 *Error:*
 C:\Ruby\binruby C:\Ruby_Scripts\Ex_open.rb
 C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open
 (WIN32OLERuntimeError)
 OLE error code:800A03EC in Microsoft Office Excel
   'D:\shiv.xls' could not be found. Check the spelling of the file
 name, and
  verify that the file location is correct.
 If you are trying to open the file from your list of most recently used
 files, m
 ake sure that the file has not been renamed, moved, or deleted.
 HRESULT error code:0x80020009
   Exception occurred.
 from C:/Ruby_Scripts/Ex_open.rb:6

 Regards,
 Shiv

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] WIN32OLE.Open - runtime error

2010-07-08 Thread SMF SMF
excel.Workbooks.Open(''D:\shiv.xls'') - change this line also and make
shiv.xls exist in D-drive

On Thu, Jul 8, 2010 at 6:55 PM, Basim Baassiri ba...@baassiri.ca wrote:

 is the d drive that you are specifying a network share? also, does the file
 exist with the correct spelling

 Basim


 On Thu, Jul 8, 2010 at 8:08 AM, Shiv tms...@gmail.com wrote:

 Thanks, BUT i get same error, I changed the 2nd line to

 excel = WIN32OLE::new('excel.application')
   On Thu, Jul 8, 2010 at 5:09 PM, SMF SMF shaikm.fi...@gmail.com wrote:

 Change 2nd line to as below-

 excel = WIN32OLE::new('excel.application')

   On Thu, Jul 8, 2010 at 5:00 PM, Shiv tms...@gmail.com wrote:

   Hello,

 I am trying to open a excel file and write data, but i m getting runtime
 error
  I checked the path is correct
 new method works fine but open method throws error...can u pls help me
 figure out this problem

 *Code:*
 require 'win32ole'
 excel = WIN32OLE.new('excel.application')
 excel.visible = true
 excel.Workbooks.Open('D:\shiv.xls')
 excel.range('A1').value = 'Hello, world.'
 excel.Close
 excel.Quit


 *Error:*
 C:\Ruby\binruby C:\Ruby_Scripts\Ex_open.rb
 C:/Ruby_Scripts/Ex_open.rb:6:in `method_missing': Open
 (WIN32OLERuntimeError)
 OLE error code:800A03EC in Microsoft Office Excel
   'D:\shiv.xls' could not be found. Check the spelling of the file
 name, and
  verify that the file location is correct.
 If you are trying to open the file from your list of most recently used
 files, m
 ake sure that the file has not been renamed, moved, or deleted.
 HRESULT error code:0x80020009
   Exception occurred.
 from C:/Ruby_Scripts/Ex_open.rb:6

 Regards,
 Shiv

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


   --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: How to capture Dynamic text using Ruby

2009-11-08 Thread SMF SMF
check this... (for Captcha)

http://groups.google.com/group/recaptcha/browse_thread/thread/499622081b0d8b90




On Mon, Nov 9, 2009 at 12:51 PM, shradha_Dalvi kshradh...@gmail.com wrote:


 Hi All,
 We all are acquainted with the opening a new account on
 gmail,yahoo,rediff etc.I had aquery,After filling all the information
 for crating mail account,at end ,we have provided a image which
 contains Alpha-numeric characters in Zic-zac way.

 Could anybody tell me how to capture it and fill it into given text
 field?



 Regards,
 Shraddha.
 


--~--~-~--~~~---~--~~
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: Working on Chrome watir

2009-11-04 Thread SMF SMF
Hi,

p browser.text_field(:name,q).set Shraddha

why is the letter p in your script?





On Wed, Nov 4, 2009 at 3:21 PM, shradha_Dalvi kshradh...@gmail.com wrote:


 Hi,

 after installing chromewatir 1.5.1,it is working fine. But another
 problem raises. For the following test script:-

 require chrome_watir
 include ChromeWatir::Exceptions
 include ChromeWatir
 browser = ChromeWatir::Browser.new
 browser.goto 'http://www.gmail.com'

 sleep 10
 p browser.text_field(:name,q).set Shraddha


 It is not recognizing the text_field object.I have tried with another
 object but reulted into same.

 Kindly help.


 Regards,
 Shraddha.



 On Nov 4, 2:29 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:
   On Wed, Nov 4, 2009 at 5:07 AM, shradha_Dalvi kshradh...@gmail.com
 wrote:
   The system cannot find the file specified.: CreateProcee() failed:
   (Processerror)
 
  Uninstall chrome_watir 1.5.0, install chromewatir 1.5.1 and let us know
 if
  you still get the error.
 
  gem install chromewatir
 
  Željko
  --
  watir.com - community manager
  watirpodcast.com - host

 


--~--~-~--~~~---~--~~
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: Data driven framework using SQL database

2009-10-30 Thread SMF SMF
you have to download the dbi files and configure them on your machine.




On Fri, Oct 30, 2009 at 12:30 PM, Pritam pmaha...@gmail.com wrote:


 Hi,

 Thank you for your reply.

 I have executed the code that you have given, but i got the following
 error.

 C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:368:in `load_driver': Could not
 load driver (no such file to load -- C:/Ruby/lib/ruby/site_ruby/1.8/
 dbd/ADO) (DBI::InterfaceError)
from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:233:in `_get_full_driver'
from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:219:in `connect'
from database.rb:5


 I went to the location(C:/Ruby/lib/ruby/site_ruby/1.8/dbd/) as
 indicated in the error, and could find only find ODBC  and Proxy
 folders and not ADO.
 Do i need to download and copy the ADO.rb file in this location in
 order to access the SQL database?
 If yes, where can i find this file...

 Thanks in advance


 On Oct 29, 4:56 pm, SMF SMF shaikm.fi...@gmail.com wrote:
  Hi Pritam,
 
  Answer to your *question 1.*
 
  require 'dbi'
  DB =
 
 Provider=SQLOLEDB.1;Server=servername;Database=DBname;Uid=userid;Pw=password
  sql = select LoginID from Login WHERE UserName ='xyz'
  DBI.connect(DBI:ADO:#{DB}) do | dbh |
  dbh.select_all( sql ) do |row|
  puts row[0]  # the first field
  #puts row[1]  # the second field
  end
  end
 
  No idea, about framework or architecture
 
  
  Thanks
 
   On Thu, Oct 29, 2009 at 5:03 PM, Pritam pmaha...@gmail.com wrote:
 
   Hi guys,
 
   I am new to ruby programming, and I need help in developing data
   driven framework which uses sql database for retrieving data. I have
   seen a lot of examples over internet which showed how to do it using
   excel and open source applications.
 
   To start with I need information for the following.
 
   1. How to connect to a sql database using ruby/watir scripts?
   2. What sought of architecture am I looking for?
 
   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: Data driven framework using SQL database

2009-10-30 Thread SMF SMF
Hi Pritam,

No problem. Could you please do one favor, can you post the
steps/configuration you followed to connect to database that will helpful to
others also.

Thanks,
smf

On Fri, Oct 30, 2009 at 1:58 PM, Pritam pmaha...@gmail.com wrote:



 Hi,

 Thank you very much.now am able to connect to the database and
 retrieve the data...

 Thanks again.



 On Oct 30, 12:25 pm, SMF SMF shaikm.fi...@gmail.com wrote:
  you have to download the dbi files and configure them on your machine.
 
   On Fri, Oct 30, 2009 at 12:30 PM, Pritam pmaha...@gmail.com wrote:
 
   Hi,
 
   Thank you for your reply.
 
   I have executed the code that you have given, but i got the following
   error.
 
   C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:368:in `load_driver': Could not
   load driver (no such file to load -- C:/Ruby/lib/ruby/site_ruby/1.8/
   dbd/ADO) (DBI::InterfaceError)
  from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:233:in
 `_get_full_driver'
  from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:219:in `connect'
  from database.rb:5
 
   I went to the location(C:/Ruby/lib/ruby/site_ruby/1.8/dbd/) as
   indicated in the error, and could find only find ODBC  and Proxy
   folders and not ADO.
   Do i need to download and copy the ADO.rb file in this location in
   order to access the SQL database?
   If yes, where can i find this file...
 
   Thanks in advance
 
   On Oct 29, 4:56 pm, SMF SMF shaikm.fi...@gmail.com wrote:
Hi Pritam,
 
Answer to your *question 1.*
 
require 'dbi'
DB =
 
  
 Provider=SQLOLEDB.1;Server=servername;Database=DBname;Uid=userid;Pw=password
sql = select LoginID from Login WHERE UserName ='xyz'
DBI.connect(DBI:ADO:#{DB}) do | dbh |
dbh.select_all( sql ) do |row|
puts row[0]  # the first field
#puts row[1]  # the second field
end
end
 
No idea, about framework or architecture
 

Thanks
 
 On Thu, Oct 29, 2009 at 5:03 PM, Pritam pmaha...@gmail.com wrote:
 
 Hi guys,
 
 I am new to ruby programming, and I need help in developing data
 driven framework which uses sql database for retrieving data. I
 have
 seen a lot of examples over internet which showed how to do it
 using
 excel and open source applications.
 
 To start with I need information for the following.
 
 1. How to connect to a sql database using ruby/watir scripts?
 2. What sought of architecture am I looking for?
 
 Thanks in advance.
 


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



[wtr-general] Re: Watir, AutoIT, Window Title and Regular Expression

2009-10-29 Thread SMF SMF
For me the *Ruby Script:* is working.


-Thanks


On Thu, Oct 29, 2009 at 12:34 PM, Pallavi Sharma write2pall...@gmail.comwrote:

 Hi

 Watir auto it implementation is not working if i use the REGEXPTITLE of
 auto it with it. The same script written directly in AutoIT works although.

 Does anyone knows why is this happening?

 Is something wrong with my script or is this not supported?

 *Ruby Script:*

  require 'win32ole'

 autoit = WIN32OLE.new('AutoItX3.Control')
 ret = autoit.WinWait([REGEXPTITLE:.*pad.*])
 autoit.WinClose([REGEXPTITLE:.*pad.*])


 *AutoIT Script*
 *
 *
 *
 WinWait([REGEXPTITLE:.*pad.*])
 WinClose([REGEXPTITLE:.*pad.*])


 Anyone here please help.

 Thanks,

 --
 Pallavi
 *

 


--~--~-~--~~~---~--~~
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, AutoIT, Window Title and Regular Expression

2009-10-29 Thread SMF SMF
Hi Pallavi,

Just for information, AutoIt is installed in my machine also.


Thanks,
SMF

2009/10/29 Pallavi Sharma write2pall...@gmail.com

 Oh Thanks Zeljko

 thats what even i was thinking, but i wonder why for SMF SMF the ruby
 script works??

 nyways thanks Zeljko.

 --
 Pallavi.


 On Thu, Oct 29, 2009 at 2:40 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:

 On Thu, Oct 29, 2009 at 8:04 AM, Pallavi Sharma write2pall...@gmail.com
 wrote:
  Watir auto it implementation is not working if i use the REGEXPTITLE of
 auto it with it. The same script written directly in AutoIT works although.

 I have played with autoit a few months ago, also trying to use regular
 expressions. Watir installs a smaller version of autoit, that has only a
 subset of full autoit functionality, and egular expression support is not
 there.


 Željko
 --
 watir.com - community manager
 watirpodcast.com - host







 


--~--~-~--~~~---~--~~
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, AutoIT, Window Title and Regular Expression

2009-10-29 Thread SMF SMF
In my machine I have AutoIT - autoit-v3-setup.exe and Watir - ruby186-26.exe



On Thu, Oct 29, 2009 at 3:59 PM, Pallavi Sharma write2pall...@gmail.comwrote:

 Another person has replied and stated that the ruby script works with
 REGEXPTITLE option

 I am sorry i dont know the name, so SMF ; well fine but autoit is installed
 on my system also and the ruby script with REGEXPTITLE doesn;t work for me.

 Is it that if you have complete auto it on the system then the ruby/watir
 script will work??

 --
 Pallavi.

 On Thu, Oct 29, 2009 at 3:49 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:

 2009/10/29 Pallavi Sharma write2pall...@gmail.com

  i wonder why for SMF SMF the ruby script works??

 I did not understand this.

 Ž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 turn to another newline when input the info in the textarea?

2009-10-29 Thread SMF SMF
It will allow only if @browser.text_field,(ld...) object supports multi
line property.


thanks,
smf

On Thu, Oct 29, 2009 at 2:47 PM, yuping zhong littlezhong...@gmail.comwrote:


 Hi,

 Fill some info in the textarea,I use \n to turn to a newline. But it
 doesn't work.

 Such as:

 @browser.text_field,(ld...).set(Hello,\nHappy new year)

 But it still fill as: Hello,Happy new year

 I want to be:

 Hello,
 Happy new year



 Any idea of that?

 Thanks.

 -Zhong
 


--~--~-~--~~~---~--~~
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: Data driven framework using SQL database

2009-10-29 Thread SMF SMF
Hi Pritam,

Answer to your *question 1.*

require 'dbi'
DB =
Provider=SQLOLEDB.1;Server=servername;Database=DBname;Uid=userid;Pw=password
sql = select LoginID from Login WHERE UserName ='xyz'
DBI.connect(DBI:ADO:#{DB}) do | dbh |
dbh.select_all( sql ) do |row|
puts row[0]  # the first field
#puts row[1]  # the second field
end
end

No idea, about framework or architecture



Thanks

On Thu, Oct 29, 2009 at 5:03 PM, Pritam pmaha...@gmail.com wrote:



 Hi guys,

 I am new to ruby programming, and I need help in developing data
 driven framework which uses sql database for retrieving data. I have
 seen a lot of examples over internet which showed how to do it using
 excel and open source applications.

 To start with I need information for the following.

 1. How to connect to a sql database using ruby/watir scripts?
 2. What sought of architecture am I looking for?

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