class Object
Public Instance Methods
Assert that the receiving element has the specified child element. You can use any filters you would normally use in a search, including a block.
@example
window.toolbar.should have_child(:search_field) table.should have_child(:row, static_text: { value: /42/ }) search_field.should_not have_child(:busy_indicator)
@param kind [#to_s] @param filters [Hash] @yield An optional block to be used as part of the search qualifier
# File lib/rspec/expectations/ax_elements.rb, line 174 def have_child kind, filters = {}, &block Accessibility::HasChildMatcher.new kind, filters, &block end
Assert that the given element has the specified descendent. You can pass any parameters you normally would use during a search, including a block.
@example
app.main_window.should have_descendent(:button, title: 'Press Me') row.should_not have_descendent(:check_box)
@param kind [#to_s] @param filters [Hash] @yield An optional block to be used as part of the search qualifier
# File lib/rspec/expectations/ax_elements.rb, line 192 def have_descendent kind, filters = {}, &block Accessibility::HasDescendentMatcher.new kind, filters, &block end
Assert that the given element has the specified child soon. This method will block until the child is found or a timeout occurs. You can pass any parameters you normally would use during a search, including a block.
@example
app.main_window.should shortly_have_child(:row, static_text: { value: 'Cake' }) row.should_not shortly_have_child(:check_box)
@param kind [#to_s] @param filters [Hash] @yield An optional block to be used as part of the search qualifier
# File lib/rspec/expectations/ax_elements.rb, line 212 def shortly_have_child kind, filters = {}, &block Accessibility::HasChildShortlyMatcher.new(kind, filters, &block) end
Assert that the given element has the specified descendent soon. This method will block until the descendent is found or a timeout occurs. You can pass any parameters you normally would use during a search, including a block.
@example
app.main_window.should shortly_have_child(:row, static_text: { value: 'Cake' }) row.should_not shortly_have_child(:check_box)
@param kind [#to_s] @param filters [Hash] @yield An optional block to be used as part of the search qualifier
# File lib/rspec/expectations/ax_elements.rb, line 231 def shortly_have_descendent kind, filters = {}, &block Accessibility::HasDescendentShortlyMatcher.new kind, filters, &block end