Sha256: 7c7290c177ed886aef099a79d14a8939cc35c747561b102742bc9870cebdbac4

Contents?: true

Size: 930 Bytes

Versions: 2

Compression:

Stored size: 930 Bytes

Contents

module Webdrone
  class Browser
    def text
      @text ||= Text.new self
    end
  end

  class Text
    attr_accessor :a0

    def initialize(a0)
      @a0 = a0
    end

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

    def css(text)
      @a0.find.css(text).text
    end

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

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

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webdrone-0.6.0 lib/webdrone/text.rb
webdrone-0.5.0 lib/webdrone/text.rb