Top Level Namespace
- Includes:
- Accessibility::DSL
Defined Under Namespace
Modules: AX, Accessibility, Mouse Classes: Boxed, CFRange, CGPoint, CGRect, CGSize, Exception, KeyCoder, NSArray, NSDictionary, NSObject, NSString, NilClass, Range
Constant Summary collapse
- KAXIdentifierAttribute =
Added for backwards compatability with Snow Leopard. This attribute is standard with Lion and newer. AXElements depends on it being defined.
'AXIdentifier'
Instance Method Summary collapse
-
#have_child(kind, filters = {}) { ... } ⇒ Object
Assert that the receiving element has the specified child element.
-
#have_descendent(kind, filters = {}) { ... } ⇒ Object
(also: #have_descendant)
Assert that the given element has the specified descendent.
-
#shortly_have_child(kind, filters = {}) { ... } ⇒ Object
Assert that the given element has the specified child soon.
-
#shortly_have_descendent(kind, filters = {}) { ... } ⇒ Object
(also: #shortly_have_descendant)
Assert that the given element has the specified descendent soon.
Methods included from Accessibility::DSL
#app_with_bundle_identifier, #app_with_name, #app_with_pid, #cancel, #click, #confirm, #decrement, #delete, #double_click, #drag_mouse_to, #element_at_point, #element_under_mouse, #graph, #hide, #highlight, #increment, #method_missing, #move_mouse_to, #pick, #press, #raise, #right_click, #screenshot, #scroll, #scroll_menu_to, #scroll_to, #select_menu_item, #set, #set_focus_to, #show_about_window_for, #show_menu, #show_preferences_window_for, #subtree, #system_wide, #terminate, #type, #unhide, #wait_for, #wait_for_child, #wait_for_descendant, #wait_for_invalidation_of
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Accessibility::DSL
Instance Method Details
#have_child(kind, filters = {}) { ... } ⇒ Object
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.
174 175 176 |
# File 'lib/rspec/expectations/ax_elements.rb', line 174 def have_child kind, filters = {}, &block Accessibility::HasChildMatcher.new kind, filters, &block end |
#have_descendent(kind, filters = {}) { ... } ⇒ Object Also known as: have_descendant
Assert that the given element has the specified descendent. You can pass any parameters you normally would use during a search, including a block.
192 193 194 |
# File 'lib/rspec/expectations/ax_elements.rb', line 192 def have_descendent kind, filters = {}, &block Accessibility::HasDescendentMatcher.new kind, filters, &block end |
#shortly_have_child(kind, filters = {}) { ... } ⇒ Object
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.
212 213 214 |
# File 'lib/rspec/expectations/ax_elements.rb', line 212 def shortly_have_child kind, filters = {}, &block Accessibility::HasChildShortlyMatcher.new(kind, filters, &block) end |
#shortly_have_descendent(kind, filters = {}) { ... } ⇒ Object Also known as: shortly_have_descendant
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.
231 232 233 |
# File 'lib/rspec/expectations/ax_elements.rb', line 231 def shortly_have_descendent kind, filters = {}, &block Accessibility::HasDescendentShortlyMatcher.new kind, filters, &block end |