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

2009-04-02 Thread Shweta

HI Tiffany

Thanks for your reply

 Still am getting error saying

error:  /nnn.rb:36: warning: parenthesize argument(s) for future
version
./nnn.rb:26: undefined local variable or method `dirrectory' for
main:Object (NameError)
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'

i have changed the code accordingly as your suggestion

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


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

   end
end


Actually am not understanding the basics of how to parameterize the
testcaes,In my application i have to parameterize for search option
where user should be able to search with different data like with
InspectionID,PolicyNumber,Status,Priority

Can you suggest with sample code how i can do this?
On Apr 2, 9:33 am, Tiffany Fodor tcfo...@comcast.net wrote:
 I just took another look at your code in your second post - you're
 using a global variable '$record' where you should be using 'record'.
 These are entirely different variables and the fact that they both
 have the text 'record' does not connect them in any way.

 The error in your first post of this thread is likely because you
 don't have a worksheet named 'Setup' in your excel spreadsheet.

 On Apr 1, 10:21 pm, Tiffany Fodor tcfo...@comcast.net wrote:



  Hi!

  Have you done any troubleshooting on what you have stored in $record?
  You might start by adding the following before the line that's causing
  the problem to make sure the value you're trying to set isn't nil.

  puts $record['PolicyNumber']

  Hope this helps!

  -Tiffany

  On Apr 1, 10:08 pm, Shweta nagman...@gmail.com wrote:

   Hi Jim

   Still am getting the same error at this line

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

   error:  ./SearchInspection.rb:39:in `searchinspections': undefined
   method `[]' for nil:NilClass (NoMethodError)

   On Apr 1, 8:21 pm, Jim Matthews jim_m...@swbell.net wrote:

Shweta,

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

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

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

Jim

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

 Hi

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

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

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

 and am calling in other test as

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

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

 Can anyone suggest whats wrong here

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

  Hi

  Am trying to parameterizing my test cases am getting some error,am 
  not
  understanding where 

[wtr-general] Re: Podcast with Bret on WatirCraft

2009-04-02 Thread Željko Filipin
On Thu, Apr 2, 2009 at 03:04, Alister Scott alister.sc...@gmail.com wrote:
 It's probably already recorded by now, but I am curious about what
 Bret thinks about including a data driver in WatirCraft, such as Roo.

I can actually read minds on April 1st every year, so I knew you would ask
that. I did not read your mind while the you and me were recording the
podcast, because it is easier to ask than to read mind (do not believe
anyone that tells you the opposite).

Ž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] Web page is not opening

2009-04-02 Thread Shweta

HI

I am trying to open this link http://wiki.rubygarden.org/Ruby/page/
show/ScriptingExcel, which i got from google  and which helps for
excel scripting.But its not opening showing HTTP404 error.

Can anyone suggest me is theer any basic excel scripting links
--~--~-~--~~~---~--~~
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 support third party controls?

2009-04-02 Thread Željko Filipin
On Thu, Apr 2, 2009 at 08:56, Newwatir shaikm.fi...@gmail.com wrote:
 Does Watir support third party controls (like Telerik contorls)?

An example would be handy right about now! (From:
http://www.exampler.com/blog/2007/08/07/marketing-mania-continues/)

Ž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: Dynamic Objects

2009-04-02 Thread jam

Hi Charley,

Oh really sorry for not explaining the problem clearly.

The application I am dealing here, is an Sharepoint build application
(internal).

Whatsoever, an application deployed in different environments may have
different IDs where the application generates specific part of ID
during the page load.

I suppose here, the application suffixes a particular value.

I fixed it.

Thanks,
Jam

On Apr 2, 1:37 am, Charley Baker charley.ba...@gmail.com wrote:
 Re-read your post. Do you find it useful? A hint of your html would be good
 and your ruby code. Why it changes from time to time would be helpful as
 well. I would assume you're a tester. Is this how you submit bug reports?
 I'm sorry to pick on you specifically, certainly not meant just for this
 post. Follow the guidelines and be good qa engineers.

 -c

 On Wed, Apr 1, 2009 at 2:20 PM, jam ruby.wa...@gmail.com wrote:

  Hi,

  I have a web application where the object property changes from time
  to time. Has anybody encountered this situation and Index should not
  be used. Please throw some light on 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] Which methods are being called at last of execution

2009-04-02 Thread Vikas Tulashyam

Hi Friends,

Can anyone please tell me that which methods are being called at the
end of the execution of Watir scripts.
I want to call my own method when the execution finishes and I don't
want to call the method explicitly. So please tell me.

Thanks
Vikas

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



[wtr-general] How to connect SQL server 2005 in Ruby when the DB name is as 172.11.22.5\thesql?

2009-04-02 Thread Wesley Chen
Hi, guys,
I meet a problem to connect to the SQL 2005 in ruby.

1. On local, there is a SQL 2005 server, it is:
*Server name:* 192.168.132.157
*User:* Wesley
*Password:* 11
I can connect it successfully by:
*db=SqlServer.new('192.168.132.157', 'Wesley', '11')*

But on INT server, it is SQL 2005 with:
*Server name:* 172.11.22.5\thesql
*User:* Wesley
*Password:* abc?de
I can't connect it successfully by:
*db=SqlServer.new('172.11.22.5\thesql', 'Wesley', 'abc?de')*
or
*db=SqlServer.new('172.11.22.5\\thesql', 'Wesley', 'abc?de')*


Really appreciated to any help and suggestion.

Thanks.
Wesley Chen.

--~--~-~--~~~---~--~~
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] SelectList behaves differently with 1.6.2?

2009-04-02 Thread Jarmo Pertman

Hello.

I've updated Watir from 1.5.6 to 1.6.2 and at least one test started
failing with suspicious problems.

First, I have this line:
$browser.select_list(:name, blah).select myvalue

This line fails, saying that value is not there. When I print html,
then value is not there indeed. When I do this process manually, then
I notice that after page has loaded, then value is not there
immediately, but it appears after little delay. It seems that
JavaScript is filtering values there or whatever the reason is.
Anyway, adding little wait_until, I managed to pass this problem.

So, my question is - Is click method changed (button will be clicked,
which redirects to page with this select list) - e.g. will Watir try
to select now faster than before, because it thinks that page is
loaded? This can't be also IE8 related, because my test passes fine
with watir 1.5.6.

Maybe all this problem is just happening because Watir 1.6.2 is
working so much faster? :)

Also, RDoc for Watir::SelectList seems to be outdated, it says that
there's options method, but actually there isn't. Also, getAllContents
method is not so much of Ruby way, any plans to rename it?

Jarmo
--~--~-~--~~~---~--~~
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: Dynamic Objects

2009-04-02 Thread sai

Sharepoint is a real pain. I had done some work in my previous place
automating sharepoint app. Check if a part of the object locator stays
constant and try using it as regex. That may help.

On Apr 2, 1:26 pm, jam ruby.wa...@gmail.com wrote:
 Hi Charley,

 Oh really sorry for not explaining the problem clearly.

 The application I am dealing here, is an Sharepoint build application
 (internal).

 Whatsoever, an application deployed in different environments may have
 different IDs where the application generates specific part of ID
 during the page load.

 I suppose here, the application suffixes a particular value.

 I fixed it.

 Thanks,
 Jam

 On Apr 2, 1:37 am, Charley Baker charley.ba...@gmail.com wrote:

  Re-read your post. Do you find it useful? A hint of your html would be good
  and your ruby code. Why it changes from time to time would be helpful as
  well. I would assume you're a tester. Is this how you submit bug reports?
  I'm sorry to pick on you specifically, certainly not meant just for this
  post. Follow the guidelines and be good qa engineers.

  -c

  On Wed, Apr 1, 2009 at 2:20 PM, jam ruby.wa...@gmail.com wrote:

   Hi,

   I have a web application where the object property changes from time
   to time. Has anybody encountered this situation and Index should not
   be used. Please throw some light on 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: Dynamic Objects

2009-04-02 Thread Tony

You could also check if the xpath is changing, most probably the xpath
for the element would not change...
hence you could use xpath to identify your elements

-Tony
--~--~-~--~~~---~--~~
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: Which methods are being called at last of execution

2009-04-02 Thread Vikas Tulashyam

Hi Thanks for the reply.

I want to call my method when ruby program exits, means execution is
finished.

Thanks
Vikas


Tony wrote:
 Hi Vikas,

 Could you tell me what you are looking for?
 You want to call methods when the ruby program exits or when your test
 cases finishes ?
 Could you be more specific.

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



[wtr-general] How can i see all the events for Fire_Event

2009-04-02 Thread Jonty

Hi,

I wanted to know what all events i can trigger in Fire_Event.
how can i see all the event in IRB. whats the command ??

thanks in advance,
Jonty

--~--~-~--~~~---~--~~
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: Which methods are being called at last of execution

2009-04-02 Thread sai

Check the kernel method at_exit. It may help you

On Apr 2, 2:48 pm, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi Thanks for the reply.

 I want to call my method when ruby program exits, means execution is
 finished.

 Thanks
 Vikas

 Tony wrote:
  Hi Vikas,

  Could you tell me what you are looking for?
  You want to call methods when the ruby program exits or when your test
  cases finishes ?
  Could you be more specific.

  -Tony
--~--~-~--~~~---~--~~
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: Which methods are being called at last of execution

2009-04-02 Thread Vikas Tulashyam

Hi Thanks for the help..I will try it.

On Apr 2, 3:13 pm, sai saidesertrose2...@gmail.com wrote:
 Check the kernel method at_exit. It may help you

 On Apr 2, 2:48 pm, Vikas Tulashyam vtulash...@gmail.com wrote:

  Hi Thanks for the reply.

  I want to call my method when ruby program exits, means execution is
  finished.

  Thanks
  Vikas

  Tony wrote:
   Hi Vikas,

   Could you tell me what you are looking for?
   You want to call methods when the ruby program exits or when your test
   cases finishes ?
   Could you be more specific.

   -Tony
--~--~-~--~~~---~--~~
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] undefined method `button' for #Array:0x3451bd8 (NoMethodError)

2009-04-02 Thread Shweta

Hi

Am using arrays in my script to test with multiple data,the scenario
is in my application i have a search page there i am able to search
with different criteria and there is a clear button to set the values
to default.I am using different files as a libraries and am calling
all there files in one mainfile.but am getting the error like this
undefined method `button' for #Array:0x3451bd8 (NoMethodError)
This code is from 3rd file where am clickiing on clear button to
cleaar the criteria but showing this error.can anyone suggest me what
might be wrong here.


def SearchInspections_withInsuredname()
   $ie.button(:name, clearCriteriaBtn).click#Error occured here
   searches = [ name1, GA_Test_AS_TF0220, name2,name3]
   searches.each do |search|
   $ie.text_field(:name, insuredName).set(search)
   $ie.button(:name, submitBtn).click
   $ie.link(:href, http://inspectionSearchInit.do;).click
   end
end


--~--~-~--~~~---~--~~
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 connect SQL server 2005 in Ruby when the DB name is as 172.11.22.5\thesql?

2009-04-02 Thread Татьяна Запольская
Hi Wesley Chen,

The second variant is right:
*db=SqlServer.new('**172.11.22.5\\thesql**', 'Wesley', '*abc?de*')*

But the problem can be with password, try the following:
*db=SqlServer.new('**172.11.22.5\\thesql**', 'Wesley', '**abc\?de**')*


PS: The problem can be also inside the *SqlServer class*

Best Regards,
Tanya Zapolskaya
2009/4/2 Wesley Chen cjq@gmail.com

 Hi, guys,
 I meet a problem to connect to the SQL 2005 in ruby.

 1. On local, there is a SQL 2005 server, it is:
 *Server name:* 192.168.132.157
 *User:* Wesley
 *Password:* 11
 I can connect it successfully by:
 *db=SqlServer.new('192.168.132.157', 'Wesley', '11')*

 But on INT server, it is SQL 2005 with:
 *Server name:* 172.11.22.5\thesql
 *User:* Wesley
 *Password:* abc?de
 I can't connect it successfully by:
 *db=SqlServer.new('172.11.22.5\thesql', 'Wesley', 'abc?de')*
 or
 *db=SqlServer.new('172.11.22.5\\thesql', 'Wesley', 'abc?de')*


 Really appreciated to any help and suggestion.

 Thanks.
 Wesley Chen.

 


--~--~-~--~~~---~--~~
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: SelectList behaves differently with 1.6.2?

2009-04-02 Thread bwaybandit

this works in 1.6.2

you might want to use wait_until and make sure your object shows up
before you use select

On Apr 2, 4:38 am, Jarmo Pertman jarm...@gmail.com wrote:
 Hello.

 I've updated Watir from 1.5.6 to 1.6.2 and at least one test started
 failing with suspicious problems.

 First, I have this line:
 $browser.select_list(:name, blah).select myvalue

 This line fails, saying that value is not there. When I print html,
 then value is not there indeed. When I do this process manually, then
 I notice that after page has loaded, then value is not there
 immediately, but it appears after little delay. It seems that
 JavaScript is filtering values there or whatever the reason is.
 Anyway, adding little wait_until, I managed to pass this problem.

 So, my question is - Is click method changed (button will be clicked,
 which redirects to page with this select list) - e.g. will Watir try
 to select now faster than before, because it thinks that page is
 loaded? This can't be also IE8 related, because my test passes fine
 with watir 1.5.6.

 Maybe all this problem is just happening because Watir 1.6.2 is
 working so much faster? :)

 Also, RDoc for Watir::SelectList seems to be outdated, it says that
 there's options method, but actually there isn't. Also, getAllContents
 method is not so much of Ruby way, any plans to rename it?

 Jarmo
--~--~-~--~~~---~--~~
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: undefined method `button' for #Array:0x3451bd8 (NoMethodError)

2009-04-02 Thread bwaybandit

have u tried printing out what is in you array right before that
statement executes to make sure you have a valid value?

On Apr 2, 7:24 am, Shweta nagman...@gmail.com wrote:
 Hi

 Am using arrays in my script to test with multiple data,the scenario
 is in my application i have a search page there i am able to search
 with different criteria and there is a clear button to set the values
 to default.I am using different files as a libraries and am calling
 all there files in one mainfile.but am getting the error like this
 undefined method `button' for #Array:0x3451bd8 (NoMethodError)
 This code is from 3rd file where am clickiing on clear button to
 cleaar the criteria but showing this error.can anyone suggest me what
 might be wrong here.

 def SearchInspections_withInsuredname()
    $ie.button(:name, clearCriteriaBtn).click    #Error occured here
    searches = [ name1, GA_Test_AS_TF0220, name2,name3]
    searches.each do |search|
    $ie.text_field(:name, insuredName).set(search)
    $ie.button(:name, submitBtn).click
    $ie.link(:href, http://inspectionSearchInit.do;).click
    end
 end
--~--~-~--~~~---~--~~
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 can i see all the events for Fire_Event

2009-04-02 Thread bwaybandit

that you cannot get from IRB.

you will have to know what events that are tied to the particular
object you are working with.
if you are working with a javascript object for example, look at the
code or ask the developer
whose code you are testing what events are tied to the object.

On Apr 2, 5:55 am, Jonty satish.jan...@gmail.com wrote:
 Hi,

 I wanted to know what all events i can trigger in Fire_Event.
 how can i see all the event in IRB. whats the command ??

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



[wtr-general] How do you find find frames.

2009-04-02 Thread jason


I have looked and looked through the docs and I simply cannot find an
answer to this.

after calling

doc = firefox.goto(some_url)

I would like know what frames I have on the rendered page, i.e.

frames = doc.frames  #of cource this does not work, but I would expect
an array of frame objects with their attributes returned.

how do I do this?

The only thing I found is doc.show_frames which is not exactly what I
need.

Thanks for any help on this.



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



[wtr-general] Re: How do you find find frames.

2009-04-02 Thread Wesley Chen
You may try:
ff.show_frames

Thanks.
Wesley Chen.


On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.comwrote:



 I have looked and looked through the docs and I simply cannot find an
 answer to this.

 after calling

 doc = firefox.goto(some_url)

 I would like know what frames I have on the rendered page, i.e.

 frames = doc.frames  #of cource this does not work, but I would expect
 an array of frame objects with their attributes returned.

 how do I do this?

 The only thing I found is doc.show_frames which is not exactly what I
 need.

 Thanks for any help on this.



 


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



[wtr-general] reflecting a frame looses the main document contents

2009-04-02 Thread jason


So yet another strange thing, that I might be misunderstanding,
After I query a frame for somthing, it like only this frame is
relevant for any queries untill I address another frame.
i.e.

document = ff.got_to(some_url)

document.links  #great give me the
links on the page
document.frame(:index, 1).links#great gives me the links in
the first frame
document.links  #OOPS now I get the
links from the first frame again

This is all fine - but I can't see how I get back to the main document
contents.

This does not work obvioulsy.
document.frame(:index, 0).links
This would be logical
document.root.links

So does anyone know how I address the main the document again?

thanks - feedback appreciated.



--~--~-~--~~~---~--~~
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 do you find find frames.

2009-04-02 Thread jason

Thanks - I know this.

The method is not helpful because it uses puts to output the frame
information.
The thing is - I don't need to see them - I want my program to
automatically review them. i.e. getting links and buttons etc.




On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote:
 You may try:
 ff.show_frames

 Thanks.
 Wesley Chen.

 On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.comwrote:



  I have looked and looked through the docs and I simply cannot find an
  answer to this.

  after calling

  doc = firefox.goto(some_url)

  I would like know what frames I have on the rendered page, i.e.

  frames = doc.frames  #of cource this does not work, but I would expect
  an array of frame objects with their attributes returned.

  how do I do this?

  The only thing I found is doc.show_frames which is not exactly what I
  need.

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



[wtr-general] autoit and CI

2009-04-02 Thread aidy lewis

Hi,

Is anyone having any problems running autoit through CI? I am using
interactive mode.

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] Re: How do you find find frames.

2009-04-02 Thread Paul Rogers
his doesnt answer your question, may be relevant;-)
Some time back I was using firefox/firewatir to try and figure out if a page
had frames, and if it did how many etc. It proved surprisingly difficult, I
think because sometimes ( I cant remember what/how/why) firefox ( or
firewatir ) would give me a chrome url, presumably this was something like
frame 0 or the main browser. I dont remember if this ever got resolved to my
satisfaction, or if I worked round it somehow.

I would offer you my code, but firewatir has changed significantly since I
did this, and probably wont help you

Paul

On Thu, Apr 2, 2009 at 9:25 AM, jason jason.franklin.sto...@gmail.comwrote:


 Thanks - I know this.

 The method is not helpful because it uses puts to output the frame
 information.
 The thing is - I don't need to see them - I want my program to
 automatically review them. i.e. getting links and buttons etc.




 On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote:
  You may try:
  ff.show_frames
 
  Thanks.
  Wesley Chen.
 
  On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.com
 wrote:
 
 
 
   I have looked and looked through the docs and I simply cannot find an
   answer to this.
 
   after calling
 
   doc = firefox.goto(some_url)
 
   I would like know what frames I have on the rendered page, i.e.
 
   frames = doc.frames  #of cource this does not work, but I would expect
   an array of frame objects with their attributes returned.
 
   how do I do this?
 
   The only thing I found is doc.show_frames which is not exactly what I
   need.
 
   Thanks for any help on this.
 


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



[wtr-general] Re: Problems recognizing MS Reporting Services reports

2009-04-02 Thread Steve

I'm still looking into this.  There's a mistake in my first post,
however.  The results that Reporting Services returns are apparently
NOT in HTML.  That is, if you run a report, get the results, and then
do a View Source, the source code you see does not contains the report
results at all.  It only contains the user input section.  For the
moment, I don't know how the results are being displayed.
--~--~-~--~~~---~--~~
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 capture unique session ID from URL

2009-04-02 Thread marekj
Try URI::HTTP class.
if you have url http://hostname/path/to/file?key=valukey2=value42;
then
require 'uri'
uri = URI.parse ie.url

gives you an uri object that conforms to HTTP protocol, so

url.query.split('') # = array of queryitems =['key=value', 'key2=value42']


you can then reconstruct the uri object with whatever you want and pass it
back to watir as
so if you have session = jsessionid=AbraCadA43BraSalthUnd42Pepper you can
add it to existing query
url.query = (queryitems.concat session).join('')
and click it.
uri.to_s # becuse you click text and not object
you end up with this url


http://hostname/path/to/file?key=valukey2=value42jsessionid=AbraCadA43BraSalthUnd42Pepper


Do more homework here
http://www.ruby-doc.org/core/classes/URI/HTTP.html



marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/



On Tue, Mar 31, 2009 at 12:03 AM, vasu br.vas...@gmail.com wrote:


 Dear All,

 Iam using datadriven framework, and used href to click on a link. It
 was working fine. Now for security reason unique session ID was also
 generated and same was updated to the href for each login session.

 Please let me know how to capture the sessionID from URL and update
 the same in XLS.

 My script is like this:


ie.link(:href, record4['url']).click
ie.textField(:name, targetnumber).set(record4['targetnumber'])

 Previous url was like this: https://abcd.com/test.in?cmd=p2p

 now it is like this :
 https://abcd.com/test.in;jsessionid=JRvbP1CyCY5tMd153lZJ9mzp5Rv7tNWQ4n232VL1GZFT1sppsTQ5!878380993https://abcd.com/test.in;jsessionid=JRvbP1CyCY5tMd153lZJ9mzp5Rv7tNWQ4n232VL1GZFT1sppsTQ5%21878380993

 I want to capture the jsessionid generated.

 Please help me it is very urgent

 thanks,
 vasu
 


--~--~-~--~~~---~--~~
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: reflecting a frame looses the main document contents

2009-04-02 Thread jason

just for documentations sake - here is the solution that I am now
using.

add the following to firefox.rb
or better monkeypatch it.

   def root
  set_browser_document
end


now you can locate a frame and get it contents and then switch back to
the main document with

ff.root



On Apr 2, 5:21 pm, jason jason.franklin.sto...@gmail.com wrote:
 So yet another strange thing, that I might be misunderstanding,
 After I query a frame for somthing, it like only this frame is
 relevant for any queries untill I address another frame.
 i.e.

 document = ff.got_to(some_url)

 document.links                                  #great give me the
 links on the page
 document.frame(:index, 1).links        #great gives me the links in
 the first frame
 document.links                                  #OOPS now I get the
 links from the first frame again

 This is all fine - but I can't see how I get back to the main document
 contents.

 This does not work obvioulsy.
 document.frame(:index, 0).links
 This would be logical
 document.root.links

 So does anyone know how I address the main the document again?

 thanks - feedback appreciated.
--~--~-~--~~~---~--~~
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 do you find find frames.

2009-04-02 Thread jason

I descided to add the method get_frames and refactor show_frames in
the firefox.rb file as follows:
now i can call get_frames and recieve the frames in an array with
their attributes.

BTW if you do this you wont be able to get back to the root document
unless you also add the methods root to the firefox.rb file as well -
see below.

def root
  set_browser_document
end

def get_frames
  jssh_request_frames
end

def show_frames
  frames = jssh_request_frames

  puts There are #{frames.size} frames

  frames.each_index do |index|
puts frame: name: #{frames[index].name}
puts   index: #{index+1}
  end
end
alias showFrames show_frames

def jssh_request_frames
  jssh_command = var frameset = #{WINDOW_VAR}.frames;
var elements_frames = new Array();
for(var i = 0; i  frameset.length; i++)
{
var frames = frameset[i].frames;
for(var j = 0; j  frames.length; j++)
{
elements_frames.push(frames
[j].frameElement);
}
}
elements_frames.length;

  jssh_command.gsub!(\n, )
  $jssh_socket.send(#{jssh_command};\n, 0)
  length = read_socket().to_i

  frames = Array.new(length)
  for i in 0..length - 1 do
frames[i] = Frame.new(self, :jssh_name, elements_frames[#
{i}])
  end
  frames
end


On Apr 2, 5:32 pm, Paul Rogers paul.rog...@shaw.ca wrote:
 his doesnt answer your question, may be relevant;-)
 Some time back I was using firefox/firewatir to try and figure out if a page
 had frames, and if it did how many etc. It proved surprisingly difficult, I
 think because sometimes ( I cant remember what/how/why) firefox ( or
 firewatir ) would give me a chrome url, presumably this was something like
 frame 0 or the main browser. I dont remember if this ever got resolved to my
 satisfaction, or if I worked round it somehow.

 I would offer you my code, but firewatir has changed significantly since I
 did this, and probably wont help you

 Paul

 On Thu, Apr 2, 2009 at 9:25 AM, jason jason.franklin.sto...@gmail.comwrote:



  Thanks - I know this.

  The method is not helpful because it uses puts to output the frame
  information.
  The thing is - I don't need to see them - I want my program to
  automatically review them. i.e. getting links and buttons etc.

  On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote:
   You may try:
   ff.show_frames

   Thanks.
   Wesley Chen.

   On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.com
  wrote:

I have looked and looked through the docs and I simply cannot find an
answer to this.

after calling

doc = firefox.goto(some_url)

I would like know what frames I have on the rendered page, i.e.

frames = doc.frames  #of cource this does not work, but I would expect
an array of frame objects with their attributes returned.

how do I do this?

The only thing I found is doc.show_frames which is not exactly what I
need.

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



[wtr-general] Re: Performance Testing

2009-04-02 Thread Lisa Crispin
We have done a baseline with JMeter, we like the tool, but we used BadBoy to
create the scripts (and it was a fairly rudimentary test). I was just
wondering the other day if it's possible to incorporate Watir scripts with
some perf/load test tool. I heard BrowserMob can use Selenium scripts.
-- Lisa

On Thu, Apr 2, 2009 at 2:21 PM, Jason Shelton jas.shel...@hotmail.comwrote:

  All,

 I am writing to ask the group what tools you all are using for
 performance/load testing on your web apps.  Are you using Watir?  If so, how
 did you structure your tests to simulate multiple users?  Thanks in advance
 for all responses.

 - Shelton

 --
 Quick access to your favorite MSN content and Windows Live with Internet
 Explorer 8. Download FREE 
 now!http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
 



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://lisacrispin.com

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



[wtr-general] Re: How do you find find frames.

2009-04-02 Thread Charley Baker
Can you also add this as a jira ticket with this patch?


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


On Thu, Apr 2, 2009 at 1:11 PM, jason jason.franklin.sto...@gmail.comwrote:


 I descided to add the method get_frames and refactor show_frames in
 the firefox.rb file as follows:
 now i can call get_frames and recieve the frames in an array with
 their attributes.

 BTW if you do this you wont be able to get back to the root document
 unless you also add the methods root to the firefox.rb file as well -
 see below.

def root
  set_browser_document
end

def get_frames
  jssh_request_frames
end

def show_frames
  frames = jssh_request_frames

  puts There are #{frames.size} frames

  frames.each_index do |index|
puts frame: name: #{frames[index].name}
puts   index: #{index+1}
  end
end
alias showFrames show_frames

def jssh_request_frames
  jssh_command = var frameset = #{WINDOW_VAR}.frames;
var elements_frames = new Array();
for(var i = 0; i  frameset.length; i++)
{
var frames = frameset[i].frames;
for(var j = 0; j  frames.length; j++)
{
elements_frames.push(frames
 [j].frameElement);
}
}
elements_frames.length;

  jssh_command.gsub!(\n, )
  $jssh_socket.send(#{jssh_command};\n, 0)
  length = read_socket().to_i

  frames = Array.new(length)
  for i in 0..length - 1 do
frames[i] = Frame.new(self, :jssh_name, elements_frames[#
 {i}])
  end
  frames
end


 On Apr 2, 5:32 pm, Paul Rogers paul.rog...@shaw.ca wrote:
  his doesnt answer your question, may be relevant;-)
  Some time back I was using firefox/firewatir to try and figure out if a
 page
  had frames, and if it did how many etc. It proved surprisingly difficult,
 I
  think because sometimes ( I cant remember what/how/why) firefox ( or
  firewatir ) would give me a chrome url, presumably this was something
 like
  frame 0 or the main browser. I dont remember if this ever got resolved to
 my
  satisfaction, or if I worked round it somehow.
 
  I would offer you my code, but firewatir has changed significantly since
 I
  did this, and probably wont help you
 
  Paul
 
  On Thu, Apr 2, 2009 at 9:25 AM, jason jason.franklin.sto...@gmail.com
 wrote:
 
 
 
   Thanks - I know this.
 
   The method is not helpful because it uses puts to output the frame
   information.
   The thing is - I don't need to see them - I want my program to
   automatically review them. i.e. getting links and buttons etc.
 
   On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote:
You may try:
ff.show_frames
 
Thanks.
Wesley Chen.
 
On Thu, Apr 2, 2009 at 10:44 PM, jason 
 jason.franklin.sto...@gmail.com
   wrote:
 
 I have looked and looked through the docs and I simply cannot find
 an
 answer to this.
 
 after calling
 
 doc = firefox.goto(some_url)
 
 I would like know what frames I have on the rendered page, i.e.
 
 frames = doc.frames  #of cource this does not work, but I would
 expect
 an array of frame objects with their attributes returned.
 
 how do I do this?
 
 The only thing I found is doc.show_frames which is not exactly what
 I
 need.
 
 Thanks for any help on this.
 


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



[wtr-general] Checking form controls/fields using a hash

2009-04-02 Thread George

Hello everyone,

I'm hoping this is the right forum for this question.  I'm trying to
iterate through a hash and check certain text fields on a webpage:

Here is where I'm storing my controls:

controls.rb # stores the form control variables
===
def tf_company_name
  $tf_company_name = $ie.text_field(:id, CompanyName)
end

def tf_address
  $tf_address = $ie.text_field(:id, StreetAddress)
end

def tf_city
  $tf_city = $ie.text_field(:id, City)
end

Here is where I'm defining the iteration:

form_checks.rb # Check form controls
===
def check_contact_form_controls
  contact_controls = [tf_company_name = Company Name,
  tf_address = Address,
  tf_city = City]
  contact_controls.each do |key, value|
if key.exists?
  puts PASS: Control #{value} exists.
  else
puts FAIL: Unable to locate control #{value}
  end
  end
end


Since hashes does not have an exists? method, I get an error.  Is
there a better way to do this?

Thanks,

George




--~--~-~--~~~---~--~~
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: undefined method `button' for #Array:0x3451bd8 (NoMethodError)

2009-04-02 Thread Bret Pettichord

Shweta/Nagmani,

You are asking a lot of questions here, and you are often not giving us 
the code we would need to answer your questions.

It seems like you have built a framework that is too complicated for you 
to debug. This would mean that you either need to ramp up your Ruby 
skills fast or simplify your framework.

Have you considered getting some Ruby training?

Bret

Shweta wrote:
 Hi

 Am using arrays in my script to test with multiple data,the scenario
 is in my application i have a search page there i am able to search
 with different criteria and there is a clear button to set the values
 to default.I am using different files as a libraries and am calling
 all there files in one mainfile.but am getting the error like this
 undefined method `button' for #Array:0x3451bd8 (NoMethodError)
 This code is from 3rd file where am clickiing on clear button to
 cleaar the criteria but showing this error.can anyone suggest me what
 might be wrong here.


 def SearchInspections_withInsuredname()
$ie.button(:name, clearCriteriaBtn).click#Error occured here
searches = [ name1, GA_Test_AS_TF0220, name2,name3]
searches.each do |search|
$ie.text_field(:name, insuredName).set(search)
$ie.button(:name, submitBtn).click
$ie.link(:href, http://inspectionSearchInit.do;).click
end
 end


 
   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: Load Error while running feature in cucumber (watir/cucumber)

2009-04-02 Thread Bret Pettichord

Doesn't look like a Watir bug.

pallavi shashidhar wrote:
 Hi,

 I have ruby 1.8.6 and watir 1.6.2 installed in my system .
 I have installed cucumber 0.2 and have watir scripts in feature/steps
 when i try to run the feature, i constantly get the following error

 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
 `gem_original_require': no such file to load -- spec (LoadError)
 Failed to load ./steps/env.rb   from 
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
 `polyglot_original_require'
 from 
 c:/ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in 
 `require'

 tried looking up for solutions but in vain. Any idea what could be the 
 cause?


 Regards,
 Pallavi

 


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


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



[wtr-general] How to know if the checkbox is checked or not?

2009-04-02 Thread satish

I have a checkbox, I have to perform check every time whether it is
checked or not.
Can some one help me with code.

Thank you,
Satish.

--~--~-~--~~~---~--~~
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] verify url vs element on the page

2009-04-02 Thread Tester78

I am really new to watir and need some help on how to go about testing
this case. I am trying to test a next button on a page.   If I am on
the homepage(http://example.com/1.aspx.com) and click the next button,
I am taken to the next page with the url(http://example.com/
2.aspx.com). If I hit next again the ending url changes to 3.aspx and
so on.

I inspected the next button on the home page with firebug and this is
what I have:
a class=next title=Next Page href=2.aspx
Next »
span/
/a

So I can see that the button is pointing to 2.aspx. Is there a way to
make watir click on that next button and verify that the url is
changed to 2.aspx? This is probably easy for you guys but I am really
new.

Please let me know if you need me to be more specific. Thanks

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



[wtr-general] Re: How to know if the checkbox is checked or not?

2009-04-02 Thread Wesley Chen
You may try
ie.checkbox( ).isSet?

Thanks.
Wesley Chen.


On Fri, Apr 3, 2009 at 1:03 AM, satish spanchumar...@gmail.com wrote:


 I have a checkbox, I have to perform check every time whether it is
 checked or not.
 Can some one help me with code.

 Thank you,
 Satish.

 


--~--~-~--~~~---~--~~
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: Checking form controls/fields using a hash

2009-04-02 Thread George

Thanks, Paul!

For those who are interested, this part of the code worked for me:

contact_controls.each do |key, value|
if contact_controls.has_key?(key)
  puts PASS: Control #{value} exists.
  else
puts FAIL: Unable to locate control #{value}
  end
end

I thought I should ask, just to make certain: With the code I'm
presenting above, does this actually check the existence of the form
control, or is it merely checking that a value exists in the hash?


On Apr 2, 2:40 pm, Paul Rogers paul.rog...@shaw.ca wrote:
 hash has a has_key? method

 Paul

 On Thu, Apr 2, 2009 at 3:30 PM, George george.sand...@gmail.com wrote:

  Hello everyone,

  I'm hoping this is the right forum for this question.  I'm trying to
  iterate through a hash and check certain text fields on a webpage:

  Here is where I'm storing my controls:

  controls.rb # stores the form control variables
  ===
  def tf_company_name
   $tf_company_name = $ie.text_field(:id, CompanyName)
  end

  def tf_address
   $tf_address = $ie.text_field(:id, StreetAddress)
  end

  def tf_city
   $tf_city = $ie.text_field(:id, City)
  end

  Here is where I'm defining the iteration:

  form_checks.rb # Check form controls
  ===
  def check_contact_form_controls
   contact_controls = [tf_company_name = Company Name,
                               tf_address = Address,
                               tf_city = City]
   contact_controls.each do |key, value|
     if key.exists?
       puts PASS: Control #{value} exists.
       else
         puts FAIL: Unable to locate control #{value}
       end
   end
  end

  Since hashes does not have an exists? method, I get an error.  Is
  there a better way to do this?

  Thanks,

  George
--~--~-~--~~~---~--~~
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 know if the checkbox is checked or not?

2009-04-02 Thread George

You can also use there:

ie.checkbox.enabled?
ie.checkbox.disabled?
ie.checkbox.blank?

As a beginner, I love the flexibility and forgiveness of writing
code...


On Apr 2, 5:53 pm, Wesley Chen cjq@gmail.com wrote:
 You may try
 ie.checkbox( ).isSet?

 Thanks.
 Wesley Chen.

 On Fri, Apr 3, 2009 at 1:03 AM, satish spanchumar...@gmail.com wrote:

  I have a checkbox, I have to perform check every time whether it is
  checked or not.
  Can some one help me with code.

  Thank you,
  Satish.
--~--~-~--~~~---~--~~
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: Performance Testing

2009-04-02 Thread Chuck van der Linden

On Apr 2, 2:01 pm, Paul Rogers paul.rog...@shaw.ca wrote:
 most load tools do direct http posts/gets/put requests. jmeter does this
 using a java library, to get the high levels of virtual users.
 Browsermob uses amazon cloud running ms windows 2003 server and a real
 browser.

Paul is absolutely right in this regard.  This is because the overhead
of rendering and running client side code means if you use anything
remotely resembling a 'real browser' it won't scale well, and you will
need a small fleet of systems to generate the load.

It's also un-necessary.  some vendors who don't support protocol level
load will try to justify their tool as being 'more realistic' which I
say is utter one-hundred percent hogwash.  The server has NO idea who
is sending those packets, and it can't tell IE or Firefox from a good
tool claiming to be IE or Firefox.. the 'realism' is all in the mind
of the salesman because the web server hasn't a clue.


 Ive think the best way of doing load tests is to use jmeter or other tool.
 You may be able to record a script via the jmeter proxy when watir is
 running. I can see a lot of advantages to this, but it takes a lot of hand
 editing to go and make the recorded jmeter script usable for more than one
 user.

 Ive found load testing to be a particulary difficult thing todo. Mostly
 because of the question what are we trying to do here? - find out what bit
 breaks first? Find out how many users we can support before we need a new
 bit of hardware? Find out what the slowest operastion is? Find out how to
 make the slowest operation better? There is a book that Scott Barber was a
 coauthor of, that is available as a free pdf that is good reading.

I agree 100% Paul.  load testing and perf testing is some of the more
'scientific' testing you can do, it requires close attention to
detail, tight control over variables, tests that are highly
reproducable, and as you point out you have to start out by asking the
right question.  A loadtest is basically an experiment, and like any
experiment it's only going to be as successful as the hypothesis it's
trying to prove or disprove.  If you don't know the question you are
trying to ask, you're not likely to design loadtest that will give you
results you can use.

As for myself, I've used both loadrunner (really good but really
expensive) and Microsoft's Visual Studio Team System2008 (both the
test edition and team suite versions have a HTTP level web-test
and loadtest capability)  I found in my work that it scales well and
blows loadrunner away in terms of bang for the buck.  I've used it
with just a single machine as the load generator (also running the
controller as wel) and brought both webservers and db servers to their
virtual knees and had they crying uncle!  There's also an excellent
MSDN forum with some of the main pm's etc providing advice and
support, and a small collection of videos and such.

The downside is that it does all the SUT monitoring via WMI
(Microsoft's implementation of WBEM) which works fabulous on windows
servers, but because the *nix community never implemented WBEM (a
multi vendor DMTF standard) there's no performance monitoring daemon
that allows you to connect to the machine using WBEM, and hence you
can't monitor the performance of non windows servers, and without good
(really good) data on how the systems are being affected by the load,
corrilated with what the scripts are doing, the loadtests are of much
less value.

Sorry but this is a bit of a soapbox for me. it's really ironic in a
way that the closed' windows OS, because MS implemented an open
standard is more accessable in terms of remote monitoring and
rathering of system information (out of the box without having to
installl anything, and merely configuring some accounts that are
allowed to access the data) than the supposedly 'open' os's which
never adopted that standdard and are thus a relative black hole in
terms of being able to remotely monitor performance counters

--Chuck
--~--~-~--~~~---~--~~
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: Load Error while running feature in cucumber (watir/cucumber)

2009-04-02 Thread Chuck van der Linden

I agree with brett, doesn't sound watir related.

do you have either require 'spec' or include 'spec' at the top of
your steps file, or some other file being reqired or included in the
steps file?

the error sounds like you've effectively told ruby i need 'spec' but
ruby can't find it.  so either you've not properly installed a gem
(like oh  maybe 'rspec'???) or the file you are meaning to include is
not anywhere on the path being searched by ruby.

in other words this is a basic ruby problem and not related to watir

On Apr 1, 10:58 pm, pallavi shashidhar pals.sha...@gmail.com wrote:
 Hi,

 I have ruby 1.8.6 and watir 1.6.2 installed in my system .
 I have installed cucumber 0.2 and have watir scripts in feature/steps
 when i try to run the feature, i constantly get the following error

 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `gem_original_require': no such file to load -- spec (LoadError)
 Failed to load ./steps/env.rb   from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `polyglot_original_require'
         from
 c:/ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
 `require'

 tried looking up for solutions but in vain. Any idea what could be the
 cause?

 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: Need to check and uncheck multiple options in a multi select checkbox

2009-04-02 Thread Chuck van der Linden

If you were to try searching the group (see the little button up there
called Search this group with the text entry box next to it?) using
the phrase checkbox selection you would likely find several threads
dealing with this.

  the short answer is clearall, then select the ones you want.   for
more details, please search first before asking, and when asking
specify what you've tried and what if any errors you are getting, and
also provide a sample of the HTML where the checkboxen are defined.

On Apr 1, 9:03 pm, aditi aditi_...@yahoo.com wrote:
 Hi,

 I want to check and uncheck multiple options in a multi select
 checkbox.Can anyone tell me how can I do it in Watir?
--~--~-~--~~~---~--~~
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: Dynamic Objects

2009-04-02 Thread Chuck van der Linden

Tony and Sai are pointing in the right direction here..

In cases like this you are faced with a challenge that will require
you to learn the dark art of regular expressions..  Generally the
format of the problem is like this

  checkbox (or other generic item)  nearby text that a human uses to
know if they want to check the box

The problem of course is that the checkbox ID is dynamic, as might be
it's location on the page (eg there are others above and below it)

Typically the solution involves extracting the id from the HTML by
constructing a reguar expression (sometimes using look-ahead or look-
behind) that keys on the part the human reads, and extracts the ID.

start by doing some web searches along the lines of reguar expression
tutorial   also look for something called (if my memory is not
faulty) regular expression designer or regex designer  which will
let you plunk in a sample of your HTML code and design the regular
expression and dynamically see what it returns.

--~--~-~--~~~---~--~~
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: Checking form controls/fields using a hash

2009-04-02 Thread Paul Rogers
I think ( i didnt look too hard ) that it will only see if the key is there,
this might be what you want

contact_controls.each do |k,v|
   if k.exists?
  puts its there
   else
 puts oh no
   end
end

Pau

On Thu, Apr 2, 2009 at 7:58 PM, George george.sand...@gmail.com wrote:


 Thanks, Paul!

 For those who are interested, this part of the code worked for me:

 contact_controls.each do |key, value|
 if contact_controls.has_key?(key)
   puts PASS: Control #{value} exists.
  else
puts FAIL: Unable to locate control #{value}
  end
end

 I thought I should ask, just to make certain: With the code I'm
 presenting above, does this actually check the existence of the form
 control, or is it merely checking that a value exists in the hash?


 On Apr 2, 2:40 pm, Paul Rogers paul.rog...@shaw.ca wrote:
  hash has a has_key? method
 
  Paul
 
  On Thu, Apr 2, 2009 at 3:30 PM, George george.sand...@gmail.com wrote:
 
   Hello everyone,
 
   I'm hoping this is the right forum for this question.  I'm trying to
   iterate through a hash and check certain text fields on a webpage:
 
   Here is where I'm storing my controls:
 
   controls.rb # stores the form control variables
   ===
   def tf_company_name
$tf_company_name = $ie.text_field(:id, CompanyName)
   end
 
   def tf_address
$tf_address = $ie.text_field(:id, StreetAddress)
   end
 
   def tf_city
$tf_city = $ie.text_field(:id, City)
   end
 
   Here is where I'm defining the iteration:
 
   form_checks.rb # Check form controls
   ===
   def check_contact_form_controls
contact_controls = [tf_company_name = Company Name,
tf_address = Address,
tf_city = City]
contact_controls.each do |key, value|
  if key.exists?
puts PASS: Control #{value} exists.
else
  puts FAIL: Unable to locate control #{value}
end
end
   end
 
   Since hashes does not have an exists? method, I get an error.  Is
   there a better way to do this?
 
   Thanks,
 
   George
 


--~--~-~--~~~---~--~~
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 handle popup confirm window in Ubuntu firefox3.0 with Firewatir-1.6.2

2009-04-02 Thread ajee

Hi Angrez,

Glad to see the reply on this topic, I know you are one of the
maintainers of firewatir. As far as I searched on internet, many guys
have the same problem on popup javascript window but not a clear
solution I saw.

Per your request, here is my ruby example code, I have removed some
unrelated stuff:
//-//
require 'rubygems'
require firewatir
include FireWatir

# set a variable
test_site = 10.10.10.1

# open the browser
ff = FireWatir::Firefox.start(test_site)

authpage = ff.frame(:name,authFrm)
authpage.text_field(:name, userName).value = admin
authpage.text_field(:name, pwd).value = password
authpage.button(:name, Submit).click

ff.wait
clientSettings = ff.frame(:name,tabFrame)
ff.wait
clientSettings.select_list(:name,Iface).select(X0)
clientSettings.text_field(:name, PPPStartIp).value = 192.168.168.1
clientSettings.text_field(:name, PPPEndIp).value = 192.168.168.100
ff.startClicker(ok,1,'',The configuration on this page will reset
all the active connections, are you sure to submit?)
clientSettings.button(:name,applyButt).click  # here a
javascript window popup and never disappear
ff.wait

puts End of test.
//-//

Here I have another problem, it seems that ff.wait can't always work,
so somethime script will complain no finding of html element and quit.


Thanks


On 3月23日, 下午2时31分, Angrez Singh ang...@gmail.com wrote:
 Can you make sure that pop up text is correct? Also can you post your
 ruby/html code here so that we can help you better.

 - Angrez

 On Mon, Mar 23, 2009 at 7:37 AM, ajee ajee@gmail.com wrote:

  Hi all, I have searched the Internet for a long time on this topic,
  but there is no resolve I got. I know that somebody raises advice of
  using startClicker, but when I use it, no use:

  ff.startClicker(ok,1,'',The configuration on this page will reset
  all connections, are you sure to submit?)

  In order to know why, I managed to compile jssh.xpi, to get into
  firefox 3.0, adding some debug msg. By this, I saw jssh gets the
  correct msg of startClicker from firewatir,  proxied_shell-
  ExecuteBuffer return NS_OK. So I don't  know how to go on, with this
  popup javascript confirm window, Firefox can't proceed.
--~--~-~--~~~---~--~~
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 handle popup confirm window in Ubuntu firefox3.0 with Firewatir-1.6.2

2009-04-02 Thread ajee

Hi Angrez,

Glad to see the reply on this topic, I know you are one of the
maintainers of firewatir. As far as I searched on internet, many guys
have the same problem on popup javascript window but not a clear
solution I saw.

Per your request, here is my ruby example code, I have removed some
unrelated stuff. I can confirm the text of the popup is correct.
//-//
require 'rubygems'
require firewatir
include FireWatir

# set a variable
test_site = 10.10.10.1

# open the browser
ff = FireWatir::Firefox.start(test_site)

authpage = ff.frame(:name,authFrm)
authpage.text_field(:name, userName).value = admin
authpage.text_field(:name, pwd).value = password
authpage.button(:name, Submit).click

ff.wait
clientSettings = ff.frame(:name,tabFrame)
ff.wait
clientSettings.select_list(:name,Iface).select(X0)
clientSettings.text_field(:name, PPPStartIp).value = 192.168.168.1
clientSettings.text_field(:name, PPPEndIp).value = 192.168.168.100
ff.startClicker(ok,1,'',The configuration on this page will reset
all connections, are you sure to submit?)
clientSettings.button(:name,applyButt).click  # here a
javascript window popup and never disappear

puts End of test.
//-//

Here I have another problem, it seems that ff.wait can't always work,
so somethime script will complain no finding of html element and quit.

Thanks

On 3月23日, 下午2时31分, Angrez Singh ang...@gmail.com wrote:
 Can you make sure that pop up text is correct? Also can you post your
 ruby/html code here so that we can help you better.

 - Angrez

 On Mon, Mar 23, 2009 at 7:37 AM, ajee ajee@gmail.com wrote:

  Hi all, I have searched the Internet for a long time on this topic,
  but there is no resolve I got. I know that somebody raises advice of
  using startClicker, but when I use it, no use:

  ff.startClicker(ok,1,'',The configuration on this page will reset
  all connections, are you sure to submit?)

  In order to know why, I managed to compile jssh.xpi, to get into
  firefox 3.0, adding some debug msg. By this, I saw jssh gets the
  correct msg of startClicker from firewatir,  proxied_shell-
  ExecuteBuffer return NS_OK. So I don't  know how to go on, with this
  popup javascript confirm window, Firefox can't proceed.
--~--~-~--~~~---~--~~
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] Need to select a option in combo box

2009-04-02 Thread aditi

Hi,

I need to select a option in combo box and get selected value .I am
not getting any method and type to use for selection of option in
combo box.Can anyone please help on this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Need to select a option in combo box

2009-04-02 Thread Chuck van der Linden

1) did you try searching the group for the phrase combo box ?

2) did you look at the item with the ie developer toolbar or firebug
to see what class it is?

3) what have you tried, and what results did you get

On Apr 2, 9:15 pm, aditi aditi_...@yahoo.com wrote:
 Hi,

 I need to select a option in combo box and get selected value .I am
 not getting any method and type to use for selection of option in
 combo box.Can anyone please help on this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: WIN32OLE Error

2009-04-02 Thread Chuck van der Linden

what sort of experimenting were you doing?   what things did you
change during the course of your experiments?

have you tried reverting back to the code from before your
experiments, does it work or is it now also broken?. (you are using
source control, or at least keeping backups right?)

On Apr 2, 8:19 pm, vladimir...@hotmail.com vladimir...@hotmail.com
wrote:
 My Watir scripts worked fine. But after experimenting with Excel
 files, I'm getting this error.

 failed to create WIN32OLE object from `InternetExplorer.Application'
     HRESULT error code:0x80004005
       Unspecified error
 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
 167:in `initial
 ize'

 It happened at $ie = Watir::IE.new.
 Again it worked before.

 Please, help. Very upset.

 Vladimir
--~--~-~--~~~---~--~~
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: verify url vs element on the page

2009-04-02 Thread Chuck van der Linden

On Apr 2, 2:06 pm, Tester78 hmtest...@gmail.com wrote:
 I am really new to watir and need some help on how to go about testing
 this case. I am trying to test a next button on a page.   If I am on
 the homepage(http://example.com/1.aspx.com) and click the next button,
 I am taken to the next page with the url(http://example.com/
 2.aspx.com). If I hit next again the ending url changes to 3.aspx and
 so on.

George gives you the basic tactic to get the url

If I was testing this I'd do as follows
(note that I'm not really showing full validations, because don't know
if you are using test unit asserts rspec shoulds, or some custom
validation class you wrote.  so I'm just going for what I'd look at.
obviously just calling the 'exists' method without doing anything with
the return value tests nothing realy...)

1) browser.button(:class, 'next').exists?  #is the button there?  no
point to steps 2 or 3 if not.
2) the button has the right href
3) click the button
4) check url of resulting page, is it as expected. (in a sense this is
just testing the browser, but it also verifies that the page is
present on the server, and/or you are not being redirected to
somewhere unexpected)



--~--~-~--~~~---~--~~
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: WIN32OLE Error

2009-04-02 Thread vladimir...@hotmail.com

When I reverting back to my initial code, it does not work now .
The error occurs while executing startup() function.
My test cases start with the following code:

$:  File.expand_path(c:/watir testware/libraries)
require 'setup'
startup()


The setup library has the following code:
# load all supporting libraries
require 'watir'
require 'DSlib'
require 'general'
require 'win32ole'

def startup
# redirect stdout to results file
  @orig_stdout = $stdout

  $base = http://crisp.adoc.xerox.com:8080/docushare/dsweb/;
  $ie = Watir::IE.new   # I believe it fails here

# get results file name
  rfile = str_get_last_element( $0, '/' )
  rfile = rfile.split( '.' ).first
  $stdout = File.new(c:/watir testware/results/ + rfile + .txt,
'w')
  puts Inside startup.
end
---
The problem happened after I wrote the following innocent code, which
works fine:

def ex_get_value( excel_file, header )
  require 'win32ole'
  app = WIN32OLE.new( 'Excel.Application' )
#  app.Visible = 1
  wb = app.Workbooks.Open( C:/Watir Testware/Scripts/
cm_CreateCollectionAsCPXUser.xls )
  ws = wb.Worksheets( 1 )

# number of used columns in the worksheet
  col_total = ws.UsedRange.Columns.Count
  for i in 1..col_total do
  v = ws.Cells( 1, i ).Value
  break if ( v == header )
  if i == col_total
puts No column with #{header} header was found.
app.ActiveWorkbook.Close( 0 )
app.Quit()
return
  end
  end

  puts ws.Cells( 2, i ).Value
  app.ActiveWorkbook.Close( 0 )
  app.Quit()

end

ex_get_value( C:/Watir Testware/Scripts/
cm_CreateCollectionAsCPXUser.xls, password )

But now the startup() code stopped working.
May be I need to kill some processes?

Thanks,
Vladimir

On Apr 2, 10:09 pm, Chuck van der Linden sqa...@gmail.com wrote:
 what sort of experimenting were you doing?   what things did you
 change during the course of your experiments?

 have you tried reverting back to the code from before your
 experiments, does it work or is it now also broken?. (you are using
 source control, or at least keeping backups right?)

 On Apr 2, 8:19 pm, vladimir...@hotmail.com vladimir...@hotmail.com
 wrote:



  My Watir scripts worked fine. But after experimenting with Excel
  files, I'm getting this error.

  failed to create WIN32OLE object from `InternetExplorer.Application'
      HRESULT error code:0x80004005
        Unspecified error
  C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:
  167:in `initial
  ize'

  It happened at $ie = Watir::IE.new.
  Again it worked before.

  Please, help. Very upset.

  Vladimir- 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] Need to generate documentation in Watir using RDOC functionality

2009-04-02 Thread aditi

Hi,

I want to generate documentation in Watir using RDOC functionality.Can
anyone tell me how I can do it?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---