class Kameleon::DSL::Verify::Sequence

Attributes

params[R]

Public Class Methods

new(params) click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 195
def initialize(params)
  @params = params
end

Public Instance Methods

conditions() click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 200
def conditions
  [condition]
end

Private Instance Methods

condition() click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 206
def condition
  Condition.new(nil, params, prepare_xpath) do |elements, xpath_query|
    texts = page.all(:xpath, xpath_query).map(&:text)
    texts.uniq.should == elements.uniq
  end
end
prepare_xpath() click to toggle source
# File lib/kameleon/dsl/verify/presence.rb, line 213
def prepare_xpath
  params.collect { |n| "//node()[text()= \"#{n}\"]" }.join(' | ')
end