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 ie as I am doing in this code.

So can anyone help 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to