module SpecTest::Enclosers
Public Instance Methods
is_enclosed_by(identifier, encloser=nil, &block)
click to toggle source
Used to identify a web object as existing within an enclosing object like a frame or an iframe. There is a duplicate method in spectest.rb. This method needs to be here so that page objects can declare web objects to be in an enclosed context.
@param [String] identifier how an encloser will be referred to @param encloser a parent encloser that is passed from a previous call @param [optional] block that contains calls to web objects within the encloser
# File lib/spectest/enclosers.rb, line 12 def is_enclosed_by(identifier, encloser=nil, &block) encloser = [] if encloser.nil? encloser << identifier block.call(encloser) end