[Wtr-development] [JIRA] Updated: (WTR-281) add exists? for frames

Charley Baker (JIRA) watirjira at gmail.com
Wed Oct 27 15:42:26 EDT 2010


     [ http://jira.openqa.org/browse/WTR-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charley Baker updated WTR-281:
------------------------------

    Fix Version/s:     (was: 1.6.7)
                   Soon

> add exists? for frames
> ----------------------
>
>                 Key: WTR-281
>                 URL: http://jira.openqa.org/browse/WTR-281
>             Project: Watir
>          Issue Type: New Feature
>          Components: Frame
>    Affects Versions: 1.6.2
>         Environment: x
>            Reporter: Charley Baker
>            Assignee: Bret Pettichord
>             Fix For: Soon
>
>
> This has come up in the mailing list a few times. Monkey patch from MHwee: 
> Michael Hwee
>  to watir-general
> 	
> frame does not support exists?().
> However, you can *monkey-patch* as followed.
> module Watir
>   class Frame
>     alias_method :_locate, :locate
>     def locate
>       begin
>         return _locate
>       rescue
>         return nil
>       end
>     end 
>     def exists?
>       return @o != nil
>     end
>   end
> end 
> Michael

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the Wtr-development mailing list