This should work (a text-field in this case): puts @browser.text_field(:id, 'foo').methods.sort
On Sep 22, 11:51 am, Super Kevy <[email protected]> wrote: > In ruby I can get methods for things like Integer or String by > usiing .instance_methods(false) or .public_methods > > for example in IRB > irb(main):006:0> String.instance_methods(false) > => [:<=>, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], : > []=, :insert, :le > ngth, :size, :bytesize, :empty?, :=~, :match, :succ, :succ!, :next, :next!, > :upt > o, :index, :rindex, :replace, :clear, :chr, :getbyte, :setbyte, :to_i, :to_f, > :t > o_s, :to_str, :inspect, :dump, :upcase, :downcase, :capitalize, :swapcase, > :upca > se!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, > :bytes, : > chars, :codepoints, :reverse, :reverse!, :concat, :<<, :crypt, :intern, > :to_sym, > :ord, :include?, :start_with?, :end_with?, :scan, :ljust, :rjust, :center, > :sub > , :gsub, :chop, :chomp, :strip, :lstrip, :rstrip, :sub!, :gsub!, :chop!, > :chomp! > , :strip!, :lstrip!, :rstrip!, :tr, :tr_s, :delete, :squeeze, :count, :tr!, > :tr_ > s!, :delete!, :squeeze!, :each_line, :each_byte, :each_char, :each_codepoint, > :s > um, :slice, :slice!, :partition, :rpartition, :encoding, :force_encoding, > :valid > _encoding?, :ascii_only?, :unpack, :encode, :encode!, :to_r, :to_c, :matches, > :t > o_inputable_sym, :has_exact_prefix?, :without_pretty_indentation, :indent_by, > :t > aguri=, :taguri, :is_complex_yaml?, :is_binary_data?, :to_yaml] > > irb(main):016:0> String.public_methods > => > [:try_convert, :yaml_tag_subclasses?, :yaml_new, :allocate, :new, :superclass > , :to_yaml, :freeze, :===, :==, :<=>, :<, :<=, :>, :>=, :to_s, > :included_modules > , :include?, :name, :ancestors, :instance_methods, :public_instance_methods, > :pr > otected_instance_methods, :private_instance_methods, :constants, :const_get, > :co > nst_set, :const_defined?, :const_missing, :class_variables, > :remove_class_variab > le, :class_variable_get, :class_variable_set, :class_variable_defined?, > :module_ > exec, :class_exec, :module_eval, :class_eval, :method_defined?, > :public_method_d > efined?, :private_method_defined?, :protected_method_defined?, > :public_class_met > hod, :private_class_method, :autoload, :autoload?, :instance_method, > :public_ins > tance_method, :pretty_print_cycle, :pretty_print, :syck_yaml_as, :yaml_as, > :yaml > _tag_class_name, :yaml_tag_read_class, :dclone, :taguri=, :taguri, > :to_yaml_styl > e, :to_yaml_properties, :syck_to_yaml, :pretty_print_instance_variables, > :pretty > _print_inspect, :nil?, :=~, :! > ~, :eql?, :hash, :class, :singleton_class, :clone, > :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, > :untrust > , :untrusted?, :trust, :frozen?, :inspect, :methods, :singleton_methods, > :protec > ted_methods, :private_methods, :public_methods, :instance_variables, > :instance_v > ariable_get, :instance_variable_set, :instance_variable_defined?, > :instance_of?, > :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, > :respond_to_missing > ?, :extend, :display, :method, :public_method, :define_singleton_method, > :__id__ > , :object_id, :to_enum, :enum_for, :pretty_inspect, :equal?, :!, :! > =, :instance_ > eval, :instance_exec, :__send__] > irb(main):017:0> > > I haven't been able to get this to work with WATIR classes can anyone > help me? -- 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]
