Module: Nobbie::Wx::Operations

Included in:
Test::Unit::TestCase
Defined in:
lib/nobbie/wx/operations.rb

Instance Method Summary collapse

Instance Method Details

#choosable(path) ⇒ Object

Returns a ChoosableOperations for interacting with the component specified in the path



40
41
42
# File 'lib/nobbie/wx/operations.rb', line 40

def choosable(path)
  ChoosableOperations.new(self, coerce_path((path)))
end

#click(path) ⇒ Object

Clicks the component specified in the path.

Supported components: Button


21
22
23
# File 'lib/nobbie/wx/operations.rb', line 21

def click(path)
  execute(command_factory.create_click_on_command(coerce_path(path)))
end

#command_factoryObject

Creates an instance of the default command factory. Override this method if you wish to provide an alternative command factory.



59
60
61
# File 'lib/nobbie/wx/operations.rb', line 59

def command_factory
  Command::Factory.new
end

#component(path) ⇒ Object

Returns the component specified in the path. Useful for performing operations that Nobbie does not currently support.

Supported components: Any


28
29
30
# File 'lib/nobbie/wx/operations.rb', line 28

def component(path)
  execute(command_factory.create_get_component_command(coerce_path(path)))
end

#enabled?(path) ⇒ Boolean

Determines if the component specified in the path is currently enabled.

Supported components: Any

Returns:

  • (Boolean)


46
47
48
# File 'lib/nobbie/wx/operations.rb', line 46

def enabled?(path)
  execute(command_factory.create_is_enabled_command(coerce_path(path)))
end

#in_(name) ⇒ Object

Creates an instance of the default path builder. Override this method if you wish to provide an alternative default path builder (because coerce_path uses in_() internally).



53
54
55
# File 'lib/nobbie/wx/operations.rb', line 53

def in_(name)
  ElementPathBuilder.new(name)
end

#selection(path) ⇒ Object

Returns a SelectionOperations for interacting with the component specified in the path



34
35
36
# File 'lib/nobbie/wx/operations.rb', line 34

def selection(path)
  SelectOperations.new(self, coerce_path(path))
end

#type(text, path) ⇒ Object

Types text into the component specified in the path.

Supported components: TextCtrl, ComboBox


15
16
17
# File 'lib/nobbie/wx/operations.rb', line 15

def type(text, path)
  execute(command_factory.create_type_into_command(coerce_path(path), text))
end