On Thu, Sep 29, 2011 at 7:11 PM, Phil Lewis <[email protected]> wrote:
> What I also wanted to do was build the function out where I could also
> specifiy the object type, 'text_field' in this case. so that it might
> be something analogous to:
>                    $browser.@ctlObjType(@ctlObjIdentType,
> @ctlObjIdentValLoginField).set(userID)

Object#send is what you need:

http://ruby-doc.org/core/classes/Object.html#M000999

This should work

@ctlObjIdentType = :id
@ctlObjIdentValLoginField = "txtloginfield"
@ctlObjType = :text_field

$browser.send(@ctlObjType, @ctlObjIdentType =>
@ctlObjIdentValLoginField).set(userID)

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to