[wtr-general] How to capture Errors in batch running

2009-07-30 Thread Prince3105

Hi All,

I am a newbie of Watir. I have been using Watir for the past 10
months. I have created so many individual scripts and i run all those
by using Scite editor and my scripts update the test results in Excel
sheet, going good no issues in it. If any error occurs in the test run
i can easily capture it in Scite editor so i can correct my script.

I usually run my batch script by using Vbscript by using below code.

Set oAutoIt = WScript.CreateObject(AutoItX3.Control)
Set WshShell = WScript.CreateObject(WScript.Shell)

oAutoIt.Sleep 5000
WshShell.Run E:\DATA\Prince\WatIR\iComet\Tests\StoresAndSpares
\StoresSpares_Masters.RB
oAutoIt.Sleep 5000
i = 0
Do Until i=10
  If oAutoIt.WinExists(c:\ruby\bin\ruby.exe) Then
oAutoIt.Sleep 3
else
i = i + 1
  End If
Loop

WshShell.Run E:\DATA\Prince\WatIR\iComet\Tests\StoresAndSpares
\RolesRights_SS.RB
oAutoIt.Sleep 5000
i = 0
Do Until i=10
  If oAutoIt.WinExists(c:\ruby\bin\ruby.exe) Then
oAutoIt.Sleep 3
else
i = i + 1
  End If
Loop

WshShell.Run E:\DATA\Prince\WatIR\iComet\Tests\StoresAndSpares
\BPT_SS.RB


Above code working good and it runs the ruby files in command prompt ,
but unfortunately any error occurs in the middle of the execution
suddenly Ruby closes the current test and starts the next test. So i
couldn't collect the error details. So if any methods available in
Watir to collect the error log details please tell me.

Since am a new user of Watir i couldn't use it extensively so if any
easy methods or libraries are available please post it.


Thanks,
Prince3105

--~--~-~--~~~---~--~~
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] JSSH problem on Windows server 2003

2009-07-30 Thread pallavi shashidhar
Hi There,

I have the foll: installed - Ruby 1.8.6, watir 1.6.2 , firefox 3.012
OS: - Microsoft Windows Server 2003 R2 (32 bit)
Jssh - 0.9 installed along with Redistributed package for VS 2005 SP1
Steps - followed all the steps mentioned at step 3 on
http://wiki.openqa.org/display/WTR/FireWatir+Installation
  - Did run firefox from command prompt using
c:\ProgramFiles\Mozillafirefox.exe -jssh (browser opens up)

Am trying to run the following example :

require 'watir'
Watir::Browser.default = firefox
Watir::Browser.start(www.mail.yahoo.com)

and i get the foll: error

ruby exampletest.rb
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:271:in
`set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make
sure that JSSh is properly installed and Firefox is running with '-jssh'
option (Watir::Exception::UnableToStartJSShException)
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:161:in
`initialize'
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in
`new'
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in
`start'
from
c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb:71:in
`start'
from exampletest.rb:3
Exit code: 1

Tried with IRB, facing the same problem :
irb(main):001:0 require 'watir'
= true
irb(main):002:0 Watir::Browser.default = firefox
= firefox
irb(main):003:0 Watir::Browser.start(www.mail.yahoo.com)
Watir::Exception::UnableToStartJSShException: Unable to connect to machine :
127
.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox
is ru
nning with '-jssh' option
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo
x.rb:271:in `set_defaults'
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo
x.rb:161:in `initialize'
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo
x.rb:177:in `new'
from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo
x.rb:177:in `start'
from
c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.
rb:71:in `start'
from (irb):3

The same example when run on windows vista, i have no issues. Is there
anything in particular to do with JSSh for Windows Server 2003?

Regards,
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: Pick pop-up text and oracle DB connectivity issue

2009-07-30 Thread Dheeraj Gambhir

My bad Chuck, sorry for posting two problem at one go.

Ruby/Oracle connectivity thing is working fine for me now.

The only limitation pending is:

On Login page, when we submit the form without entering
confirm password value, it gives pop-up message i.e Confirm
Password- Entry Required., same is the case with other validations.

My requirement is to pick that pop-up message text.

Is it possible?

Please help if you can.


On Jul 22, 9:44 pm, Chuck van der Linden sqa...@gmail.com wrote:
 Firstly, please do not ask two questions that are not related in a
 single thread.  This is no different than asking a new unrelated
 question in an existing thread.  it makes things much too confusing
 for everyone, and harder for anyone coming here and searching for
 answers to find what they need.

 You already have a thread about connecting to oracle, seek the answer
 to that issue there instead of starting a duplicate thread on the same
 subject which just fragments things and again makes it harder for
 everyone.

 Secondly with regard to dealing with popups, did you read this
 instruction?
 1. Before you ask anything, please search in the group at first, you
 maygetgreat answers, that would save your time a lot.

  how to deal with Pop-ups (responding to them, verifying the happened,
 etc) is a topic that has been discussed at length in both the wiki/
 tutorials  and also in very recent subject threads here in the group.
 It is one of the MOST COMMON TOPICS discussed here.  So, 'The Answer
 You Seek' (tm) is likely already here and you could have had it
 already without having to wait (perhaps for someone in another
 timezone who is currently sleeping when you post your message, who is
 more than likely going to refer you to the existing thread that you
 could have found yourself with just a little work on your part.)

 Don't keep posting the same thing over and over and over..  it won'tgetyou an 
 answer any sooner.  If there was someone awake and able/
 inclined to respond to your original posting they would have done so.
 Posting again in an hour or two just means more stuff for people to
 wade through.  Furthermore it's the kind of behavior that can cause
 other folks to 'flip the twit bit' on you and write you off as some
 kind of impatient idiot.

 SO, if you have searched, and read the tutorials, and tried the things
 there, then please, Tell us what you've tried and what the results
 were..  otherwise we're going to assume you've not even tried
 searching, or will end up suggesting a lot of things you may have
 already tried which wastes your and our time.

 Nobody is paid to respond here.. we all do it on our own time, and
 after a while of answering the same questions over and over many folks
 rapidlygetto a point where they are dis-inclined to help someone who
 shows no signs of having tried to find the answer themselves, or solve
 the problem themselves, or at the very least having done some basic
 searches of the messages here in the group to see if their issue has
 been covered before.   People here are very willing to assist others
 who are trying hard but simply stuck at some point.  OTOH if you
 appear to be someone who needs extensive hand-holding, has not even
 tried to solve the issue themselves, are asking for us to basically
 tell you how to do your job, or in short seem to have a preference for
 using others brains instead of their own, then you may find yourself
 largely ignored, or at most referred to existing threads or materials
 on the subject.

 On Jul 22, 6:40 am, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:

  FYI,

  Attached is the screen shot ofpop-up.

  Thanks
  D G

  On Wed, Jul 22, 2009 at 7:08 PM, Dheeraj Gambhir 

  checktestingthi...@gmail.com wrote:
   Guys,

   I want it badly, so please help me out if there is any scope.

   First Problem: On Login page, when we submit the form without entering
   confirm password value, it givespop-upmessage i.e Confirm
   Password- Entry Required., same is the case with other validations.

   My requirement is to pick thatpop-upmessagetext.

   Is it possible?

   Second Problem: Oracle/Ruby connectivity

   I am using: Ruby 1.8.6 26
   Watir 1.4.1
   Windows XP
   Auto it V3
   ruby-oci8-1.0.6-x86-mswin32-60.gem

   My code is:

   require 'oci8'
   OCI8.new(mlbread, mlbread, test).exec('select * from
   bam_order.ec_invoice where order_id = 139920') do |r|
   puts r.join(',')
   end

   My TNS Entry is:
   test=
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
      )
      (CONNECT_DATA =
        (SID = mlbd)
        (SERVER = DEDICATED)
      )
    )

   Here i am getting:
   c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
   Initialization
   Error (OCIError)
          from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52

   Really tired of searching a solution for both :(
   Please help me out.

   Regards
   Dheeraj Gambhir

   login 

[wtr-general] Re: Getting text between two br / tags

2009-07-30 Thread Aaron MacDonald

Thank you.  I'm now using this regular expression:

a .*\/abr\/\s*.*\s+br\/\s+a .*\/a\s+br\/\s+(.*)\s+br\/

This matches the first two links, the text between the first two links, the
text I'm after, and the br / tag after it.  One note though: it seems
Watir takes out the forward slashes in the br / tags.  My real code uses
br in place of br/.

- Aaron

-Original Message-
From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of Mark Anderson
Sent: July 29, 2009 6:11 PM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: Getting text between two br / tags

Here's how I would do it with a regular expression:

$ie.html =~ /br\/\s*(.*)\s*br\/\s*Updated/
puts $1

That doesn't pull the tab before 'Text', and assumes that 'Updated' only
appears once in the html.  I don't guarantee that this regexp will work with
any text other than what you provided above, where it returns Text I want
to extract. in $1 and spits it out to the screen.

Hope this gives you a starting place.
/\/\ark




--~--~-~--~~~---~--~~
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: Pick pop-up text and oracle DB connectivity issue

2009-07-30 Thread Felipe Knorr Kuhn
Hello Dheeraj,

I defined the function in the end of this message to click on button
txtButton when the alert has text equal to txtWindow

You call it with:

@main.button(:name, CONFIRM).click_no_wait
clica_window_BUTTON Are you sure do you want to confirm?, OK
@ie.waitForIE

The code that really matters to you is @text =
@autoit.ControlGetText(@windowCaption, , Static2)

Then you compare the @text string against what you want
(@text.include?(Username required) for example)

PS: Do you mind sharing what you've done to get Oracle working?

Hope that helps,

FK

--


CODE:

#Encoding
$KCODE = u
WIN32OLE.codepage = WIN32OLE::CP_UTF8

require 'iconv'

def converte str
  Iconv.conv('CP1252', 'UTF-8', str)
end

# Click the button in the window with said text
def click_window_button txtWindow, txtButton
  # Find out IE version
  reg_val = ''
  key = 'Software\Microsoft\Internet Explorer'
  Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
reg_typ, reg_val = reg.read('Version')
  end

  @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.')
  @autoit = WIN32OLE.new('AutoItX3.Control')

  if (@ie_ver == 7)
@windowCaption = Windows Internet Explorer
  else
@windowCaption = Microsoft Internet Explorer
  end

  # Wait for the popup
  loop do
sleep(5)
@text = @autoit.ControlGetText(@windowCaption, , Static2)
if (@text != nil)
  @text = converte(@text)
  puts [INFO   + Time.now.strftime(%H:%M:%S) + ] Text found:  +
@text
end
if (@text == txtWindow)
  puts [INFO   + Time.now.strftime(%H:%M:%S) + ] Clicking button -
 + txtWindow
  @autoit.ControlClick(@windowCaption,'', txtButton)
  break
end
  end
 end

On Thu, Jul 30, 2009 at 9:47 AM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:


 My bad Chuck, sorry for posting two problem at one go.

 Ruby/Oracle connectivity thing is working fine for me now.

 The only limitation pending is:

 On Login page, when we submit the form without entering
 confirm password value, it gives pop-up message i.e Confirm
 Password- Entry Required., same is the case with other validations.

 My requirement is to pick that pop-up message text.

 Is it possible?

 Please help if you can.


 On Jul 22, 9:44 pm, Chuck van der Linden sqa...@gmail.com wrote:
  Firstly, please do not ask two questions that are not related in a
  single thread.  This is no different than asking a new unrelated
  question in an existing thread.  it makes things much too confusing
  for everyone, and harder for anyone coming here and searching for
  answers to find what they need.
 
  You already have a thread about connecting to oracle, seek the answer
  to that issue there instead of starting a duplicate thread on the same
  subject which just fragments things and again makes it harder for
  everyone.
 
  Secondly with regard to dealing with popups, did you read this
  instruction?
  1. Before you ask anything, please search in the group at first, you
  maygetgreat answers, that would save your time a lot.
 
   how to deal with Pop-ups (responding to them, verifying the happened,
  etc) is a topic that has been discussed at length in both the wiki/
  tutorials  and also in very recent subject threads here in the group.
  It is one of the MOST COMMON TOPICS discussed here.  So, 'The Answer
  You Seek' (tm) is likely already here and you could have had it
  already without having to wait (perhaps for someone in another
  timezone who is currently sleeping when you post your message, who is
  more than likely going to refer you to the existing thread that you
  could have found yourself with just a little work on your part.)
 
  Don't keep posting the same thing over and over and over..  it
 won'tgetyou an answer any sooner.  If there was someone awake and able/
  inclined to respond to your original posting they would have done so.
  Posting again in an hour or two just means more stuff for people to
  wade through.  Furthermore it's the kind of behavior that can cause
  other folks to 'flip the twit bit' on you and write you off as some
  kind of impatient idiot.
 
  SO, if you have searched, and read the tutorials, and tried the things
  there, then please, Tell us what you've tried and what the results
  were..  otherwise we're going to assume you've not even tried
  searching, or will end up suggesting a lot of things you may have
  already tried which wastes your and our time.
 
  Nobody is paid to respond here.. we all do it on our own time, and
  after a while of answering the same questions over and over many folks
  rapidlygetto a point where they are dis-inclined to help someone who
  shows no signs of having tried to find the answer themselves, or solve
  the problem themselves, or at the very least having done some basic
  searches of the messages here in the group to see if their issue has
  been covered before.   People here are very willing to assist others
  who are trying hard but simply stuck at some point.  OTOH if you

[wtr-general] Job Opportunity at Columbus, OH

2009-07-30 Thread lgeo...@everesttech.com

Hello listers,

One of my clients has a need for a QA resource (over all 5-8 years of
QA exp) plus 1-2 years in developing and testing frameworks in WATiR.
This is an immediate need and a long term contract. Please revert to
Leah at lgeo...@everesttech.com

Thanks
Leah
--~--~-~--~~~---~--~~
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: Ruby/Oracle connectivity

2009-07-30 Thread Marcus Simpson
Take Ruby out of the picture to make sure it is not your Oracle client.

Run sqlplus to ensure that you are connecting properly and the path is
well-defined.

On Wed, Jul 22, 2009 at 7:23 AM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 I have upgraded to 2.0.2 by using
 http://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem.
 and then:

 C:\rubygem install ruby-oci8-2.0.2-x86-mswin32-60.gem
 Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
 1 gem installed
 Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
 Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...

 but still it throws OCI Library Initialization
 Error (OCIError)

 Thnx
 D G


 On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dhiraj,

 As per your previous mail, you are having an older version of oci8 i.e
 1.0.6.Pls upgrade it to 2.0.2  try.

 Srinivas


 On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
 is installed properly.


 On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 It works for me :). Check the version of ruby-oci8 that you are using.
 My ruby-oci8 version is 2.0.2. May be its not installed properly. Just 
 check
 on irb by doing a require 'oci8'. If it returns true then its installed
 properly else its not.

 Srinivas.


 On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:


 No fruit, still the same issue. (attached is the shot for the same)

 Regards
 Dheeraj Gambhir


 On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi,
 Try the following :

 require 'oci8'
 OCI8.new(mlbread, mlbread, Test).exec('select * from
 bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end

 Srinivas


 On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', '
 172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT =
 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 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 testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something
 like this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some
 query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 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 testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar
 to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 

[wtr-general] how to convert my script to exe file

2009-07-30 Thread Alex.Dev

hello, all,
   I tried to convert my script to exe file, but always failed with
this error: rb_thread_status.
  Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  Watir: watir (1.5.6)
  Exerb: Exerb 4.7.0
Here is my code snippets:

require 'watir'

@ie = Watir::IE.start('http://www.google.com')

Regards,
lefish

--~--~-~--~~~---~--~~
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] api for ff 3.5?

2009-07-30 Thread aidy lewis

Hi,

Is there a windows firefox jssh.xpi for 3.5?

Aidy

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



[wtr-general] Help with class,method,objects

2009-07-30 Thread Rohan Ojha
Hi All,

 

I am not too sure whether I should post it here or in a Ruby forum.

 

But there is a problem that I am facing while scripting a data driven Watir
suite.

 

1)   I have a class (say the base class) wherein I am fetching data from
excel and storing them in a variable.

2)   Now there's a generic method in the application which is stored in
another Ruby file (not in a  class, not in a module)

3)   I need to call this generic method with the object of the base
class (since the object has the data allotted to the variables)

4)   But when I do this it says   undefined method `methodName' for
main:Object.

 

So can somebody help me with this? What can I do so that I can access the
methods and at the same time the data is set to variables for every row of
excel sheet.

 

Thanks in advance.

Thanks,
Rohan Ojha
 Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
6999 l *  mailto:rohan.o...@bsil.com rohan.o...@bsil.com
   http://www.bsil.com/ www.bsil.com - Where Partnerships Are Built on
Trust 

 


--~--~-~--~~~---~--~~
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 with class,method,objects

2009-07-30 Thread George

Are you using the Excel interface class from Watir's site?

http://wiki.openqa.org/display/WTR/Excel+interface+class


On Jul 29, 9:57 pm, Rohan Ojha rohan.o...@bsil.com wrote:
 Hi All,

 I am not too sure whether I should post it here or in a Ruby forum.

 But there is a problem that I am facing while scripting a data driven Watir
 suite.

 1)       I have a class (say the base class) wherein I am fetching data from
 excel and storing them in a variable.

 2)       Now there's a generic method in the application which is stored in
 another Ruby file (not in a  class, not in a module)

 3)       I need to call this generic method with the object of the base
 class (since the object has the data allotted to the variables)

 4)       But when I do this it says   undefined method `methodName' for
 main:Object.

 So can somebody help me with this? What can I do so that I can access the
 methods and at the same time the data is set to variables for every row of
 excel sheet.

 Thanks in advance.

 Thanks,
 Rohan Ojha
  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
 6999 l *  mailto:rohan.o...@bsil.com rohan.o...@bsil.com
    http://www.bsil.com/www.bsil.com- Where Partnerships Are Built on
 Trust
--~--~-~--~~~---~--~~
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 with class,method,objects

2009-07-30 Thread Rohan Ojha
Hi,

 

Yaa I am using the same but I have modified it for my usage.

 

What I do is :

 


class Tax_CheckMapping

def returnExcelData(file,range)

@range=range

@file=file

taxChkOpr=[]

excelObject=Excel.new

excelData=excelObject.getRowData(@file,'SCENARIOS-TESTDATA',@range)

incr_i=0

excelData.each do |oneRow|

  

  taxChkOpr[incr_i]=Tax_CheckOperation.new

  taxChkOpr[incr_i].setUserData(oneRow['Admin User
Name'].to_s,oneRow['Admin Password'].to_s )

  incr_i=incr_i+1

  

end

return taxChkOpr

  end

  

end

 

And in the second class I do the following operations :

 


class Tax_CheckOperation

 

attr_reader :adunme,:adpwd

 

def intialize



@adunme=

@adpwd=

end

 

def setUserData(adunme,adpwd)

@adunme=adunme

@adpwd=adpwd

end

 

def login(ie)

 login script

text_field.set(adunme)

text_field.set(adpwd)

end

 

end

 

 

Whearas in my script :

 


taxChkMapper=Tax_CheckMapping.new

taxChkOpr=taxChkMapper.returnExcelData(path of the excel file,'TC1')
TC1 is my identifier for test cases

 

taxChkOpr.each do |eachIns|

eachIns.login(ie)

end

 

So per say if my login method is not defined in the class Tax_CheckOperation
I wont be able to access my variables 'adunme' and 'adpwd'.

 

I have also used the ''send'' method as well but that's not being fruitful
either,

 

Hope now the things are clearer for you guys to help me. Since I am not
calling the method with the object of the class but instance of an array
object.

 

Thanks

Rohan Ojha

 

 

 

 

-Original Message-
From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com]
On Behalf Of George
Sent: Friday, July 31, 2009 8:39 AM
To: Watir General
Subject: [wtr-general] Re: Help with class,method,objects

 

 

Are you using the Excel interface class from Watir's site?

 

http://wiki.openqa.org/display/WTR/Excel+interface+class

 

 

On Jul 29, 9:57 pm, Rohan Ojha rohan.o...@bsil.com wrote:

 Hi All,

 

 I am not too sure whether I should post it here or in a Ruby forum.

 

 But there is a problem that I am facing while scripting a data driven
Watir

 suite.

 

 1)   I have a class (say the base class) wherein I am fetching data
from

 excel and storing them in a variable.

 

 2)   Now there's a generic method in the application which is stored
in

 another Ruby file (not in a  class, not in a module)

 

 3)   I need to call this generic method with the object of the base

 class (since the object has the data allotted to the variables)

 

 4)   But when I do this it says   undefined method `methodName' for

 main:Object.

 

 So can somebody help me with this? What can I do so that I can access the

 methods and at the same time the data is set to variables for every row of

 excel sheet.

 

 Thanks in advance.

 

 Thanks,

 Rohan Ojha

  Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688

 6999 l *  mailto:rohan.o...@bsil.com rohan.o...@bsil.com

http://www.bsil.com/www.bsil.com- Where Partnerships Are Built on

 Trust



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