I'm wondering if there is a decent way to do a conditional require. My specific problem is that my framework includes the old .visible? code by requiring 'watir/contrib/visible'. After upgrading to 1.6.5 I don't want to do this anymore since the .visible? method is included in the main watir core. However, since I use some shared resources in my team, I wanted to be able to use 1.6.5 on my machine and not require a global update, I needed a way to conditionally require 'watir/contrib/visible' only if the code is earlier than 1.6.5.
So, I came up with the following hack: require 'watir/contrib/visible' unless Watir::Element.instance_methods.include?('visible?') ...but there's got to be a better way. Something like: require 'watir/contrib/visible' if Watir < 1.6.5 Any ideas? Alan -- 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