Module: PageMagic::Element::SelectorMethods

Included in:
PageMagic::Element, PageMagic::Element
Defined in:
lib/page_magic/element/selector_methods.rb

Overview

module SelectorMethods - adds method for getting and setting an element selector

Instance Method Summary collapse

Instance Method Details

#selector(selector = nil) ⇒ Object

Gets/Sets a selector

Parameters:

  • selector (Hash) (defaults to: nil)

    method for locating the browser element. E.g. text: 'the text'



7
8
9
10
# File 'lib/page_magic/element/selector_methods.rb', line 7

def selector(selector = nil)
  return @selector unless selector
  @selector = selector
end