Sha256: 5652f60c557e4e029c956c28030d52f95a89907d83f8521e9aa1a3951b9cecc9

Contents?: true

Size: 1004 Bytes

Versions: 4

Compression:

Stored size: 1004 Bytes

Contents

module Webdrone
  class Browser
    def clic
      @clic ||= Clic.new self
    end
  end

  class Clic
    attr_accessor :a0

    def initialize(a0)
      @a0 = a0
    end

    def id(text)
      @a0.find.id(text).click
    end

    def css(text, n: 1, all: false, visible: true)
      @a0.find.css(text, n: n, all: all, visible: visible).click
    end

    def link(text, n: 1, all: false, visible: true)
      @a0.find.link(text, n: n, all: all, visible: visible).click
    end

    def button(text, n: 1, all: false, visible: true)
      @a0.find.button(text, n: n, all: all, visible: visible).click
    end

    def on(text, n: 1, all: false, visible: true)
      @a0.find.on(text, n: n, all: all, visible: visible).click
    end

    def option(text, n: 1, all: false, visible: true)
      @a0.find.option(text, n: n, all: all, visible: visible).click
    end

    def xpath(text, n: 1, all: false, visible: true)
      @a0.find.xpath(text, n: n, all: all, visible: visible).click
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webdrone-0.7.6 lib/webdrone/clic.rb
webdrone-0.7.2 lib/webdrone/clic.rb
webdrone-0.7.0 lib/webdrone/clic.rb
webdrone-0.6.0 lib/webdrone/clic.rb