Class: QAT::Web::Elements::Element

Inherits:
Base
  • Object
show all
Defined in:
lib/qat/web/elements/element.rb

Overview

Web Element wrapper class for a web element

Since:

  • 1.0.0

Instance Attribute Summary

Attributes inherited from Base

#config, #name, #selector

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Config

#valid_config?

Methods included from Selector

#selector

Methods included from Configuration

last_access, #last_access, last_access=, #parse_configuration

Constructor Details

This class inherits a constructor from QAT::Web::Elements::Base

Instance Method Details

#finderProc

Returns the element finder block

Returns:

  • (Proc)

Since:

  • 1.0.0



10
11
12
13
14
15
16
17
18
19
# File 'lib/qat/web/elements/element.rb', line 10

def finder
  selector = @selector
  proc do
    if selector.last.is_a?(Hash)
      find(*selector[0..1], **selector.last)
    else
      find(*selector)
    end
  end
end