Sha256: d512e7a33f79369d920498096d3fed423737489db7b464cc2b0ff76f2d6d18e4

Contents?: true

Size: 452 Bytes

Versions: 6

Compression:

Stored size: 452 Bytes

Contents

class Mechanize
  class Form
    # This class represents an image button in a form.  Use the x and y methods
    # to set the x and y positions for where the mouse "clicked".
    class ImageButton < Button
      attr_accessor :x, :y

      def initialize *args
        @x = nil
        @y = nil
        super
      end

      def query_value
        [["#{@name}.x", (@x || 0).to_s],
         ["#{@name}.y", (@y || 0).to_s]]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
aai10-mechanize-2.0.1.0 lib/mechanize/form/image_button.rb
neocoin-mechanize-2.0.2 lib/mechanize/form/image_button.rb
mechanize-2.0.1 lib/mechanize/form/image_button.rb
mechanize-2.0 lib/mechanize/form/image_button.rb
mechanize-2.0.pre.2 lib/mechanize/form/image_button.rb
mechanize-2.0.pre.1 lib/mechanize/form/image_button.rb