Class: Watigiri::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/watigiri/locators/element/locator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element:, selector:) ⇒ Element

Returns a new instance of Element.



5
6
7
8
# File 'lib/watigiri/locators/element/locator.rb', line 5

def initialize(element:, selector:)
  @element = element
  @selector = selector
end

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



3
4
5
# File 'lib/watigiri/locators/element/locator.rb', line 3

def element
  @element
end

#selectorObject (readonly)

Returns the value of attribute selector.



3
4
5
# File 'lib/watigiri/locators/element/locator.rb', line 3

def selector
  @selector
end

Instance Method Details

#tag_nameObject



10
11
12
# File 'lib/watigiri/locators/element/locator.rb', line 10

def tag_name
  element.name.downcase
end