Sha256: a4f28c1ae1a709cce0fc684f3c8e0b098d78401fa5082d6315ac6eed97398e32
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
module Druid module LocatorGenerator def self.generate_locators(target) [:text_field, :hidden_field, :text_area, :select_list, :link, :checkbox, :radio_button, :button, :div, :span, :table, :cell, :image, :form, :list_item, :unordered_list, :ordered_list, :h1, :h2, :h3, :h4, :h5, :h6, :paragraph, :label, :file_field, :area, :canvas, :audio, :video, :abbr, :address, :article, :aside, :bdi, :cite, :code, :dd, :em, :figcaption, :figure, :footer, :header, :hgroup, :kbd, :mark, :nav, :noscript, :rp, :rt, :ruby, :samp, :section, :sub, :summary, :sup, :var, :wbr].each do |tag| target.send(:define_method, "#{tag.to_s}_element") do |*identifier| self.send "#{tag.to_s}_for", locator(identifier).clone end target.send(:define_method, "#{tag.to_s}_elements") do |*identifier| self.send "#{tag.to_s}s_for", identifier[0] ? identifier[0].clone : {} end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
druid-ts-1.1.7 | lib/druid/locator_generator.rb |