[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 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(

[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. Sorr

[wtr-general] Re: IE instance problem

2009-04-01 Thread Anna Gabutero
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 gr

[wtr-general] Re: IE instance problem

2009-04-01 Thread Anna Gabutero
On Tue, Mar 31, 2009 at 11:33:42PM -0700, Vikas Tulashyam wrote: > > Hi Anna, > Is there any method by which I can convert the String values to Hash. > > Thanks > Vikas Well, the fastest (but also dirtiest) way is instance_eval: irb(main):001:0> s = "{:name=>'q'}" => "{:name=>'q'}" irb(main):0

[wtr-general] Re: IE instance problem

2009-03-31 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 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 T

[wtr-general] Re: IE instance problem

2009-03-31 Thread Vikas Tulashyam
Hi Anna, Thanks for the reply. But I couldn't understand exactly what you have written. I am trying to read the values from xml file (I have pasted the contents of xml file). If I am reading the same value from xml file then its not working but if I am copying the same value into a variable and th

[wtr-general] Re: IE instance problem

2009-03-31 Thread Anna Gabutero
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 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

[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 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 $s

[wtr-general] Re: IE instance problem

2009-03-31 Thread Vikas Tulashyam
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 = getObj

[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': uninitia

[wtr-general] Re: IE instance problem

2009-03-31 Thread Željko Filipin
On Tue, Mar 31, 2009 at 14:47, Vikas Tulashyam 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 --~-

[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

[wtr-general] Re: IE instance problem

2009-03-31 Thread Željko Filipin
On Tue, Mar 31, 2009 at 13:46, Vikas Tulashyam 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

[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 Rub

[wtr-general] Re: IE instance problem

2009-03-30 Thread Željko Filipin
On Mon, Mar 30, 2009 at 16:13, Vikas Tulashyam 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 --~--~-~--~---