[wtr-general] Name of the calling function

2009-04-17 Thread Vikas Tulashyam

Hi Friends,
I want to get the name of the calling function in our program . e.g. --


class A
  def Calling()
B.caller()
  end

end


class B
  def self.Caller()

   end
end


Here, I want to print the name of the calling function e.g. Calling()
in the called function e.g. Caller(). Is it possible in Watir/Ruby?
Please give me some solution for this..


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] Name of the currently running methods

2009-04-07 Thread Vikas Tulashyam

Hi,
Can I get the name of the currently running methods with the class and
package name. like--

class A

def method()
  puts nameofThecurrentMethod

end

end


let suppose there is a method nameofThecurrentMethod which prints the
name of the currently running method. Is it possible in Watir?

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] Re: current script path

2009-04-05 Thread Vikas Tulashyam

Thanks to all of you for the reply..and sorry I will keep these things
in mind before posting anything here.



On Apr 4, 3:56 am, orde ohil...@gmail.com wrote:
 Another way to get the current directory:

 my_dir = Dir.getwd

 OR

 my_dir = Dir.pwd

 As indicated by the previous poster, append .gsub('/', '\\') to make
 it Windows-friendly.

 On Apr 3, 11:53 am, Tiffany Fodor tcfo...@comcast.net wrote:

  BTW Vikas,

  The Watir community is a great group of people who really want to help
  out each other as well and newbies.  Lately, we've had some posters
  who haven't been very good citizens and it's made us all a little
  cranky.  Your post hit at 12:43 AM for me (US Mountain time), so it
  was also very late night/early morning for anyone in the US.

  The quickest way to upset people here is to ask for fast responses.
  Each question posted to the group is likely a problem that is holding
  someone up on the job.  We're all busy with our own jobs and regular
  lives and answer questions when we have time (and even sometimes when
  we don't), but in the end, this is a community of volunteers.

  Don't worry - you're certainly not the first to make this faux pas and
  I'm sure you won't be the last.  You just happened to do it when we're
  all a little sensitive.

  That being said - welcome to the group!

  -Tiffany

  On Apr 3, 3:33 am, Vikas Tulashyam vtulash...@gmail.com wrote:

   Hey sorry ..If it looks like rude ...
   I didn't mean anything like that .. I was just requesting..

   Thanks
   Vikas

   On Apr 3, 2:25 pm, JArkelen johnvanarke...@gmail.com wrote:

Replies to your questions are up to people willing to spend some time
to help you.
There is no such thing as 24/7 support here, so I personally consider
your second post just an hour after your initial one as rather rude!

Cheers,
John

On Apr 3, 9:54 am, Vikas Tulashyam vtulash...@gmail.com wrote:

 Please reply..

 On Apr 3, 11:43 am, Vikas Tulashyam vtulash...@gmail.com wrote:

  Hi friends,
  I want to get the path of the currently running scripts.. Can anyone
  please tell me how to get the path..

  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] current script path

2009-04-03 Thread Vikas Tulashyam

Hi friends,
I want to get the path of the currently running scripts.. Can anyone
please tell me how to get the path..

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] Re: current script path

2009-04-03 Thread Vikas Tulashyam

Please reply..

On Apr 3, 11:43 am, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi friends,
 I want to get the path of the currently running scripts.. Can anyone
 please tell me how to get the path..

 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] Re: current script path

2009-04-03 Thread Vikas Tulashyam

Hey sorry ..If it looks like rude ...
I didn't mean anything like that .. I was just requesting..

Thanks
Vikas

On Apr 3, 2:25 pm, JArkelen johnvanarke...@gmail.com wrote:
 Replies to your questions are up to people willing to spend some time
 to help you.
 There is no such thing as 24/7 support here, so I personally consider
 your second post just an hour after your initial one as rather rude!

 Cheers,
 John

 On Apr 3, 9:54 am, Vikas Tulashyam vtulash...@gmail.com wrote:

  Please reply..

  On Apr 3, 11:43 am, Vikas Tulashyam vtulash...@gmail.com wrote:

   Hi friends,
   I want to get the path of the currently running scripts.. Can anyone
   please tell me how to get the path..

   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] Re: Google and Watir Search (was: current script path)

2009-04-03 Thread Vikas Tulashyam

Thanks..Now onwards I will search the Watir related issues on the
given link ..

Thanks
Vikas

On Apr 3, 2:43 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Fri, Apr 3, 2009 at 08:43, Vikas Tulashyam vtulash...@gmail.com wrote:
  I want to get the path of the currently running scripts..

 If you are in a hurry, why don't you try Google? I searched for path of the
 currently running scripts ruby (without the quotes) and the first hit
 returned something that looks like solution to your problem.

 Google is usually faster than people on this list.

 Also, if you are sure the problem is Watir related and Google is of no help,
 there is Watir Search:

 http://www.google.com/coop/cse?cx=007267089725385613265:gmydx5gtw6u

 It is custom Google search engine that searches only Watir related sites.

 Ž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] 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] 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] 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] Re: IE instance problem

2009-04-01 Thread Vikas Tulashyam

Hi Anna,
Is there any method by which I can convert the String values to Hash.

Thanks
Vikas


On Apr 1, 11:06 am, Anna Gabutero a...@lavabit.com wrote:
 On Tue, Mar 31, 2009 at 09:07:29PM -0700, Vikas Tulashyam wrote:

  Hi firends,
  Please help me.

  Thanks
  Vikas

  On Mar 31, 6:24 pm, Vikas Tulashyam vtulash...@gmail.com wrote:
   Hi,
   Actually, I am trying to read the sLocator value form a xml file and
   thats the main problem if I put the value directly into a variable
   then it's working fine like--

   a= {:name='q'}
   return $sBrowser.text_field(a)

   Code written above works fine but when I m doing this-

           sLoc = getObjectLocator(Text_Search)
           return $sBrowser.text_field(sLoc)

           def getObjectLocator(sObjectId)
           begin
             $sObjectFile = Document.new File.new(c:\\a.xml)

             $sObjectFile.elements.each(//TestObject[Identifier='#
   {sObjectId}']) { |element|
               sLocator = element.elements['Locator'].text
               sObjectType = element.elements['ObjType'].text
               return sLocator
             }

   sLoc returns the correct value, I tried this by printing the sLoc
   value but It is nt working

 It is returning a different value.  Your assignment is equivalent to:

   sLoc = {:name='q'}

 which is different from:

   a = {:name='q'}

 The first is a string, the second is a hash, and these object types are
 not interchangeable.

 - Anna
--~--~-~--~~~---~--~~
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: IE instance problem

2009-04-01 Thread Vikas Tulashyam

Hi,
Thanks for the time. It returns hash values but I want to use this
value into methods for objects identification like-

a= get_object_locator(Text1)

ie.text_field(a).set(test)

Here, it's not working as it is.So how I can use this. I am very new
to Watir and don't have too much idea. Sorry to bother you guys again
and again.

Thanks
Vikas





On Apr 1, 12:24 pm, Anna Gabutero a...@lavabit.com wrote:
 P.S. Starting your variable names with $ turns them into global
 variables.  Avoid doing so unless you really need it.

 - Anna
--~--~-~--~~~---~--~~
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: IE instance problem

2009-04-01 Thread Vikas Tulashyam

Hi Anna,
Thanks. I solved this prob.. Thnak you very much

Thanks
Vikas

On Apr 1, 1:18 pm, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi,
 Thanks for the time. It returns hash values but I want to use this
 value into methods for objects identification like-

 a= get_object_locator(Text1)

 ie.text_field(a).set(test)

 Here, it's not working as it is.So how I can use this. I am very new
 to Watir and don't have too much idea. Sorry to bother you guys again
 and again.

 Thanks
 Vikas

 On Apr 1, 12:24 pm, Anna Gabutero a...@lavabit.com wrote:

  P.S. Starting your variable names with $ turns them into global
  variables.  Avoid doing so unless you really need it.

  - Anna
--~--~-~--~~~---~--~~
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: IE instance problem

2009-03-31 Thread Vikas Tulashyam

Hi ,
Thanks for the time, actually I am creating a some common methods and
for that I have created some classes and I want to work on the same
IE instance, means all the classes should access the same IE instance
and perform the operations on the same IE. I have written the classes
in separate Ruby files. So is there any way to solve this problem.

Thanks
Vikas


On Mar 30, 7:24 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Mar 30, 2009 at 16:13, Vikas Tulashyam vtulash...@gmail.com wrote:
  I can just create a variable instance of browser and use it
  whenever required.

 You want variable to point to a browser, but not open a new browser?

 Can you give us some information about what are you doing?

 Ž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: IE instance problem

2009-03-31 Thread Vikas Tulashyam

Hi,
Thanks for the reply, your exaple is useful. can you please gide me
more for the following problem--


Hi All,
I want to return a instance of a browser and a prticular method
related to the browser from a function --
Following is the my code--

def getObjectLocator(sObjectId)
begin
  $sObjectFile.elements.each(//TestObject[Identifier='#
   {sObjectId}']) { |element|
sLocator = element.elements['Locator'].text
sObjectType = element.elements['ObjType'].text

if(sObjType.eql?(TextField))
s = Watir.IE.new
s.text_field(sLocator)
return s
 }
end

Here, sLocator is-- :name,'q'. I am not able to return the instance
of this text filed which has the property as sLocator. if I write the
code as --

  s.text_field(:name,'q') , then it's working fine but it's nt working
with s.text_field(sLocator). Here sLocator contains the same value
i.e. :name,'q'.

please help me.

Thanks
Vikas

 but I am facing some other

Željko Filipin wrote:
 On Tue, Mar 31, 2009 at 13:46, Vikas Tulashyam vtulash...@gmail.com wrote:
  I am creating a some common methods and
  for that I have created some classes and I want to work on the same
  IE instance, means all the classes should access the same IE instance
  and perform the operations on the same IE. I have written the classes
  in separate Ruby files.

 There are several ways of solving the problem:

 1) use global variable for browser, like $browser, and all your scripts will
 have access to it
 2) send variable that points to browser to method as parameter:

 def do_something(browser)
   browser.goto google.com
 end

 browser = Watir:IE.new
 do_something(browser)

 There are more solutions, but this two look the simplest to me.

 Ž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: IE instance problem

2009-03-31 Thread Vikas Tulashyam


Hi,
Thanks for the reply . I tried the method suggested by you,

sLocator = {:name='q'}
return $sBrowser.text_field(sLoc)

but it's not working it gives the following error-- c:/ruby/lib/ruby/
gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:
102:in `const_missing': uninitialized constant
Watir::InputElementLocator::MissingWayOfFindingObjectException
(NameError)

Please help.

Thanks
Vikas


On Mar 31, 5:55 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Mar 31, 2009 at 14:47, Vikas Tulashyam vtulash...@gmail.com wrote:
   s.text_field(:name,'q') , then it's working fine but it's nt working
  with s.text_field(sLocator). Here sLocator contains the same value
  i.e. :name,'q'.

 Try putting this to sLocator:

 {:name = 'q'}

 instead of:

 :name, 'q'

 Ž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: IE instance problem

2009-03-31 Thread Vikas Tulashyam

Hi firends,
Please help me.

Thanks
Vikas


On Mar 31, 6:24 pm, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi,
 Actually, I am trying to read the sLocator value form a xml file and
 thats the main problem if I put the value directly into a variable
 then it's working fine like--

 a= {:name='q'}
 return $sBrowser.text_field(a)

 Code written above works fine but when I m doing this-

         sLoc = getObjectLocator(Text_Search)
         return $sBrowser.text_field(sLoc)

         def getObjectLocator(sObjectId)
         begin
           $sObjectFile = Document.new File.new(c:\\a.xml)

           $sObjectFile.elements.each(//TestObject[Identifier='#
 {sObjectId}']) { |element|
             sLocator = element.elements['Locator'].text
             sObjectType = element.elements['ObjType'].text
             return sLocator
           }

 sLoc returns the correct value, I tried this by printing the sLoc
 value but It is nt working

 My Xml file looks like--

 - ObjectMap
 - TestObject
   IdentifierList_All/Identifier
   Locator:name, 'options'/Locator
   ObjTypeSelect List/ObjType
   /TestObject
 - TestObject
   IdentifierText_Search/Identifier
   Locator{:name='q'}/Locator
   ObjTypeTextField/ObjType
   /TestObject
   /ObjectMap

 Thanks
 Vikas

 On Mar 31, 6:14 pm, Vikas Tulashyam vtulash...@gmail.com wrote:

  Hi,
  Thanks for the reply . I tried the method suggested by you,

  sLocator = {:name='q'}
  return $sBrowser.text_field(sLoc)

  but it's not working it gives the following error-- c:/ruby/lib/ruby/
  gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:
  102:in `const_missing': uninitialized constant
  Watir::InputElementLocator::MissingWayOfFindingObjectException
  (NameError)

  Please help.

  Thanks
  Vikas

  On Mar 31, 5:55 pm, Željko Filipin zeljko.fili...@wa-research.ch
  wrote:

   On Tue, Mar 31, 2009 at 14:47, Vikas Tulashyam vtulash...@gmail.com 
   wrote:
 s.text_field(:name,'q') , then it's working fine but it's nt working
with s.text_field(sLocator). Here sLocator contains the same value
i.e. :name,'q'.

   Try putting this to sLocator:

   {:name = 'q'}

   instead of:

   :name, 'q'

   Ž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] IE instance problem

2009-03-30 Thread Vikas Tulashyam

Hi Friends,
I want to create an instance of a browser and want to use it later,
but when ever I create a new instance, Watir opens a new browser as --


ie= Watir::IE.new

I dont want to do this. Can anyone guide me, if it is possible is
Watir. so I can just create a variable instance of browser and use it
whenever required.


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] Re: Packaging 3rd party tool

2009-03-27 Thread Vikas Tulashyam

Hi ,
Thanks for the reply.. We are creating a object map UI for the
framework in Watir and we want to bundle that with our code. So I dont
know how to do this..That's why I asked this questions.

Thanks


On Mar 26, 7:10 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Thu, Mar 26, 2009 at 15:05, Vikas Tulashyam vtulash...@gmail.com wrote:
  Please reply, this is possible or not?

 In my experience, when you do not get a reply, that means you should be more
 specific. :)

 For example, I just did not understand the problem.

 You could bundle what every you like with your framework. In my example, I
 have a custom framework, I bundle snapit.exe that takes screens shots and I
 have no problems with that.

 What Java tool did you have in mind, and why do you think there will be a
 problem?

 Ž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: Need to find text of an element using watir

2009-03-27 Thread Vikas Tulashyam

Hi,
Yes you are right. Before sometimes, I came through a function which
return the text for almost all objects. So I just want to knw the name
of that function if any one know.

Thanks


On Mar 27, 2:52 am, Mark Anderson mander...@drillinginfo.com
wrote:
 Something like browser.text ?

 Can you give us an understanding of the larger problem you are trying to
 solve?  

 Can you show us the code that you've tried, the results they have given, and
 the reason why the results are not what you are looking for?

                                         /\/\ark



  -Original Message-
  From: watir-general@googlegroups.com [mailto:watir-
  gene...@googlegroups.com] On Behalf Of Vikas Tulashyam
  Sent: Thursday, March 26, 2009 7:09 AM
  To: Watir General
  Subject: [wtr-general] Re: Need to find text of an element using watir

  Hi Thanks for the reply but we want to get the text of all the element
  by using a single method and not the object itself.
  So is it possible in Watir? Do we have any method like getText() which
  returns the text for all the elements.

  Thanks

  On Mar 26, 3:11 pm, Željko Filipin zeljko.fili...@wa-research.ch
  wrote:
   On Thu, Mar 26, 2009 at 11:05, aditi aditi_...@yahoo.com wrote:
Is there any common method?

   browser.show_all_objects

   Željko

  __ Information from ESET NOD32 Antivirus, version of virus
  signature database 3965 (20090326) __

  The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com

  __ Information from ESET NOD32 Antivirus, version of virus
  signature database 3966 (20090326) __

  The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com

 __ Information from ESET NOD32 Antivirus, version of virus signature
 database 3966 (20090326) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.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] OLE

2009-03-26 Thread Vikas Tulashyam

Hi Guys,
I want to create a method by which I can perform any operation on a
object by just passing the identifier of that object. In Watir , we
need to call specific methods for calling a particular object as--

ie.text_filed(:id, 'Text1').set('Test')

So, Can I impelment my method using win32OLE . e.g. --

require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.visible = true
ie.navigate(http://www.google.com;)
ie.document.all[q].value = pickaxe
ie.document.all[btnG].click



Is this a good way to create a function which performs an operation on
all object types by just passing identifier as --

def click(sObjectId)

ie.document.all[sObjectId].click

end


Please reply. I will be thankful for your cooperation.

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] Re: OLE

2009-03-26 Thread Vikas Tulashyam

I have tried this code but it gives error for document function. as--

LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError)
OLE error code:80004005 in Unknown
  No Description
HRESULT error code:0x80020009
  Exception occurred.   from OLE.rb:7
Exit code: 1





On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi Guys,
 I want to create a method by which I can perform any operation on a
 object by just passing the identifier of that object. In Watir , we
 need to call specific methods for calling a particular object as--

 ie.text_filed(:id, 'Text1').set('Test')

 So, Can I impelment my method using win32OLE . e.g. --

 require 'win32ole'
 ie = WIN32OLE.new('InternetExplorer.Application')
 ie.visible = true
 ie.navigate(http://www.google.com;)
 ie.document.all[q].value = pickaxe
 ie.document.all[btnG].click

 Is this a good way to create a function which performs an operation on
 all object types by just passing identifier as --

 def click(sObjectId)

 ie.document.all[sObjectId].click

 end

 Please reply. I will be thankful for your cooperation.

 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] Re: OLE

2009-03-26 Thread Vikas Tulashyam

Hi Thanks for the reply.
Can you please give me some where I can find the details.

Actually I found this code on --http://www.kohl.ca/blog/archives/
40.html

Please guide me.

Thanks
Vikas


On Mar 26, 12:07 pm, Angrez Singh ang...@gmail.com wrote:
 ie.document is method of watir and not OLE Object of IE. You need to
 study more about IE ole object if you want to do that.

 - Angrez

 On Thu, Mar 26, 2009 at 12:07 PM, Vikas Tulashyam vtulash...@gmail.comwrote:







  I have tried this code but it gives error for document function. as--

  LE.rb:7:in `method_missing': Document (WIN32OLERuntimeError)
     OLE error code:80004005 in Unknown
       No Description
     HRESULT error code:0x80020009
       Exception occurred.       from OLE.rb:7
  Exit code: 1

  On Mar 26, 11:35 am, Vikas Tulashyam vtulash...@gmail.com wrote:
   Hi Guys,
   I want to create a method by which I can perform any operation on a
   object by just passing the identifier of that object. In Watir , we
   need to call specific methods for calling a particular object as--

   ie.text_filed(:id, 'Text1').set('Test')

   So, Can I impelment my method using win32OLE . e.g. --

   require 'win32ole'
   ie = WIN32OLE.new('InternetExplorer.Application')
   ie.visible = true
   ie.navigate(http://www.google.com;)
   ie.document.all[q].value = pickaxe
   ie.document.all[btnG].click

   Is this a good way to create a function which performs an operation on
   all object types by just passing identifier as --

   def click(sObjectId)

   ie.document.all[sObjectId].click

   end

   Please reply. I will be thankful for your cooperation.

   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] Re: Packaging 3rd party tool

2009-03-26 Thread Vikas Tulashyam

Hi Guys,
Please reply, this is possible or not?

Thanks
Vikas

On Mar 26, 9:27 am, Vikas Tulashyam vtulash...@gmail.com wrote:
 Hi Friends,
 I want to bundle a 3rd party tool with my Watir framework e.g. some
 Java based tool. So is it possible in Watir?

 Thanks in Advance
 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] Re: firefox error

2009-03-25 Thread Vikas Tulashyam

Hey Thanks to all
I am able to install it now.


On Mar 25, 4:05 pm, Al Snow jas...@hotmail.com wrote:
 Read these 
 instructions.http://wiki.openqa.org/display/WTR/FireWatir+Installation

 Thanks,
 Al Snow
 Agile Software Developer
 Linkedin:http://www.linkedin.com/in/alsnow
 Google Talk: jasnow1
 Twitter: jasnow



  Date: Tue, 24 Mar 2009 21:05:51 -0700
  Subject: [wtr-general] Re: firefox error
  From: vtulash...@gmail.com
  To: watir-general@googlegroups.com

  I dont know .How to install this extension..

  On Mar 24, 6:11 pm, Angrez Singh ang...@gmail.com wrote:
   did you installed JSSh extension? The command that you ran will always be
   successful whether the extension is there or not.

   - Angrez

   On Tue, Mar 24, 2009 at 5:50 PM, Vikas Tulashyam 
   vtulash...@gmail.comwrote:

Hi Friends,
I am getting an error while using the firefox.

require 'watir'
Watir::Browser.default ='firefox'
$browser = Watir::Browser.new

This code launches the firefox browser but also gives a error--

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/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'
       from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'
       from t.rb:3
Exit code: 1

I tried to run the follwoing command, and its working correctly,--

firefox -JSSh

Thanks in Advance :)

 _
 Express your personality in color! Preview and select themes for 
 Hotmail®.http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TX...
--~--~-~--~~~---~--~~
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: firefox error

2009-03-24 Thread Vikas Tulashyam

I dont know .How to install this extension..

On Mar 24, 6:11 pm, Angrez Singh ang...@gmail.com wrote:
 did you installed JSSh extension? The command that you ran will always be
 successful whether the extension is there or not.

 - Angrez

 On Tue, Mar 24, 2009 at 5:50 PM, Vikas Tulashyam vtulash...@gmail.comwrote:



  Hi Friends,
  I am getting an error while using the firefox.

  require 'watir'
  Watir::Browser.default ='firefox'
  $browser = Watir::Browser.new

  This code launches the firefox browser but also gives a error--

  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/commonwatir-1.6.2/lib/watir/
  browser.rb:65:in `new'
         from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
  browser.rb:65:in `new'
         from t.rb:3
  Exit code: 1

  I tried to run the follwoing command, and its working correctly,--

  firefox -JSSh

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



[wtr-general] getProperty

2009-03-23 Thread Vikas Tulashyam

Hi Friends,
I want to get the Properties of any object in Watir. Is Watir provides
any method to get the property ..say left..

Please help me..

Thank you very much in advance



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



[wtr-general] Re: getProperty

2009-03-23 Thread Vikas Tulashyam

Hi,
I want to get a property of an object like --
 ie.link(:id, 'a1').getProperty('InnerHTML')

Here, I want to implement getProperty function. So I can get any
property of that particular object (Here, I am getting the object as-
ie.link(:id, 'a1')). I want to get other properties of this object. So
is there an method in Watir like getProperty().




On Mar 23, 3:27 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Mar 23, 2009 at 11:19, Vikas Tulashyam vtulash...@gmail.com wrote:
  I want to get the Properties of any object in Watir.

 Can you give an example of what you need?

 Ž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: getProperty

2009-03-23 Thread Vikas Tulashyam

Hey Thank you very much :)

On Mar 23, 4:17 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Mar 23, 2009 at 12:14, Vikas Tulashyam vtulash...@gmail.com wrote:
   ie.link(:id, 'a1').getProperty('InnerHTML')

 Try this:

 ie.text_field(:index, 1).attribute_value(custom_attribute)
 = so cool

 I blogged about it:

 http://zeljkofilipin.com/2007/01/29/watir-select-element-using-custom...

 Ž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] .so and h files

2009-03-19 Thread Vikas Tulashyam

Hi Friends,
Can anybody tell me, what is the so and h files found in the C:\ruby
\lib\ruby\1.8\i386-mswin32 folder.Can we create these files.

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

2009-03-19 Thread Vikas Tulashyam

Hi Guys,
I have some questions --

1. Can I select multiple elements from a list, if yest then what is
the method?
2. Can I double click on elements in watir?
3. Can I perform a  Drag and Drop operation in Watir if my AUT
supports it ?
4. Can I perporf Mous up/Down, Mouse Movement/over , Key Press/Down
events on any particular objects.

Please answer.

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] Re: Hoe to Execute another scripts

2009-03-13 Thread Vikas Tulashyam

Hey Guys,
Thanks for the time. I tried using Rake and Hoe but i couldn't find
the exact way to create packages. Please help me with some examples if
you guys can.

Thanks in advance


On Mar 12, 7:48 pm, marekj marekj@gmail.com wrote:
 sorry, but Hoe,http://seattlerb.rubyforge.org/hoe/
 would not be the best way to execute scripts
 Use Rake, SpecTask or good old TestUnit runner.

 marekj

 Watirloo: Semantic Page Objects in UseCases
 Human Readable Machine Executable Acceptance 
 Testinghttp://github.com/marekj/watirloo/

 On Thu, Mar 12, 2009 at 7:02 AM, Vikas Tulashyam vtulash...@gmail.comwrote:



  Hi Guys,
  Please provide me the solution for the following problems

  1.  I want to execute ruby scripts from a single file, like  I want to
  create a Test suite and want to call each test case which is a
  separate ruby file, so how to call scripts.

  2. I am creating some common utilities for my project , so How I can
  call them in my projects, let say I have created a Module
  'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
  this scripts by providing the exact path of the ruby script and I can
  call this within that folder only.

  Thanks in advance

  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] Package creation

2009-03-11 Thread Vikas Tulashyam

Hi,
I am trying to create a framework in Watir, so I need to create a
package/Installable for this purpose. Please give me some pointer in
this area.


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] MYSQL error

2009-03-05 Thread Vikas Tulashyam

Hi Friends,
I have installed the MYSQL server 5.1. But when I am trying to connect
it through watir I am gettin an error - This Application has failed
to start becasue LIBMYSQL.dll was not found. Re-installing the
application may fix this problem. I tried to register this dll but i
got an error -libmysql.dll was loaded, but the dllserver registry
entry point was not found. This file cannot be registered.

Please help me if anyone has any idea.

Thanks in advance.

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] Re: Help Object repository

2009-03-05 Thread Vikas Tulashyam

Hi,
You are right, Watir doesn't support object repository concept and
even you can't spy the object properties.


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] $ie.maximize

2009-03-03 Thread Vikas Tulashyam

Hi Friends,
I am not able to use the maximize method of IE class. Please see the
below code. An error is thrown for maximize method. Please suggest if
something wrong--


require 'watir'
require 'test/unit'

class TestSuite_IRCTC  Test::Unit::TestCase

$ie = Watir::Browser.new
$test_site = 'http://www.irctc.co.in'

  def test_01_OpenApps

  puts 'TC_RR_001- Open the IRCTC site: www.irctc.co.ic'
$ie.maximize
$ie.goto($test_site)


  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] popup handling

2009-03-03 Thread Vikas Tulashyam

Hi friends,
I am getting an error while handling the popup. I have attached the
code and following is the error message��

:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32
(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'
from Login.rb:3
Exit code: 1


My code is--


require 'watir'
require 'test/unit'
require 'watir/contrib/enabled_popup'

def startClicker( button , waitTime, user_input=nil )
  # get a handle if one exists
  hwnd = $ie.enabled_popup(waitTime)
  if (hwnd)  # yes there is a popup
w = WinClicker.new
if (user_input )
  w.setTextValueForFileNameField( hwnd, #{user_input} )
end
# I put this in to see the text being input it is not necessary to
work
sleep 3
# OK or whatever the name on the button is
w.clickWindowsButton_hwnd( hwnd, #{button} )
#
# this is just cleanup
w=nil
  end
end

def test_03_TC_RR_003
  $ie.text_field(:name, userName).set()
  $ie.button(:name, Submit).click
   startClicker( Ok , 5)



Please help me if anyone has any idea.

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