Module: PageMagic::Element::Selector::Methods

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<Symbol,String>) (defaults to: nil)

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



10
11
12
13
14
# File 'lib/page_magic/element/selector/methods.rb', line 10

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

  @selector = selector
end