Class: UiInteractors::Interactors::TextInteractor

Inherits:
BaseInteractor show all
Defined in:
lib/ui_interactors/interactors/text_interactor.rb

Instance Method Summary collapse

Methods inherited from BaseInteractor

#is_not_visible!, #is_visible!

Constructor Details

#initialize(driver, name, xpath_root = '//*') ⇒ TextInteractor

Returns a new instance of TextInteractor.



3
4
5
# File 'lib/ui_interactors/interactors/text_interactor.rb', line 3

def initialize(driver, name, xpath_root='//*')
  super
end

Instance Method Details

#does_not_have_text!(text) ⇒ Object



11
12
13
# File 'lib/ui_interactors/interactors/text_interactor.rb', line 11

def does_not_have_text!(text)
  wait.until { find_element.text != text }
end

#has_text!(text) ⇒ Object



7
8
9
# File 'lib/ui_interactors/interactors/text_interactor.rb', line 7

def has_text!(text)
  wait.until { find_element.text == text }
end