Class: Capybara::PageObject::Attribute
- Inherits:
-
Element
- Object
- Element
- Capybara::PageObject::Attribute
show all
- Includes:
- DSL
- Defined in:
- lib/capybara-pageobject/attribute.rb
Instance Method Summary
collapse
Methods inherited from Element
#initialize, #visible?
Instance Method Details
#to_s ⇒ Object
18
19
20
|
# File 'lib/capybara-pageobject/attribute.rb', line 18
def to_s
"'attribute: #{@name}'"
end
|
#validation_error ⇒ Object
11
12
13
14
15
16
|
# File 'lib/capybara-pageobject/attribute.rb', line 11
def validation_error
error_field = @page.all(".field_with_errors").find do |error_field|
Capybara.using_wait_time(0) { error_field.has_selector?(@selector) }
end
error_field.find(".error_message").text if error_field
end
|