Module: MobyBehaviour::QT::Behaviour
- Includes:
- Behaviour
- Included in:
- Action, Attribute, ConfigureBehaviour, Cpu, Events, FileTransfer, Find, Fixture, Fps, Gesture, Gpu, InfoLoggerBehaviour, KeyPress, LocalisationDB, Mem, Method, Multitouch, Os, Pwr, Record, ScreenCapture, Settings, Synchronization, TreeWidgetItemColumn, TypeText, ViewItem, Webkit, Widget
- Defined in:
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb
Overview
description
Base behaviour
behaviour
QtBehaviour
requires
sut_qt
sut_type
qt
input_type
All
sut_version
*
objects
sut;application
Constant Summary collapse
[ :NoButton, :Left, :Right, :Middle ]
{ :NoButton => '0', :Left => '1', :Right => '2', :Middle => '4' }
- @@_valid_directions =
[ :Up, :Down, :Left, :Right ]
- @@_direction_map =
{ :Up => '0', :Down => '180', :Left => '270', :Right => '90' }
- @@_pinch_directions =
{ :Horizontal => '90', :Vertical => '0'}
- @@_rotate_direction =
[ :Clockwise, :CounterClockwise ]
- @@_events_enabled =
false
Instance Method Summary collapse
-
#command_params(command = MobyCommand::WidgetCommand.new) ⇒ Object
nodoc should this method be private?.
Instance Method Details
#command_params(command = MobyCommand::WidgetCommand.new) ⇒ Object
nodoc
should this method be private?
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb', line 59 def command_params( command = MobyCommand::WidgetCommand.new ) if attribute( 'objectType' ) == 'Graphics' and attribute( 'visibleOnScreen' ) == 'false' and @creation_attributes[ :visibleOnScreen ] != 'false' begin #try to make the item visible if so wanted fixture( 'qt', 'ensureVisible' ) if sut_parameters[ :ensure_visible, false ].true? fixture( 'qt', 'ensureQmlVisible') if sut_parameters[ :ensure_qml_visible, false ].true? @creation_attributes.merge!( 'visibleOnScreen' => 'true' ) @parent.child( @creation_attributes ) rescue raise MobyBase::TestObjectNotVisibleError end end _object_type = attribute( 'objectType' ).intern #for components with object visible on screen but not actual widgets or graphicsitems if _object_type == :Embedded _object_type = @parent.attribute( 'objectType' ).intern _object_id = @parent.id else _object_id = @id end command.application_id( get_application_id ) command.set_object_id( _object_id ) command.object_type( _object_type ) command.set_event_type( sut_parameters[ :event_type, "0" ] ) # set app id as vkb if the attribute exists as the command needs to go to the vkb app begin # raises exception if value not found value = attribute( 'vkb_app_id' ) command.application_id( value ) rescue MobyBase::AttributeNotFoundError end command end |